skidl.tools.kicad5.bboxes module

Calculate bounding boxes for part symbols and hierarchical sheets.

skidl.tools.kicad5.bboxes.calc_hier_label_bbox(label, dir)[source]

Calculate the bounding box for a hierarchical label.

Parameters:
  • label (str) – String for the label.

  • dir (str) – Orientation (“U”, “D”, “L”, “R”).

Returns:

Bounding box for the label and hierarchical terminal.

Return type:

BBox

skidl.tools.kicad5.bboxes.calc_symbol_bbox(part, **options)[source]

Return the bounding box of the part symbol.

Parameters:
  • part – Part object for which an SVG symbol will be created.

  • options (dict) – Various options to control bounding box calculation: graphics_only (boolean): If true, compute bbox of graphics (no text).

Returns: List of BBoxes for all units in the part symbol.

Note: V5 library format: https://www.compuphase.com/electronics/LibraryFileFormats.pdf