OCCNurbsCurve
- class compas_occ.geometry.OCCNurbsCurve(*args, **kwargs)
- Bases: - OCCCurve,- NurbsCurve- Class representing a NURBS curve based on the BSplineCurve of the OCC geometry kernel. - Parameters:
- namestr, optional
- The name of the curve. 
 
- Attributes:
- continuityint, read-only
- The degree of continuity of the curve. 
- degreeint, read-only
- The degree of the curve. 
- is_rationalbool, read-only
- Flag indicating that the curve is rational. 
- knotslist[float], read-only
- The knots of the curve, without multiplicities. 
- knotsequencelist[float], read-only
- The full vector of knots of the curve. 
- multiplicitieslist[int], read-only
- The multiplicities of the knots of the curve. 
- orderint, read-only
- The order of the curve (= degree + 1). 
- pointslist[Point], read-only
- The control points of the curve. 
- weightslist[float], read-only
- The weights of the control points of the curve. 
 
 - Examples - Curve from points… - >>> from compas.geometry import Point >>> from compas_occ.geometry import OCCNurbsCurve >>> points = [Point(0, 0, 0), Point(3, 6, 0), Point(6, -3, 3), Point(10, 0, 0)] >>> curve = OCCNurbsCurve.from_points(points) - Curve from parameters… - >>> from compas.geometry import Point >>> from compas_occ.geometry import OCCNurbsCurve >>> points = [Point(0, 0, 0), Point(3, 6, 0), Point(6, -3, 3), Point(10, 0, 0)] >>> curve = OCCNurbsCurve.from_parameters(points=points, weights=[1.0, 1.0, 1.0, 1.0], knots=[0.0, 1.0], multiplicities=[4, 4], degree=3) - Methods - Make an independent copy of the current curve. - Construct a NURBS curve from an arc. - Construct a NURBS curve from a circle. - Construct a NURBS curve from an ellipse. - Construct a NURBS curve by interpolating a set of points. - Construct a NURBS curve from a line. - Construct a NURBS curve from an existing OCC BSplineCurve. - Construct a NURBS curve from explicit curve parameters. - Construct a NURBS curve from control points. - Modifies this curve by joining it with another curve. - Returns a new curve that is the result of joining this curve with another. - Modifies this curve by segmenting it between the parameters u and v. - Returns a copy of this curve by segmenting it between the parameters u and v. - Inherited Methods - Converts the instance to a string. - Compute the axis aligned bounding box of the curve. - Computes the curve parameters where the curve is the closest to another given curve. - Compute the closest point on the curve to a given point. - Computes the points on curves where the curve is the closest to another given curve. - Compute the axis-aligned bounding box of the geometry. - Compute the oriented bounding box of the geometry. - Compute the curvature vector at a curve parameter. - Divide the curve into a specific number of equal length segments. - Divide the curve into a specific number of equal length segments. - Divide the curve into segments of a given length. - Return a new curve embedded in the parameter space of the surface. - Compute the local frame at a curve parameter. - Construct an object of this type from a JSON file. - Construct an object of this type from a JSON string. - Load a curve from an OBJ file. - Construct a curve from an existing OCC BSplineCurve. - Load a NURBS curve from an STP file. - Compute the length of the curve. - Compute the normal of the curve at a parameter. - Return a new curve that is the offset of this curve over the specified distance in the given direction. - Compute the parameter of a point on the curve at a given distance along the curve from a point at a given parameter. - Compute the point at a curve parameter. - Return a copy of the curve projected onto a surface. - Reverse the parametrisation of the curve. - Reverse a copy of the curve. - Rotate the geometry. - Returns a rotated copy of this geometry. - Scale the geometry. - Returns a scaled copy of this geometry. - Compute a hash of the data for comparison during version control using the sha256 algorithm. - Compute the tangent vector at a curve parameter. - Convert an object to its native data representation and save it to a JSON file. - Convert an object to its native data representation and save it to a JSON string. - Write the curve geometry to an OBJ file. - Convert the curve to a list of points. - Convert the curve to a polygon. - Convert the curve to a polyline. - Write the curve geometry to a STP file. - Transform this curve. - Returns a transformed copy of this geometry. - Translate the geometry. - Returns a translated copy of this geometry. - Validate the data against the object's data schema.