Hi.
First off, thanks for the speedy reply !
If I understand correctly what you mean, then my mesh creation piece of code would be what causes the problem. I am trying to have a general PolygonMesh that contains the points, indexes and face point indexes for a cube, and this is what the code looks like :
def self.incomplete_make_mesh faces puts "Mesh creation started" mesh = Geom::PolygonMesh.new faces.each_with_index do |face,index| if face.is_a? Sketchup::Face temp_mesh = face.mesh mesh.add_polygon(temp_mesh.points) end end puts 'Polygons : '+ mesh.polygons.to_s puts 'Points : '+ mesh.points.to_s return mesh end
When I make a component of a cube, I break it recursively down into its faces (so far I've been assuming I only have one component, I haven't yet tried compensating local component origins, but that's another matter) and then creating the polygon this way.
Judging from your reply, I'm assuming there's something wrong with my approach. I can't debug this piece of code for now as my computer is not with me (just my Ruby scripts, ahaha), but you get three indexes per face with your piece of code, and I get more with mine.