Hey everyone i have 4 elements in this example. Is there a way to test if the shapes are a cuboid. When i get the geometry they come in as solids but i want to filter only the shapes that create a cuboid/rectangle.

Is this possible???

I am wanting this to short through hundreds of solids am just using 4 as an example.

May edit this when I get back to a station with Dynamo.

Bounding Box method - Compare volume of geometry with volume of its bounding box. If equal, is cuboidâ€¦unless geometry face planes arenâ€™t aligned to the bounding box axis (like if the cube is rotated 45 degrees on the XY plane). Method can work if you can correct the rotation.

Surface method - A cuboid is comprised of 6 faces with the normal vectors at 90 degree angles to 4 of the 6 possible vectors. If you can deconstruct the geometry down to surfaces, you can start checking for this.

2 Likes

Thanks for the quick response. Im trying to mess with bounding boxes right now just having a hard time aligning them to an angle.

Right, my thought is that to determine the alignment angle youâ€™d be extracting face vectorsâ€¦at which point youâ€™re basically halfway to doing the surface method.

1 Like

Robert I got it to work. Thanks for the ideas! really helped toward the solution!