Room / Space intersecting Mechanical elements & space information

Hi,

I have developed a script to get the information of mechanical elements which are intersecting with the space created. However, I can get the solids created for spaces and spheres for each of the mech elements. When I run the DoesIntersect node, it gives only 1 true value, though there are many intersecting. Could anyone help?
Cheers.

Looks like a lacing issue. Try cross product for DoesIntersect.

Thanks for the quick reply. I did try that as well actually but had no luck.

You might want to post some samples to help others reproduce the problem. Calvary will come.

Please be sure to have your node preview bubbles pinned when taking a screenshot. Otherwise weā€™re just guessing at whatā€™s actually happening in your graph.

Also, this exact process has been discussed many times on the forum already. Please make sure you are searching for similar topics before you start a new thread. There are multiple comments to be made on where your process needs to be improved (list levels, bounding box inaccuracies, boolean comparisons) that have already been discussed in those other topics. Itā€™s best to start there and then come back with any specific questions you may have.

1 Like

Hi Nick,
Thanks for the reply. I have gone through some of those processes and got to this point. Sorry, Iā€™m a newbie to Dynamo and trying to get to the bottom of this.

Cheers.

Here is the script that I have done.

I did use one of these Mech samples to run it. Unfortunately, I canā€™t upload here as the file size is too big.

https://help.autodesk.com/view/RVT/2024/ENU/?guid=GUID-61EF2F22-3A1F-4317-B925-1E85F138BE88

Space Intersecting elements.dyn (41.8 KB)

Iā€™ve run it with rvt 25 mep sample project, your graph yields a ton of true. A couple of things worth noting:

  • bounding box is a rough representation of element geometry, you might want to use the original geometry of elements instead.
  • ā€œtrueā€ is a string literal, itā€™s text. true is boolean, you want to index stuff with the right thing.

I donā€™t find any major issues within your graph. Are you sure even after cross product, thereā€™s only one single true?

3 Likes

Hi @sanjaya all @BimAmbit say,:wink: dont use boundingboxes for your spaces these are always xy alignedā€¦try ootb is.in.space node or as i like is in space from mepover as give the spaces without need a filter boolā€¦you probably need translate your points in -z so you are sure they hit the spaces

2 Likes

I have tried both, but still Iā€™m getting the same. Maybe Iā€™m taking the spaces from the wrong node?

try with element.solids here

PS and use cross product on your does it intersect node

Cheers for the reply.

The problem is that not all points are located within the space. such as fire dampers in the wall. Iā€™m trying to get the intersecting space name for the fire dampers as well. Thatā€™s the reason I have created shares, so it will clash with the space and will give the intersecting space.

Thanks againā€¦ :slight_smile:

yes but should that firedamper belong to one space or 2 spaces ? anyway then we need translate the location point so it hit or as i think you already do use a oversized sphere so it probably will hit ā€¦

Yeah, I agree, fire dampers are in two spaces. Could this give an error if the sphere intersects more than 1 space?

Location point would be faster as you donā€™t need to convert any geometry as you can query the room via the get room at point method. Just move the point in the facing direction of the family the same dimension used for the sphere. Bonus points if you try the center point first and then do the shifting of that returns null. Double bonus points if you use the room location point first, the location point of the instance second, and the offsets third as this can be used to account for the ā€˜above the ceilingā€™ stuff.

If both rooms are desired use both the + and - offsets.

As far as ā€œcould this give an error?ā€, well that depends. The logic above would find one (equipmentā€™s center point is in the room) or two (dampener with + and - offset) rooms - but what are you planning to do once you find those? Setting a parameter value? Something else?

2 Likes

here is a fast exampleā€¦i use mepover in space here, you could use connector location point as well and tranlate them

1 Like

@sovitek Cheers, Soren.

I have tried that, and it did work partially. I have 688 items, and Iā€™m sure there are more than two in the spaces. However, it shows only 2 items. Thanks a lot for your help mate.

Hi @sanjaya i guess not all elements have to be translated that way,only component in wallā€¦try filter them outā€¦try run it first lets say on 5 spaces ā€¦and see if it could workā€¦and if then scale it upā€¦if you have a small sample rvt you could share we could take a lookā€¦

1 Like