BRepEdge
- class compas_occ.brep.BRepEdge(occ_edge=None)[source]
Bases:
compas.data.data.Data
Class representing an edge in the BRep of a geometric shape.
- Parameters
occ_edge (TopoDS_Edge) – An OCC BRep edge.
- Attributes
type (
BRepEdge.CurveType
, read-only) – The type of the geometric curve underlying the topological edge.is_line (bool, read-only) – True if the underlying curve is a line.
is_circle (bool, read-only) – True if the underlying curve is a circle.
is_ellipse (bool, read-only) – True if the underlying curve is an ellipse.
is_hyperbola (bool, read-only) – True if the underlying curve is a hyperbola.
is_parabola (bool, read-only) – True if the underlying curve is a parabola.
is_bezier (bool, read-only) – True if the underlying curve is a bezier curve.
is_bspline (bool, read-only) – True if the underlying curve is a bspline curve.
is_other (bool, read-only) – True if the underlying curve is an other type of curve.
vertices (list[
BRepVertex
], read-only) – The topological vertices of the edge.first_vertex (
BRepVertex
, read-only) – The first vertex with forward orientation.last_vertex (
BRepVertex
, read-only) – The first vertex with reversed orientation.curve (
OCCCurve
) – Curve geometry from the edge adaptor.
- Other Attributes
occ_edge (
TopoDS_Edge
) – The underlying OCC topological edge data structure.occ_adaptor (
BRepAdaptor_Curve
) – Edge adaptor for extracting curve geometry.
Methods
Construct an edge from a circle.
Construct an edge from a curve.
Construct an edge from a line.
Construct an edge from two points.
Construct an edge from two vertices.
Convert the edge geometry to a bezier curve.
Convert the edge geometry to a bspline.
Convert the edge geometry to a circle.
Convert the edge geometry to a NURBS curve.
Convert the edge geometry to an ellipse.
Convert the edge geometry to a hyperbola.
Convert the edge geometry to a line.
Convert the edge geometry to a parabola.
Inherited Methods
Converts the instance to a string.
Make an independent copy of the data object.
Construct an object of this type from the provided data.
Construct an object from serialized data contained in a JSON file.
Construct an object from serialized data contained in a JSON string.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Convert an object to its native data representation.
Serialize the data representation of an object to a JSON file.
Serialize the data representation of an object to a JSON string.
Validate the object's data against its data schema.
Validate the object's data against its json schema.