kigadgets.track

Track (PCB trace segment) handling for KiCad PCB objects.

This module provides the Track class for representing PCB traces/segments that connect electrical nets on specific copper layers.

Key features: - Direct instantiation - Inherits electrical connection capabilities from HasConnection - Geohashing for layout comparison

Classes

Track

Module Contents

class kigadgets.track.Track(start: kigadgets.units.CoordinateLike, end: kigadgets.units.CoordinateLike, layer: str = 'F.Cu', width: float | None = None, board: Board | None = None)

Bases: kigadgets.item.HasConnection, kigadgets.item.HasLayer, kigadgets.item.HasWidth, kigadgets.item.Selectable, kigadgets.item.BoardItem

digraph inheritance7629868bbd { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "BoardItem" [URL="../item/index.html#kigadgets.item.BoardItem",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base class for all PCB board items."]; "GeoHashable" -> "BoardItem" [arrowsize=0.5,style="setlinewidth(0.5)"]; "GeoHashable" [URL="../item/index.html#kigadgets.item.GeoHashable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base class for objects that can be geometrically hashed."]; "HasConnection" [URL="../item/index.html#kigadgets.item.HasConnection",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Mixin for board items with electrical connections."]; "GeoHashable" -> "HasConnection" [arrowsize=0.5,style="setlinewidth(0.5)"]; "HasLayer" [URL="../item/index.html#kigadgets.item.HasLayer",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Mixin for layer handling based on *strings* (like `'F.Cu'`, `'B.Silkscreen'`, `'User.12'`, etc.)."]; "GeoHashable" -> "HasLayer" [arrowsize=0.5,style="setlinewidth(0.5)"]; "HasWidth" [URL="../item/index.html#kigadgets.item.HasWidth",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Mixin for board items with width properties."]; "GeoHashable" -> "HasWidth" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Selectable" [URL="../item/index.html#kigadgets.item.Selectable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Mixin for board items that can be selected in the GUI."]; "GeoHashable" -> "Selectable" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Track" [URL="#kigadgets.track.Track",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "HasConnection" -> "Track" [arrowsize=0.5,style="setlinewidth(0.5)"]; "HasLayer" -> "Track" [arrowsize=0.5,style="setlinewidth(0.5)"]; "HasWidth" -> "Track" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Selectable" -> "Track" [arrowsize=0.5,style="setlinewidth(0.5)"]; "BoardItem" -> "Track" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
property start: kigadgets.Point
property end: kigadgets.Point
width = None
layer = 'F.Cu'
delete() None
geohash() int