OCCCurve2d
- class compas_occ.geometry.OCCCurve2d(*args, **kwargs)
- Bases: - Curve- Class representing a general 2D curve object ussually generated through an embedding in a surface. - Parameters:
- namestr, optional
- The name of the curve. 
 
- Attributes:
- dimensionint, read-only
- The dimension of the curve is always 2. 
- domaintuple[float, float], read-only
- The domain of the parameter space of the curve. 
- endPoint, read-only
- The end point of the curve. 
- is_closedbool, read-only
- Flag indicating that the curve is closed. 
- is_periodicbool, read-only
- Flag indicating that the curve is periodic. 
- startPoint, read-only
- The start point of the curve. 
 
 - Methods - Make an independent copy of the current curve. - Compute the curvature vector at a curve parameter. - Compute the local frame at a curve parameter. - Construct a NURBS curve from an existing OCC BSplineCurve. - Construct a NURBS curve from an existing OCC BSplineCurve. - Compute the point at a curve parameter. - Compute the tangent vector at a curve parameter. - Convert the curve to a polyline. - Write the curve geometry to a STP file. - Inherited Methods - Converts the instance to a string. - Compute the axis-aligned bounding box of the curve. - Compute the closest point on the curve to a given point. - Compute the axis-aligned bounding box of the geometry. - Compute the oriented bounding box of the geometry. - Compute the curve parameters that divide the curve into a specific number of equal length segments. - Compute the curve parameters that divide the curve into segments of specified length. - 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. - Load a curve from a STP file. - Compute the length of the curve. - Compute the normal of the curve at a parameter. - 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. - 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. - Transform the local coordinate system of the 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.