Hello everyone i have this 3D model on Sketchup, and i need to get the areas of diffrent faces using Ruby Sketchup API:
For example :
-for the first face on the left, i need to say that the face has a total area of 1.55 m² which is the area of the B face + the area of the A face, and say that this face has another face (A) in it and it’s area is 0.06 m².
And same for other faces (E and G).
How can i find that the face B contains the face A and not C or D ? because all face have the same material and have random x,y,z coordinates.
Also not where I can write code just now, but are some ideas:
If a Face, face_b, is inset in another Face, face_a, then the Loop returned by face_b.outer_loop will be geometrically the same as one of the Loops in the Array returned by face_a.loops. I say geometrically the same because Faces don’t share Loop objects, but their Loop objects will share Edges. The Loop class API doesn’t provide any comparison operation, so you have to roll your own. The ordering of Edges is independent in each Loop, but you can subtract the Arrays to see whether the result is empty, that is