BoundingBox
- class BoundingBox(x_min: float, x_max: float, y_min: float, y_max: float)
Dataclass that represents an axis-aligned bounding box.
Attributes
Methods
Returns a
BoundingBox
of a givenShape
.Returns
True
if the bounding box has possible dimensions.Create a
Shape
from thisBoundingBox
.Update this
BoundingBox
from anArc
.Update this
BoundingBox
from aLine
.Update this
BoundingBox
from aPoint
.Update this
BoundingBox
from aShape
.Update this
BoundingBox
from a numpy array.Update this
BoundingBox
from a single (x, y) point.- classmethod from_shape(shape: Shape) BoundingBox
Returns a
BoundingBox
of a givenShape
.
- classmethod new() BoundingBox
- to_shape(attr: ElementAttributes) Shape
Create a
Shape
from thisBoundingBox
.
- update_arc(arc: Arc) None
Update this
BoundingBox
from anArc
.
- update_line(line: Line) None
Update this
BoundingBox
from aLine
.
- update_point(point: Point) None
Update this
BoundingBox
from aPoint
.
- update_shape(shape: Shape) None
Update this
BoundingBox
from aShape
.
- update_vec(v: ndarray[3]) None
Update this
BoundingBox
from a numpy array.
- update_xy(x: float, y: float) None
Update this
BoundingBox
from a single (x, y) point.