OCCBrepEdge

class compas_occ.brep.OCCBrepEdge(occ_edge)

Bases: BrepEdge

Class representing an edge in the BRep of a geometric shape.

Parameters:
occ_edgeTopoDS_Edge

An OCC BRep edge.

Attributes:
curveOCCCurve

Curve geometry from the edge adaptor.

first_vertexBrepVertex, read-only

The first vertex with forward orientation.

is_linebool, read-only

True if the underlying curve is a line.

is_circlebool, read-only

True if the underlying curve is a circle.

is_ellipsebool, read-only

True if the underlying curve is an ellipse.

is_hyperbolabool, read-only

True if the underlying curve is a hyperbola.

is_parabolabool, read-only

True if the underlying curve is a parabola.

is_bezierbool, read-only

True if the underlying curve is a bezier curve.

is_bsplinebool, read-only

True if the underlying curve is a bspline curve.

is_otherbool, read-only

True if the underlying curve is an other type of curve.

last_vertexBrepVertex, read-only

The first vertex with reversed orientation.

verticeslist[BrepVertex], read-only

The topological vertices of the edge.

typeBrepEdge.CurveType, read-only

The type of the geometric curve underlying the topological edge.

Methods

from_circle

Construct an edge from a circle.

from_curve

Construct an edge from a curve.

from_ellipse

Construct an edge from an 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.

is_equal

Check if this edge is equal to another edge.

is_same

Check if this edge is the same as another edge.

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_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_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

from_points

Construct an edge from two points.

from_vertices

Construct an edge from two vertices.

sha256

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

to_curve

Get a curve from this edge's geometry.

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

validate_data

Validate the data against the object's data schema.