File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
src/compas_rhino/geometry Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,17 @@ def from_selection(cls):
6565 guid = compas_rhino .select_curve ()
6666 return cls (guid )
6767
68+ def length (self ):
69+ """Return the length of the curve.
70+
71+ Returns
72+ -------
73+ float
74+ The curve's length.
75+
76+ """
77+ return rs .CurveLength (self .guid )
78+
6879 def is_line (self ):
6980 """Determine if the curve is a line.
7081
@@ -101,6 +112,18 @@ def is_polyline(self):
101112 rs .CurveDegree (self .guid ) == 1 and
102113 len (rs .CurvePoints (self .guid )) > 2 )
103114
115+ def is_closed (self ):
116+ """Assess if the curve is closed.
117+
118+ Returns
119+ -------
120+ bool
121+ True if the curve is closed. False otherwise.
122+
123+ """
124+
125+ return rs .IsCurveClosed (self .guid )
126+
104127 def control_points (self ):
105128 """Get the control points of a curve.
106129
You can’t perform that action at this time.
0 commit comments