Geometry.Intersect Problem

Hello all,

I am trying to create a graph that will find the elevation of a beam where it should intersect with a (warped) roof in two locations: one on each outside face. I will be using a grid line as a reference line to get these two points.

I have finished creating my graph, but it is not running correctly. I found the intersection of the gridline (converted to a surface) with the beam face (as curves) to get the points necessary. I then converted those points to vertical lines to find the intersection with the roof face to get the points I would calculate elevation from. However, I only get one point where I should be getting two. I do not get why Geometry.Intersect worked incorrectly that time. If anyone has any suggestions, it would be greatly appreciated. Thank you!

(FYI: The warning messages are due to the section box in my Revit at the time I believe. The error messages all had to do with inputs that lie outside the modelling range. Also, the second Curve.Extrude is erroneous and has been removed in my graph.)

As far as the answer to your question about why you are only receiving one point intersection, there could be a couple of reasons, and without trying it, I can’t give you a definitive answer. I might try setting the lacing of the Geometry.Intersect node that you are using to find the intersection of the lines and Surface to “Cross Product”. However, I have a suggestion that might make things easier.

Instead of jumping through the hoops of creating the line geometry (which has an arbitrary length/Z-Value, and thus could possibly fail for some geometries) and then finding the intersection with the plane, you could use the Point.Project node to project your point vertically to the surface of the floor.

For the grid, instead of extruding, you could also use the Plane.ByThreePoints node to get your surface for intersection- the Grid start and endpoints as 2 of your points, plus a Z offset for the 3rd. I don’t know if that is more or less computationally expensive, but again, it should eliminate any possible issues with the arbitrary extrusion of the grid not intersecting with the beam curves.

I hope that helps.

Joe

Hi @hjnbyun90

Could you drop here relevant files?

Unfortunately changing the lacing does not seem to help.

I will try out the alternative solutions, but I am still frustrated and curious as to why that problem is occurring as I have no idea.

use code block and replication guide
Geometry.Intersect( objToBeIntersected<1>, intersectors<2>)

This will effectively go through all the “to-be-intersected” and intersect all of the “intersectors” with each.

Unfortunately, that still does not solve the problem. I have played around with it more, and it appears that Geometry.Intersect is causing a bug on the 5th item of the “other” list. This is the same when I try the code block & replication guide.

it’d be helpful if you could upload the file or a sample. it’s not as easy to stare at the graph and know what’s up. kinda TL;DR