kigadgets.module ================ .. py:module:: kigadgets.module .. autoapi-nested-parse:: Footprint (module) handling for KiCad PCB components. This module provides classes for representing PCB footprints, which contain pads, graphical elements, text labels, and electrical connections. Key features: - Footprint creation from libraries and copying existing footprints - Management of reference designators and component values - Access to pads and graphical items within footprints - Geohashing for layout comparison Attributes ---------- .. autoapisummary:: kigadgets.module.Module kigadgets.module.ModuleLine kigadgets.module.ModuleLabel Classes ------- .. autoapisummary:: kigadgets.module.FootprintLabel kigadgets.module.FootprintLine kigadgets.module.Footprint Functions --------- .. autoapisummary:: kigadgets.module.wrap_footprint_item Module Contents --------------- .. py:class:: FootprintLabel Bases: :py:obj:`kigadgets.drawing.TextPCB` .. autoapi-inheritance-diagram:: kigadgets.module.FootprintLabel :parts: 1 wrapper for `TEXTE_MODULE` (old) or `FP_TEXT` .. py:property:: visible :type: bool .. py:class:: FootprintLine Bases: :py:obj:`kigadgets.item.HasLayer`, :py:obj:`kigadgets.item.Selectable`, :py:obj:`kigadgets.item.BoardItem` .. autoapi-inheritance-diagram:: kigadgets.module.FootprintLine :parts: 1 Wrapper for `EDGE_MODULE` (old) or `FP_SHAPE` .. py:function:: wrap_footprint_item(item: Any) -> Union[FootprintLine, FootprintLabel] .. py:class:: Footprint(ref: Optional[str] = None, pos: Optional[kigadgets.units.CoordinateLike] = None, board: Optional[kigadgets.board.Board] = None) Bases: :py:obj:`kigadgets.item.HasPosition`, :py:obj:`kigadgets.item.HasOrientation`, :py:obj:`kigadgets.item.Selectable`, :py:obj:`kigadgets.item.BoardItem` .. autoapi-inheritance-diagram:: kigadgets.module.Footprint :parts: 1 .. py:method:: load_from_library(library_path: str, name: str) -> Optional[Footprint] :staticmethod: .. py:property:: reference :type: str .. py:property:: reference_label :type: FootprintLabel Caches the wrapped FootprintLabel so that subsequent accesses return the same object. .. py:property:: value :type: str .. py:property:: value_label :type: FootprintLabel Caches the wrapped FootprintLabel so that subsequent accesses return the same object. .. py:property:: graphical_items :type: List[Union[FootprintLine, FootprintLabel]] Text and drawings of module iterator. .. py:method:: flip() -> None .. py:property:: layer :type: str .. py:property:: lib_name :type: str .. py:property:: fp_name :type: str .. py:method:: copy(ref: str, pos: Optional[kigadgets.units.CoordinateLike] = None, board: Optional[Board] = None) -> Footprint Create a copy of an existing module on the same board A new reference designator is required, example:: mod2 = mod1.copy('U2') mod2.reference == 'U2' # True mod2 is automatically placed in mod1.board .. py:property:: pads :type: List[kigadgets.pad.Pad] .. py:method:: remove(element: Union[kigadgets.pad.Pad, FootprintLine, FootprintLabel], permanent: bool = False) -> None Makes it so Ctrl-Z works. Keeps a reference to the element in the python pcb object, so it persists for the life of that object .. py:method:: restore_removed() -> None .. py:method:: geohash() -> int .. py:data:: Module .. py:data:: ModuleLine .. py:data:: ModuleLabel