Surface/Face Question
-
Hello
First of all, I'm new to ruby
I'm writing a export plugin which runs through all the faces of the model, generates a svg-path for them and finally writes them into a xml-file.
But that's not the problem.When I select geometrical forms such as the lateral surface of a cylinder, the Sketchup "Entity Info" displays "surface". Internal that surface consists of many faces. Now I need to differentiate between "stand-alone" faces and such faces which belongs to a "surface". Is that possible?
-
Iterate over the face's edges and check if any of them are smooth/soft/hidden and have another face attached.
-
@thomthom said:
Iterate over the face's edges and check if any of them are smooth/soft/hidden and have another face attached.
thx
-
I've got a piece of code that does this quite nicely that I think I can post later today when I find it. It was given to me by someone else, I just need to check if he asked me not to share it...
Chris
-
You need to use the Face.mesh method to get a PolygonMesh (a triangulated version of the face) and then export that. If you try to work with Sketchup Faces you are going to find that you have to deal with them being potentially non convex and having "holes".
-
http://code.google.com/apis/sketchup/docs/ourdoc/polygonmesh.html
I was wondering what that was for.
-
A polygon mesh is all just triangles?
hmm... That would be interesting for the Normal Probe I just made...
Advertisement