Find area between two polycurve which intersect

I have two polycurves which I’m trying to get the area between two curves. I have made them into one complete polycuve, however, most nodes and package nodes can’t compute the area of intersecting polycurves. Has someone built a node that computes the area between two polycures/curves which intersect? I’ve seen samples of Python code, but most of it uses numpy package which can’t be used in Dynamo.

Below is an image of what I’m trying to achieve.
The red area from the two lines is what I’m trying to get a value of.
area%20between%20two%20polycurves

Thank you.

Try creating a Surface.BySweptProfiles from a joined list of your curves, then use the Surface.Area node.

Thank you Ewan,
Unfortunately it continues to give me an error because of the overlapping lines. It might mean that we need to trim the overlapping the lines to isolate just the area. I will continue working on this on Monday. Thank you for taking the time.

@Danny_Bentley This might help…
intCrvArea-1

//Convert intersecting curve to solid with negligible thickness and height
a = List.Flatten(cr.Geometry(),-1);
b = a.Extrude(Vector.ZAxis(),0.2);
c = b.Thicken(0.01);
d = Solid.ByUnion(c).Translate(Vector.ZAxis(),-0.1);

//Create surface that exceeds extents of intersecting curves
e = d.BoundingBox.ToCuboid();
f = e.Centroid();
g = Plane.ByOriginNormal(f,Vector.ZAxis());
h = e.Scale(g,1.1,1.1,1);
i = List.FirstItem(g.Intersect(h));

//Cut out profile from surface extents to obtain enclosed surfaces
j = List.FirstItem(i.SubtractFrom(d)).Explode();
k = List.DropItems(List.SortByKey(j,j.Area)["sorted list"],-1);
l = PolyCurve.ByJoinedCurves(k.PerimeterCurves());

//Adjust for cutting tool thickness
m = l.Offset(0.05,false).Patch();
n = Math.Sum(m.Area);
5 Likes

Vikram,

I guess I don’t have to wait till Monday anymore. :slight_smile:

Thank you for the help.

1 Like