Home/ Reference/ Curve & Node

shape.Curve.Length / Area / Closed

Curve length, enclosed area, whether it closes. Cut lines, material estimates, checking whether a shape is sealed — these three readings cover it.

Signature

shape.Curve.Length / Area / Closed

Notes

Curve length, enclosed area, whether it closes. Cut lines, material estimates, checking whether a shape is sealed — these three readings cover it.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
shape = app.ActiveSelectionRange(1)
shape.ConvertToCurves()
c = shape.Curve

print("Length: ", c.Length)
print("Enclosed area: ", c.Area)
print("Closed: ", c.Closed)                        # True/False
print("Clockwise: ", c.IsClockwise)

About this section: Curve & Node

Curve & Node — subpaths and nodes.

Other entries in this section