Geomatery.intersect node

I’m trying to detect intersections between walls and cable trays so I can place sleeves automatically at the intersection points.

After I place the sleeves using FamilyInstance.ByPoint, I need to adjust their dimensions like this:

  • Height and width should come from the intersecting cable tray (tray size + 50 mm, for example).

  • Depth should come from the wall thickness.

The issue is with the Geometry.Intersect node.
If I use cable trays as the first input, I get a list structured by trays — which is great for controlling the height and width.
But then I can’t get the wall thickness properly, since the list isn’t structured by walls.

If I flip the inputs (walls first), I get a wall-structured list — perfect for depth — but then I lose the tray-based structure I need for height and width.

Basically, I need a way to get both structured lists (one by cable trays, one by walls) from the same intersection, so I can set all the sleeve parameters correctly

I would recommend you start by identifying which walls intersect each cable trays rather than directly intersecting everything. This will make the relationship very readily attainable.

yes i did it by element.intersectsElement by Bimorph then the result into element.geometry for both then geometry.intersect

But still cant figure a way to sort the output of Familyinstance.bypoint as if the first input of geometry.intersect was the walls not cabletrays

Your points from the intersect node should be in the same order as the walls or cable trays (depending on order of intersection).

but for example if i have a single cable tray intersects with 2 different walls. i would hace more walls and points than cable tray number right?

  1. Get all trays. Result is a list of trays.
  2. Get all walls which intersect each tray. Result is a list of lists of walls.
  3. Get the tray curve. Result is a list of curves.
  4. Get the intersecting wall geometry. Result is a list of lists of solids.
  5. Intersect each curve with the solids at the same index. Result is a list of lists of lines.
  6. Extract width and height from step 1 - these apply to all family instances in each sublist.
    Extract the depth from the walls in step 2. These apply to individual instances in the same sequence within the sub lists.