BrepEdge

class compas.geometry.BrepEdge(name=None)[source]

Bases: Data

An interface for a Brep Edge

Attributes
  • is_line (bool, read-only) – Returns True if this edge is a line, False otherwise.

  • is_circle (bool, read-only) – Returns True if this edge is a circle, False otherwise.

  • is_ellipse (bool, read-only) – Returns True if this edge is an ellipse, False otherwise.

  • is_hyperbola (bool, read-only) – Returns True if this edge is a hyperbola, False otherwise.

  • is_parabola (bool, read-only) – Returns True if this edge is a parabola, False otherwise.

  • is_bezier (bool, read-only) – Returns True if this edge is a bezier, False otherwise.

  • is_bspline (bool, read-only) – Returns True if this edge is a bspline, False otherwise.

  • is_other (bool, read-only) – Returns True if this edge is of another shape, False otherwise.

  • is_valid (bool, read-only) – Returns True if this edge is valid, False otherwise.

  • vertices (list[BrepVertex], read-only) – Gets the list of vertices which compound this edge.

  • first_vertex (BrepVertex) – Returns the first vertex of this edge.

  • last_vertex (BrepVertex) – Returns the last vertex of this edge.

  • curve (Curve) – Returns the curve geometry of this 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_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_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.