skidl.geometry module¶
- class skidl.geometry.BBox(*pts)[source]¶
Bases:
object
- property area¶
Return area of bounding box.
- property ctr¶
Return center point of bounding box.
- property h¶
Return the bounding box height.
- intersection(bbox)[source]¶
Return the bounding box of the intersection between the two bounding boxes.
- property ll¶
Return lower-left point of bounding box.
- property lr¶
Return lower-right point of bounding box.
- snap_resize(grid_spacing)[source]¶
Resize bbox so max and min points are on grid.
- Parameters:
grid_spacing (float) – Grid spacing.
- property ul¶
Return upper-left point of bounding box.
- property ur¶
Return upper-right point of bounding box.
- property w¶
Return the bounding box width.
- class skidl.geometry.Point(x, y)[source]¶
Bases:
object
- property magnitude¶
Get the distance of the point from the origin.
- property norm¶
Return a unit vector pointing from the origin to the point.