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

from_circle

Construct an edge from a circle.

from_curve

Construct an edge from a curve.

from_ellipse

from_line

Construct an edge from a line.

from_point_point

Construct an edge from two points.

from_vertex_vertex

Construct an edge from two vertices.

to_bezier

Convert the edge geometry to a bezier curve.

to_bspline

Convert the edge geometry to a bspline.

to_circle

Convert the edge geometry to a circle.

to_curve

Convert the edge geometry to a NURBS curve.

to_ellipse

Convert the edge geometry to an ellipse.

to_hyperbola

Convert the edge geometry to a hyperbola.

to_line

Convert the edge geometry to a line.

to_parabola

Convert the edge geometry to a parabola.

Inherited Methods

ToString

Converts the instance to a string.

copy

Make an independent copy of the data object.

from_data

Construct an object of this type from the provided data.

from_json

Construct an object from serialized data contained in a JSON file.

from_jsonstring

Construct an object from serialized data contained in a JSON string.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_data

Convert an object to its native data representation.

to_json

Serialize the data representation of an object to a JSON file.

to_jsonstring

Serialize the data representation of an object to a JSON string.

validate_data

Validate the object's data against its data schema.

validate_json

Validate the object's data against its json schema.