skidl.schematics.geometry module¶
- class skidl.schematics.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.schematics.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.
- class skidl.schematics.geometry.Tx(a=1, b=0, c=0, d=1, dx=0, dy=0)[source]¶
Bases:
object
- classmethod from_symtx(symtx)[source]¶
Return a Tx() object that implements the “HVLR” geometric operation sequence.
- property origin¶
Return the (dx, dy) translation as a Point.
- property scale¶
Return the scaling factor.