BoundingBox.Intersects

Hi,

Revit 25, Dynamo 3.03

I have a foundation plan of concrete beams supported by piles. I figured out which piles belong to which beams with Boundigbox.Intersects, this works fine as long as the beam has not been rotated on the plan. The strange thing is that the MaxPoint does give the correct result.

As far as i know this is not happening in R24
The red arrow below is the beam rotated on plan and the piles below are no. 44 and 45 in the list. ( this is a copy from a not rotated element)

Is this a bug?
Thanks.

FYI

Unfortunately Bounding Boxes are (stay) allways axis aligned.

image

Maybe this will help?

EDIT
I tried it. Worked like a charm.

No idea how to modify the Python code to work so it can create a Bounding Box per Element
as i still don’t know Python :frowning_face:.

Maybe time to learn :slight_smile:

You’ll need to run a for loop over the list of items. It’s a very common task in Python and usuall early on the things to learn as a beginner. I have a video here which covers the core principle:

Trust me @GavinCrump, i really want to, but i simple don’t have the time currently.
Too busy on my regular projects and just life things…

1 Like

Thanks.

But BoundingBox.ByMinimumVolume does consider the alignment of an element.

2 Likes

No worries, I know the feeling! C# has been an uphill battle for me…

If time shows up drop me a dm. Always happy to give pointers!

Thanks. I am also talking with people who arrange courses and such in / for our company.
There are some more colleagues who wanna learn Python. So we hope we can do that
through our company. Also trying to free up some hours in my projects.

But BoundingBox.ByMinimumVolume does consider the alignment of an element.

Never tried this. Also works. I guess i learned something today.

Though i also don’t understand why you (and i) get a false…


…, but this works (but then you don’t have the rotation)

Also tried some things with nodes from the Orchid package, but also no luck.

1 Like

Hi @EzDoesIt ,

Any specific reason you’re using BoundingBoxes for the intersection instead of Geometry.Intersect?

1 Like

No specific reason other then the preview in Dynamo.
But why doesn’t Boundingbox.Intersects give the same results?

Bounding box would be faster and use less memory, but can be less accurate.

Hope that helps,

Mark

To get the minimum volume bounding box you have already created the Dynamo geometry, so using the Geometry.DoesIntersect removes the need to get the bounding boxes

Also this
image

Ah
The BoundingBoxes hasn’t the sam alignment because the BoundingBox.ByMinimumVolume in this case is a round pile and this has the alignment of the x- and y-grid.

Thanks.