# Create Cuboid as element Outline

Hi all,

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.

Any smart ideas how to create this Cuboid, if the element is rotated (for example) by 45 degrees?

Create Cuboid_v01.dyn (4 KB)
Create Cuboid_v01.rvt (1.6 MB)

Mark

3 Likes

As far as I know bounding boxes will always be orthogonal, but could you use this method instead?

Hi Erik,

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)

Any ideas?

Mark

my solution works only if you have elements that goes to the max extents, but that would be the same with cuboids, it is also the max extents…

window.dyn (27.5 KB)

try to see how my families are made!
Fixed.rfa (840 KB)

This has been an issue for a long time.

But you can try this workaround for the moment.

2 Likes

Hi Eric and Kulkul,

Thanks a lot for your responses.

@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.

Two questions left.

1. Does your method to define the (rotation)axis, always create a line in the length direction of the element?
2. 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)

Thanks again,
Mark

Yes! most cases.

Start a new topic and make sure you mark this post as solved.

Hi all,

My last question was solved in this topic.
If anyone is interested here’s the final graph Create Cuboid_v05.dyn (17.8 KB)

Mark

2 Likes

Thanks for sharing