How to determine bounding boxes of floor slabs (real geometry) with their x/y/z coordinates? (to be used in intersection rule)

I created an intersection test, which evaluates if a room has an underlying slab below its middle point. If an overlap is detected, a parameter of the floor ceiling below should be saved to the room above.

The problem is, that i have approached the slab geometry by BoundingBox.MinPoint and BoundingBox.MaxPoint. So the bounding box of every element is a cuboid. This leads to the fact, that in case of polygonal floor slabs the BoundingBoxes become much larger if I construct them only with maximum and minimum point and therefore too many intersections are determined, because no areas are cut out.

I determine the overlaps by means of point comparison in a PythonScript.
I programmed it with a counter variable, which gets incremented if an intersection is detected. If the counter>1 the room isn´t further compared with other slabs.
By starting with the next room counter gets reseted.

  1. How can I determine the REAL geometry of a floor slab, defined by point coordinates, lines etc.?
    1.1) How can I determine whether a predefined (x/y/z) cuboid lies within this defined geometry?

I have now tried several nodes, but I cannot find a solution.
Any hints, how to solve this by a custom python script? Or predefined nodes?

Maybe it´s possible to decompose the solids to get their coordinates? Or test if the test-volume is situated inside the solid of the slabs by any other approach?

Edit: I actually try to create solids by placing a cube around the middle point of each room which protrude in z-direction into the slab below, to intersect them with slab solids. Maybe the easier approach, than comparing points…

Dynamo:
CUSTOMWriteSlabTagsToRooms_adaptions.dyn (114.8 KB)

Element.Geometry would be a good place to start.

Geometry.DoesIntersect would do the trick here.

1 Like