Creating a Section Box between two levels

Hello,
I am trying to create a section box in a anew 3D View that is between two levels, for example: the area between floor 1 and floor 2. The section box should contain all of the fabrication parts contained between those two levels. I have written a code trying to use bounding boxes but have not been very successful. I have also tried using a coordinate system and points shown below, but cannot get the boundingBox.byElements node to work (Clockwork)

Does anyone know a solution or a workaround to get this accomplished?

I wrote a script to do exactly this. Give me a few moments to post it.

Section Box At Level.dyn (59.5 KB)

You only need to select the indexes of the levels you want to section and then click run. You can adjust the offset of the section box if you want. Also I would delete the Export to .NWC nodes because that is still in progress. Let me know if you have any questions about it.

1 Like

Thank you for helping!
I was wondering if it would work the same way with fabrication parts rather than walls and floors? I tried this:

So that section of the code forms a best fit rectangle around the floors, which will usually give me a rectangle that will contain the whole building. Iā€™m unfamiliar with fabrication parts but if you know of a way to extract the x and y coordinates of the parts you can find the minimums and maxes of those and it will serve the same purpose. That is give you a rectangle that will closely fit around all of the fabrication parts.

I edited it a bit to work with fabrication but I got it working. You have to be careful with fabrication parts acting weird with finding its location. It took me a while, but I found out that Transform origin outputted the points I wanted:


Thank you Jonesjo115 for the help!

1 Like