What I have done so far is; I can compare the walls to ducts to walls and create at that point the penetration. And I also can find the distance between the opening bottom vs the wall bottom and opening bottom vs wall top vice versa.
But the supervisor in the office wants to describe the distance with respect to the bottom of the structural floor below and the structural floor above.
I tried to put a cylindrical body into the hole (wall reservation) that cuts through the floor below and above, but the geometry.does intersect node does give wrong answers with respect to my experiments.
Anyone has any other suggestions? Thanks in advance.
If it is bouncing won’t it bounce off ? - if there is a finishing floor above the structural one? (or a false ceiling below).
Maybe a straight ray would be more appropriate, getting a list of intersecting elements - and then finding a closes structural one?
Just thinking out loud…
Yes you’re right, you can set the number of bounces. In case you detect several elements you have to use a filter, let’s say keep only structural floors for instance. Then among the filtered elements you get the first item which will be the first item detected.
I need only comparison with structural floors and that I will be filtering at first, therefore no worries. Ceiling is another category and I am not interested in that yet and won’t cause any problems on my side.
Before reading your answer I tried some other not practical but easy solution. As I post, I am assuming you guys wont be laughing at me:
This is an interesting approach. For this, I recommend using the Element.IntersectElement node from the BimorphNodes package. As you are testing all the cylinders against all the floors, it could lead to a huge amount of tests according the project scale.
This node is optimized and from my experience it’s the fastest to deal with heavy intersection checking.
As you can see on the snippet below, this node also allows you to get the floors intersecting with each elements of the elementSetA.
Revit version 2017 service pack 2 and Dynamo Core and Revit version 220.127.116.1183
Now everything works. The cylinder in the wall penetration finds the structural floor above and below. Compares the surfaces of these floors to the centroid of the wall opening. If the difference is negative to biggest negative number plus the height of the reservation gives the floor below, and if the difference is positive the smallest positive number gives the distance to the floor above(the bottom surface of the floor)