1. collect all objects in sketchup scene .
All entities are in Sketchup.active_model.entities
2. loop each object , and get all faces of it .
all_faces = Sketchup.active_model.entities.each {|e| all_faces.push(e)
if e.is_a? Sketchup::Face }
(this does not drill into groups or components)
3. get each face`s points position value and the face`s normal value ,
all_faces.each {|f|
puts "\nface's normal=#{f.normal}"
f.vertices.each {|v| puts "\tvertex = #{v.position}"
}
}
then output them to a text file .
You can change the "puts" instruction to the IO write method of your
choice.
btw: i have searched in sketchup classes and mathod reference , and
for i newbee, hard to find informations .
The Hekp>Ruby Help will only tell you about the SU Ruby API, not how
to program in Ruby. For that, see www.ruby-lang.org and follow the
links.
Todd
(P.S. I did not syntax check anything)