Creating a closed curve from Geometry.Intersect node output

Hello all,

In one of my projects, I am trying to automatically detect junctions and the type of junctions between walls in Revit. To do so, I import the walls in Dynamo, extract their geometries, and I predict the type of junction based on the intersection I get. For now, it is working for all the simple cases.

However, one particular junction is bothering me :

As you can see, while on all the other cases the intersections are planar, I get in that case a non-planar intersection, and I want to extract the “non-planar” information through a Dynamo graph. I thought on using the Curve.IsPlanar node, which require a Curve object.

I tried to use the PolyCurve.ByJoinedCurves node (to join the lines that form the intersection), but it won’t work beacause the lines I get from the Geometry.Intersect node do not form a closed Polycurve (there is a spare line in the middle). Any idea on how to automatically make a closed curve from what I get from the Geometry.Intersect node ? The order of the lines from Geometry.Intersect is random…

I might as well be happy if one of you know a way of detecting such intersections whitout even using the Curve.IsPlanar node.

I cannot yet attach a file (I’m new to the forum), but to simply create the problematic case in Revit :

  • Create two walls
  • Create a third wall starting from their intersection point

To get the intersection on Dynamo :

  • Once you have extracted the geometry of the walls, use the Geometry.intersect node (arguments = the two geometries you want to intersect).

Best regards

Hi all,

Well, i managed to solve my problem. You should not use the PolyCurve.ByJoinedCurves node but rather the PolyCurve.ByPoints node (with its input connected to Curve.PointAtParameter).

Please note that this method does not permit you to create the surface defined by the output of Geometry.Intersect. (Surface.ByPerimeterPoint don’t work either).

Best regards

1 Like