OCCCurve2d
¤
Class representing a general 2D curve object ussually generated through an embedding in a surface.
Parameters:
-
name–The name of the curve.
Attributes:
-
dimension(int) –The dimension of the curve is always 2.
-
domain(tuple[float, float]) –The domain of the parameter space of the curve.
-
end(Point) –The end point of the curve.
-
is_closed(bool) –Flag indicating that the curve is closed.
-
is_periodic(bool) –Flag indicating that the curve is periodic.
-
start(Point) –The start point of the curve.
Functions¤
curvature_at
¤
Compute the curvature vector at a curve parameter.
Parameters:
-
t(float) –The curve parameter.
Returns:
-
Vector–
Raises:
-
ValueError–If the parameter is not in the curve domain.
frame_at
¤
Compute the local frame at a curve parameter.
Parameters:
-
t(float) –The curve parameter.
Returns:
-
Frame–
Raises:
-
ValueError–If the parameter is not in the curve domain.
from_native
classmethod
¤
from_native(native_curve: Geom2d_Curve) -> OCCCurve2d
Construct a NURBS curve from an existing OCC BSplineCurve.
Parameters:
-
native_curve(Geom2d_Curve) –An OCC Geom2d_Curve object.
Returns:
from_occ
classmethod
¤
from_occ(native_curve: Geom2d_Curve) -> OCCCurve2d
Construct a NURBS curve from an existing OCC BSplineCurve.
Parameters:
-
native_curve(Geom2d_Curve) –An OCC Geom2d_Curve object.
Returns:
Warnings
.. deprecated:: 1.3
Use from_native instead.
point_at
¤
Compute the point at a curve parameter.
Parameters:
-
t(float) –The curve parameter.
Returns:
-
Point–
Raises:
-
ValueError–If the parameter is not in the curve domain.
tangent_at
¤
Compute the tangent vector at a curve parameter.
Parameters:
-
t(float) –The curve parameter.
Returns:
-
Vector–
Raises:
-
ValueError–If the parameter is not in the curve domain.