Openings in Elements with a face based family void

Hello

As the name suggests I’m trying to create a script that will create a void instance, attached is the file, the test project and the family i created.

The problem I’m facing is when i try to check if the intersection point is within the bounding box of the wall, as you can see it comes empty. Could you please guide me as to what im doing wrong

Test.rvt (6.9 MB)
Face Based Void for Pipes.rfa (416 KB)
Wall opening.dyn (56.1 KB)

sorry forgot the screen shot:

Can you show us the points and the bounding box so we can see that they do intersect? Where do the bounding boxes come from? Where do the points come from? It would be helpful to see your full graph (with node previews pinned).

sorry about that here is a picture showing the intersection:

and here is the script:

Your bounding boxes are from surfaces, meaning the point would have to be on the surface to intersect. You would really want the bounding box of the solid (or element) but that could cause problems for non-orthogonal walls.

If you just want to know whether the pipe intersects the wall then do an intersection of those solids. Otherwise you’re over-complicating things by ensuring that the geometry you’re using is the right geometry. Why do you need the specific surface that intersects? Wouldn’t multiple surfaces intersect the pipe?

It may also be easier to use the pipe’s location (curve) instead of the solid or surface since a curve intersection will give you the point you’re looking for.

1 Like