Inclined Element Bounding Box

We have been facing few issues regarding Bounding Box for Structural framing elements as described below.

Generally, we place Structural Framing Elements Either Parallel to X-axis (or) parallel to Y-axis in over 80% of our Projects (let this be case 1), but in 20% of our projects we will be having Structural Framing elements in Inclined manner (this will be called case 2). This inclination will be mostly present in X-axis and Y-axis but in few locations it may be present Z Axis also (i.e., the height of element can change).

Usually we need to check clash detection or overlapping elements between all these Structural Framing Elements.
So we have been using Bounding Box for this overlapping check between all these structural framing elements in Dynamo.

But we observed that Bounding box for structural framing elements which are parallel to X-axis or Y-axis (case 1 explained above) in the node are been achieved exactly as needed in the Dynamo.

Where as, for inclined Structural Framing Elements the Bounding box is not been achieved exactly as needed in the Dynamo in the inclined manner.

What we need is a Bounding box for inclined element as shown in BLUE, but what we are achieving is as shown RED in Attached Image.

So, Please Confirm if any method or Process is there in Dynamo to achieve the Inclined Element Bounding Box as needed.

Your help will be Greatly Appreciated as we will behaving 1000s of elements in each plan for us to check overlap between these types but similarly sized Elements.

AABB’s are just that so its not possible. Best option is to use bb’s as a coarse filter to intersect-collect surrounding elements (rapid) then use a slow intersection filter, e.g. geometry intersection to detect overlaps. Dynamo doesn’t scale for this type of problem, and will crash or run for an inordinate amount of time if you try and use its geometry nodes for this purpose.

However, BimorphNodes Element.Intersect is optimised to perform this procedure in a fraction of the time: a bounding box intersection is used internally, then the element geometry intersection is performed on the subset, meaning even millions of intersections can be computed in a few seconds.

Actually Axis Aligned and Minimum Volume bounding boxes are now possible. Check out BoundingBox.ByMinimumVolume which was introduced in 2.16 (so Revit 2024) so 1/4 of all supported Dynamo for Revit builds can use the tool.

1 Like

Thats good to know but the problem with any non-axis aligned BB is performance. For intersection checks that need to be performant these bounding boxes are likely to be as slow as using solid intersections.

I haven’t tested much but from what I have seen they are one or two orders of magnitude faster than solid operations. Slower than direct Revit API still due to geometry conversion, but faster than solid-solid intersection when I tested. That said the core geometry engine has changed a bit since my test to make many operations faster, so a new test might be in order.