BrepEdge

class compas.geometry.BrepEdge[source]

Bases: Data

An interface for a Brep Edge

Attributes:
curvecompas.geometry.Curve

Returns the curve geometry of this edge.

first_vertexcompas.geometry.BrepVertex

Returns the first vertex of this edge.

is_linebool, read-only

Returns True if this edge is a line, False otherwise.

is_circlebool, read-only

Returns True if this edge is a circle, False otherwise.

is_ellipsebool, read-only

Returns True if this edge is an ellipse, False otherwise.

is_hyperbolabool, read-only

Returns True if this edge is a hyperbola, False otherwise.

is_parabolabool, read-only

Returns True if this edge is a parabola, False otherwise.

is_bezierbool, read-only

Returns True if this edge is a bezier, False otherwise.

is_bsplinebool, read-only

Returns True if this edge is a bspline, False otherwise.

is_otherbool, read-only

Returns True if this edge is of another shape, False otherwise.

orientationliteral(BrepOrientation), read-only

Returns the orientation of this edge. One of: FORWARD, REVERSED, INTERNAL, EXTERNAL.

typeliteral(CurveType), read-only

Returns the type of this edge. One of: LINE, CIRCLE, ELLIPSE, HYPERBOLA, PARABOLA, BEZIER, BSPLINE, OTHER.

verticeslist[compas.geometry.BrepVertex], read-only

Gets the list of vertices which compound this edge.

last_vertexcompas.geometry.BrepVertex

Returns the last vertex of this edge.

lengthfloat, read-only

Returns the length of this edge.

native_edgeAny

The underlying edge object. Type is backend-dependent.

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_points

Construct an edge from two points.

from_vertices

Construct an edge from two vertices.

to_bezier

Get a bezier from this edge's geometry.

to_bspline

Get a bspline from this edge's geometry.

to_circle

Get a circle from this edge's geometry.

to_curve

Get a curve from this edge's geometry.

to_ellipse

Get an ellipse from this edge's geometry.

to_hyperbola

Get a hyperbola from this edge's geometry.

to_line

Get a line from this edge's geometry.

to_parabola

Get a parabola from this edge's geometry.

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.

sha256

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

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.