The below picture is part of a bigger Dynamo workflow.
It gets me a cuboid that outlines the maximum extents of the elements (Doors in this case).
This works fine as long as the elements are aligned with the X or Y-axis.
If the element rotationangle don’t match 90,180, 270 360 degrees, the BoundingBox meshes thing up.
That would give me Polysurfaces that follows the shape of the Doors.
It is my goal to create cuboids that outline the maximum extents of the elements (Doors in this case).
I was thinking of something like the below workflow.
But then i would have to extract the “Width”, “Length” and “Height” from the Element.Geometry node. I have no idea how to do that. Another problem is that the centroid of the Doors (joined solids), is probably a little different from the centroid of the Cuboid. Create Cuboid_v03.dyn (10.2 KB)
@erfajo Your workflow uses a lot of nodes that i haven’t used before, so it wil take some time to figure out what they all do (but i do want to know, and learn).
For now the solution by @Kulkul definitely pointed me in the right direction.
Does your method to define the (rotation)axis, always create a line in the length direction of the element?
I will need some help manipulating the list of angles, should i start a new topic for that? First list:
If angle = 0,90, 180, 270, 360 degrees, replace by 0.
If angle has another value then the above, replace by the negative equivalent (45 to -45). Second list:
If angle = 0,90, 180, 270, 360 degrees, replace by 0.
If angle has another value then the above, leave it as it is. Create Cuboid_v04.dyn (18.3 KB)