How to get Surface (Group of faces) via Ruby API?
-
Hi all,
I have encountered a case where I need to recalculate smooth normals for a Surface of faces (picture 1). This entity is available in the SketchUp editor itself but I have failed to find one in the api. It would be extremely useful to know the surface (i.e. the group of faces) that particular face belongs to. Is there a way to get this?
I have tried "all_connected" option of a face but it returns all the faces and edges of the mesh. I'm thinking about checking UV coordinates of the face vertices to know if particular vertex belongs to a surface but I think it's a dirty solution. Any ideas?
All the best,
Bro
Update:
Got it by checking uvw coordinates to determine if a current face is an extension of a previous face, but it's mint.. Is there a cleaner way to check this?
-
These snippets should work: http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=41211#p365380
-
@tt_su said:
These snippets should work: http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=41211#p365380
Oh, cool!
Thanks a lot!
Advertisement