Line
- class Line(start: ndarray[3], end: ndarray[3], attributes: ElementAttributes, rectify_endpoints: bool = True)
A
Line
represents a line segment in space.Attributes
The start of the line.
The end of the line.
The
Carrier
underlying this element.The
ElementAttributes
of this element.Methods
Returns the boolean difference between this element and another.
Returns
True
if this element is coincident with another.Returns
True
ifpoint
is coincident to this element.Returns
True
if this element is equivalent to another.Returns the
Line
specified by the givenLineCarrier
and the given range.Returns
True
if this element is embedded in another.Transform this
Line
by a givenTransformation
.- __le__(other)
Calls
is_embedded_in()
.
- __rmatmul__(transformation: Transformation) T_co
Computes
transformable.transform(t)
when performingt @ transformable
for aTransformation
t
andTransformableMixin
transformable
.
- __sub__(other)
Calls
boolean_subtract()
.
- boolean_subtract(other: Line) List[Line]
Returns the boolean difference between this element and another.
- coincident_with(other: Line) bool
Returns
True
if this element is coincident with another. This occurs when the result of maximizing the two elements returns an element that both are embedded in (seeis_embedded_in()
).Specifically, the two elements must be coequal and at least one part of the boundary of one element must be contained within the boundary of the other.
Fuzzy with tolerance.
- contains_point(point: ArrayLike) bool
Returns
True
ifpoint
is coincident to this element. Fuzzy with tolerance.
- equivalent_to(other: Line) bool
Returns
True
if this element is equivalent to another. They must be coequal and have equivalent boundaries. Fuzzy with tolerance.
- classmethod from_carrier_and_range(carrier: LineCarrier, projected_range: Tuple[float, float], attributes: ElementAttributes) Line
Returns the
Line
specified by the givenLineCarrier
and the given range. This range is equivalent to(carrier.project(start), carrier.project(end))
.
- is_embedded_in(other: Line) bool
Returns
True
if this element is embedded in another. This occurs when the result of maximizing the two elements returns an element equivalent to the other.Specifically, the two elements must be coequal and the boundary of this element must be entirely contained within the boundary of the other.
Fuzzy with tolerance.
- transform(transformation: Transformation) Line
Transform this
Line
by a givenTransformation
.
- attributes
The
ElementAttributes
of this element. These must be equatable and hashable and are made to be immutable upon carrier initialization.
- end
The end of the line.
- start
The start of the line.