Symbol
Dataclasses describing the symbols found in “lib_symbols” of .kicad_sch files.
- class edea.kicad.schematic.symbol.PinElectricalType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
StrEnum
Different electrical types of a pin on a KiCad schematic.
- class edea.kicad.schematic.symbol.PinGraphicStyle(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
StrEnum
Different graphical styles for pins on a KiCad schematic symbol.
- class edea.kicad.schematic.symbol.PinNumber(text: str = '', effects: ~edea.kicad.common.Effects = <factory>)
Bases:
KicadSchExpr
The number of the pin.
- Parameters:
text – The pin number as a text.
effects – How the pin number is displayed.
- Variables:
kicad_expr_tag_name – The KiCad expression tag name for this element (“number”).
- effects: Effects
- class edea.kicad.schematic.symbol.PinName(text: str = '', effects: ~edea.kicad.common.Effects = <factory>)
Bases:
KicadSchExpr
The name of the pin.
- Parameters:
text – The pin name.
effects – How the pin name is displayed.
- Variables:
kicad_expr_tag_name – The KiCad expression tag name for this element (“name”).
- effects: Effects
- class edea.kicad.schematic.symbol.Property(key: str = '', value: str = '', at: tuple[float, float, ~typing.Literal[0, 90, 180, 270]] = (0, 0, 0), do_not_autoplace: bool = False, show_name: bool = False, effects: ~edea.kicad.common.Effects = <factory>)
Bases:
KicadSchExpr
A key value pair for storing user defined information.
- Parameters:
key – The name of the property.
value – The value of the property.
at – The X-Y coordinates of the property.
do_not_autoplace – Whether the autoplace of the key is allowed or not.
show_name – Whether the key is shown or not.
effects – How the text is displayed.
- Variables:
kicad_expr_tag_name – The KiCad expression tag name for this element (“property”).
- effects: Effects
- class edea.kicad.schematic.symbol.PinAlternate(name: str, electrical_type: PinElectricalType = 'unspecified', graphic_style: PinGraphicStyle = 'line')
Bases:
KicadSchExpr
An alternate pin.
- Parameters:
name
electrical_type
graphic_style
- Variables:
kicad_expr_tag_name – The KiCad expression tag name for this element (“alternate”).
- electrical_type: PinElectricalType = 'unspecified'
- graphic_style: PinGraphicStyle = 'line'
- class edea.kicad.schematic.symbol.Pin(electrical_type: ~edea.kicad.schematic.symbol.PinElectricalType = 'unspecified', graphic_style: ~edea.kicad.schematic.symbol.PinGraphicStyle = 'line', at: tuple[float, float, ~typing.Literal[0, 90, 180, 270]] = (0, 0, 0), length: float = 0, hide: bool = False, name: ~edea.kicad.schematic.symbol.PinName = <factory>, number: ~edea.kicad.schematic.symbol.PinNumber = <factory>, alternates: list[~edea.kicad.schematic.symbol.PinAlternate] = <factory>)
Bases:
KicadSchExpr
A pin.
- Parameters:
at – The X-Y coordinates and the rotation degree of the pin
length – The length of the pin.
hide – Whether the pin’s text is hidden or not.
name – The name of the pin.
number – The number of the pin.
alternates – A list of
PinAlternate
.
- electrical_type: PinElectricalType = 'unspecified'
- graphic_style: PinGraphicStyle = 'line'
- name: PinName
- number: PinNumber
- alternates: list[PinAlternate]
- class edea.kicad.schematic.symbol.PinNameSettings(offset: float = 0, hide: bool = False)
Bases:
KicadSchExpr
Pin’s name settings.
- param offset:
The pin name offset for all pin names of the symbol. If not defined, the pin name offset is 0.508mm (0.020”).
- param hide:
Whether the pin’s name is hidden or not.
- cvar kicad_expr_tag_name:
The KiCad expression tag name for this element (“pin_names”).
- class edea.kicad.schematic.symbol.PinNumberSettings(hide: bool = False)
Bases:
KicadSchExpr
Pins’ numbers settings.
- Parameters:
hide – Whether the pin’s number is hidden or not.
- Variables:
kicad_expr_tag_name – The KiCad expression tag name for this element (“pin_numbers”).
- class edea.kicad.schematic.symbol.SymbolGraphicText(private: bool = False, text: str = '', at: tuple[float, float, int] = (0, 0, 0), effects: ~edea.kicad.common.Effects = <factory>)
Bases:
KicadSchExpr
A graphic text element in a KiCad symbol.
- Parameters:
private – Whether the text is private or public.
text – The text content.
at – The X-Y coordinates and rotation angle of the text.
effects – How the text is displayed.
- Variables:
kicad_expr_tag_name – The KiCad expression tag name for this element (“text”).
- effects: Effects
- class edea.kicad.schematic.symbol.SymbolGraphicTextBox(text: str = '', at: tuple[float, float, ~typing.Literal[0, 90, 180, 270]] = (0, 0, 0), size: tuple[float, float] = (0, 0), stroke: ~edea.kicad.common.Stroke = <factory>, fill: ~edea.kicad.schematic.shapes.FillSimple | ~edea.kicad.schematic.shapes.FillColor | ~edea.kicad.schematic.shapes.FillTypeColor = <factory>, effects: ~edea.kicad.common.Effects = <factory>)
Bases:
KicadSchExpr
A graphic text box element in a KiCad symbol.
- Parameters:
text – The text content.
at – The X-Y coordinates and rotation angle of the text box.
size – The size of the text box.
stroke – The stroke style of the text box.
fill – The fill style of the text box.
effects – How the text box is displayed.
- Variables:
kicad_expr_tag_name – The KiCad expression tag name for this element (“text_box”).
- stroke: Stroke
- fill: FillSimple | FillColor | FillTypeColor
- effects: Effects
- class edea.kicad.schematic.symbol.SubSymbol(name: str, unit_name: str | None = None, polylines: list[~edea.kicad.schematic.shapes.Polyline] = <factory>, text_items: list[~edea.kicad.schematic.symbol.SymbolGraphicText] = <factory>, rectangles: list[~edea.kicad.schematic.shapes.Rectangle] = <factory>, text_boxes: list[~edea.kicad.schematic.symbol.SymbolGraphicTextBox] = <factory>, circles: list[~edea.kicad.schematic.shapes.Circle] = <factory>, arcs: list[~edea.kicad.schematic.shapes.Arc] = <factory>, pins: list[~edea.kicad.schematic.symbol.Pin] = <factory>, beziers: list[~edea.kicad.schematic.shapes.Bezier] = <factory>)
Bases:
KicadSchExpr
A sub-symbol within a KiCad symbol.
- Parameters:
name – The name of the sub-symbol.
polylines – A list of
Polyline
in the sub-symbol.text_items – A list of
SymbolGraphicText
in the sub-symbol.rectangles – A list of
Rectangle
in the sub-symbol.text_boxes – A list of
SymbolGraphicTextBox
in the sub-symbol.circles – A list of
Circle
in the sub-symbol.arcs – A list of
Arc
in the sub-symbol.pins – A list of
Pin
in the sub-symbol.beziers – A list of
Bezier
s in the sub-symbol.
- Variables:
kicad_expr_tag_name – The KiCad expression tag name for this element (“symbol”).
- polylines: list[Polyline]
- text_items: list[SymbolGraphicText]
- rectangles: list[Rectangle]
- text_boxes: list[SymbolGraphicTextBox]
- circles: list[Circle]
- arcs: list[Arc]
- pins: list[Pin]
- beziers: list[Bezier]
- class edea.kicad.schematic.symbol.LibSymbol(name: str, properties: list[~edea.kicad.schematic.symbol.Property] = <factory>, power: bool = False, pin_numbers: ~edea.kicad.schematic.symbol.PinNumberSettings = <factory>, pin_names: ~edea.kicad.schematic.symbol.PinNameSettings = <factory>, exclude_from_sim: bool | None = None, in_bom: bool = True, on_board: bool = True, pins: list[~edea.kicad.schematic.symbol.Pin] = <factory>, symbols: list[~edea.kicad.schematic.symbol.SubSymbol] = <factory>, polylines: list[~edea.kicad.schematic.shapes.Polyline] = <factory>, text_items: list[~edea.kicad.schematic.symbol.SymbolGraphicText] = <factory>, rectangles: list[~edea.kicad.schematic.shapes.Rectangle] = <factory>, circles: list[~edea.kicad.schematic.shapes.Circle] = <factory>, arcs: list[~edea.kicad.schematic.shapes.Arc] = <factory>)
Bases:
KicadSchExpr
A library symbol in KiCad.
- Parameters:
name – The name of the library symbol.
properties – A list of properties of the library symbol.
power – Whether the symbol represents power or not.
pin_numbers – The settings for pin numbers in the symbol.
pin_names – The settings for pin names in the symbol.
in_bom – Whether the symbol is included in the BOM or not.
on_board – Whether the symbol is on the board or not.
pins – A list of pins in the symbol.
symbols – A list of sub-symbols in the symbol.
polylines – A lst of polylines in the symbol.
text_items – A list of graphic text items in the symbol.
rectangles – A list of rectangles in the symbol.
circles – A list of circles in the symbol.
arcs – A list of arcs in the symbol.
- Variables:
kicad_expr_tag_name – The KiCad expression tag name for this element (“symbol”).
- properties: list[Property]
- pin_numbers: PinNumberSettings
- pin_names: PinNameSettings
- pins: list[Pin]
- symbols: list[SubSymbol]
- polylines: list[Polyline]
- text_items: list[SymbolGraphicText]
- rectangles: list[Rectangle]
- circles: list[Circle]
- arcs: list[Arc]