11from math import sqrt
22
3- from typing import Dict , List
43from compas .geometry import Point
54from compas .geometry import Vector
65from compas .geometry import Frame
@@ -62,7 +61,7 @@ class OCCNurbsCurve(NurbsCurve):
6261 ----------
6362 name : str, optional
6463 The name of the curve.
65-
64+
6665 Examples
6766 --------
6867 Curve from points...
@@ -134,7 +133,7 @@ def data(self, data):
134133 @classmethod
135134 def from_occ (cls , occ_curve ):
136135 """Construct a NURBS curve from an existing OCC BSplineCurve.
137-
136+
138137 Parameters
139138 ----------
140139 occ_curve : Geom_BSplineCurve
@@ -150,7 +149,7 @@ def from_occ(cls, occ_curve):
150149 @classmethod
151150 def from_parameters (cls , points , weights , knots , multiplicities , degree , is_periodic = False ):
152151 """Construct a NURBS curve from explicit curve parameters.
153-
152+
154153 Parameters
155154 ----------
156155 points : List[:class:`compas.geometry.Point`]
@@ -375,7 +374,7 @@ def from_line(cls, line):
375374
376375 def to_step (self , filepath , schema = "AP203" ):
377376 """Write the curve geometry to a STP file.
378-
377+
379378 Parameters
380379 ----------
381380 filepath : str
@@ -534,7 +533,7 @@ def is_rational(self):
534533
535534 def copy (self ):
536535 """Make an independent copy of the current curve.
537-
536+
538537 Returns
539538 -------
540539 :class:`OCCNurbsCurve`
@@ -551,7 +550,7 @@ def copy(self):
551550
552551 def transform (self , T ):
553552 """Transform this curve.
554-
553+
555554 Parameters
556555 ----------
557556 T : :class:`compas.geometry.Transformation`
@@ -566,7 +565,7 @@ def transform(self, T):
566565
567566 def transformed (self , T ):
568567 """Transform a copy of the curve.
569-
568+
570569 Parameters
571570 ----------
572571 T : :class:`compas.geometry.Transformation`
@@ -586,7 +585,7 @@ def reverse(self):
586585
587586 def space (self , n = 10 ):
588587 """Compute evenly spaced parameters over the curve domain.
589-
588+
590589 Parameters
591590 ----------
592591 n : int, optional
@@ -601,12 +600,12 @@ def space(self, n=10):
601600
602601 def xyz (self , n = 10 ):
603602 """Compute point locations corresponding to evenly spaced parameters over the curve domain.
604-
603+
605604 Parameters
606605 ----------
607606 n : int, optional
608607 The number of points in the discretisation.
609-
608+
610609 Returns
611610 -------
612611 List[:class:`compas.geometry.Point`]
@@ -794,7 +793,7 @@ def closest_points_curve(self, curve, return_distance=False):
794793
795794 def divide_by_count (self , count ):
796795 """Divide the curve into a specific number of equal length segments.
797-
796+
798797 Parameters
799798 ----------
800799 count : int
@@ -807,7 +806,7 @@ def divide_by_count(self, count):
807806
808807 def divide_by_length (self , length ):
809808 """Divide the curve into segments of specified length.
810-
809+
811810 Parameters
812811 ----------
813812 length : float
@@ -820,11 +819,11 @@ def divide_by_length(self, length):
820819
821820 def aabb (self , precision = 0.0 ):
822821 """Compute the axis aligned bounding box of the curve.
823-
822+
824823 Parameters
825824 ----------
826825 precision : float, optional
827-
826+
828827 Returns
829828 -------
830829 :class:`compas.geometry.Box`
@@ -837,11 +836,11 @@ def aabb(self, precision=0.0):
837836
838837 def obb (self , precision : float = 0.0 ):
839838 """Compute the oriented bounding box of the curve.
840-
839+
841840 Parameters
842841 ----------
843842 precision : float, optional
844-
843+
845844 Returns
846845 -------
847846 :class:`compas.geometry.Box`
@@ -850,11 +849,11 @@ def obb(self, precision: float = 0.0):
850849
851850 def length (self , precision = 1e-3 ):
852851 """Compute the length of the curve.
853-
852+
854853 Parameters
855854 ----------
856855 precision : float, optional
857-
856+
858857 Returns
859858 -------
860859 :obj:`float`
0 commit comments