Skip to content

Commit 1bf6859

Browse files
committed
fix nurbs copy by using data
1 parent b2d386c commit 1bf6859

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/compas_occ/geometry/curves/nurbs.py

+12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from math import sqrt
2+
from copy import deepcopy
23

34
from compas.geometry import Point
45
from compas.geometry import Vector
@@ -437,6 +438,17 @@ def from_line(cls, line):
437438
# Methods
438439
# ==============================================================================
439440

441+
def copy(self):
442+
"""Make an independent copy of the current curve.
443+
444+
Returns
445+
-------
446+
:class:`compas_occ.geometry.OCCCurve`
447+
448+
"""
449+
cls = type(self)
450+
return cls.from_data(deepcopy(self.data))
451+
440452
def segment(self, u, v, precision=1e-3):
441453
"""Modifies this curve by segmenting it between the parameters u and v.
442454

0 commit comments

Comments
 (0)