Skip to content

Commit e7fe77a

Browse files
committed
add conversion to compas for rhino curve
1 parent 7638101 commit e7fe77a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/compas_rhino/conversions/curve.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,18 @@ def geometry(self, geometry):
5353
raise ConversionError('The geometry cannot be converted to a curve.')
5454
self._geometry = geometry
5555

56+
def to_compas(self):
57+
"""Convert the curve to a COMPAS curve.
58+
59+
Returns
60+
-------
61+
:class:`compas_rhino.geometry.RhinoNurbsCurve`
62+
"""
63+
from compas.geometry import NurbsCurve
64+
curve = NurbsCurve()
65+
curve.rhino_curve = self.geometry
66+
return curve
67+
5668
def to_compas_circle(self):
5769
"""Convert the curve to a COMPAS circle.
5870

0 commit comments

Comments
 (0)