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
BoundingBoxof a givenShape.Returns
Trueif the bounding box has possible dimensions.Create a
Shapefrom thisBoundingBox.Update this
BoundingBoxfrom anArc.Update this
BoundingBoxfrom aLine.Update this
BoundingBoxfrom aPoint.Update this
BoundingBoxfrom aShape.Update this
BoundingBoxfrom a numpy array.Update this
BoundingBoxfrom a single (x, y) point.- classmethod from_shape(shape: Shape) BoundingBox
Returns a
BoundingBoxof a givenShape.
- classmethod new() BoundingBox
- to_shape(attr: ElementAttributes) Shape
Create a
Shapefrom thisBoundingBox.
- update_arc(arc: Arc) None
Update this
BoundingBoxfrom anArc.
- update_line(line: Line) None
Update this
BoundingBoxfrom aLine.
- update_point(point: Point) None
Update this
BoundingBoxfrom aPoint.
- update_shape(shape: Shape) None
Update this
BoundingBoxfrom aShape.
- update_vec(v: ndarray[3]) None
Update this
BoundingBoxfrom a numpy array.
- update_xy(x: float, y: float) None
Update this
BoundingBoxfrom a single (x, y) point.