# Creating a closed curve from Geometry.Intersect node output

**URL:** <https://forum.dynamobim.com/t/creating-a-closed-curve-from-geometry-intersect-node-output/23823>\
**Category:** Geometry\
**Created:** [July 17, 2018, 1:05pm UTC](https://forum.dynamobim.com/t/creating-a-closed-curve-from-geometry-intersect-node-output/23823 "2018-07-17T13:05:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mellouze](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mellouze](https://forum.dynamobim.com/u/mellouze)\
**Post date:** [July 17, 2018, 1:05pm UTC](https://forum.dynamobim.com/t/creating-a-closed-curve-from-geometry-intersect-node-output/23823/1 "2018-07-17T13:05:32Z")

</div>

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 :

 ![pb1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/c/2cbe7eb48f2a8e5bd848c52f84346179585431dd.PNG)

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

---

<div class="post-metadata">

**Author:** ![mellouze](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mellouze](https://forum.dynamobim.com/u/mellouze)\
**Post date:** [July 18, 2018, 12:51pm UTC](https://forum.dynamobim.com/t/creating-a-closed-curve-from-geometry-intersect-node-output/23823/2 "2018-07-18T12:51:31Z")

</div>

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
