Common
- class edea.kicad.common.StrokeType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
StrEnum
Available stroke types that can be used for lines, outlines, etc.
- class edea.kicad.common.Stroke(width: float = 0, type: StrokeType = 'default', color: tuple[int, int, int, float] = (0, 0, 0, 0.0))
Bases:
KicadExpr
Properties of a stroke used within KiCad expressions.
- Parameters:
width – The line width of the graphic object.
type – The line style of the graphic object.
color – The red, green, blue, and alpha color settings.
- type: StrokeType = 'default'
- class edea.kicad.common.PaperFormat(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
StrEnum
Various standard paper formats like A series A0, A1, B series, etc.
- class edea.kicad.common.PaperOrientation(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
StrEnum
The two common paper shown modes: landscape and portrait.
- class edea.kicad.common.PaperUser(format: Literal['User'] = 'User', width: float = 0, height: float = 0)
Bases:
KicadExpr
A custom KiCad paper size definition.
- Parameters:
format – Always set to “User” to indicate a custom format.
width – The width of the paper in KiCad units.
height – The height of the paper in KiCad units
- Variables:
kicad_expr_tag_name – The KiCad expression tag name for this element (“paper”).
- class edea.kicad.common.PaperStandard(format: PaperFormat = 'A4', orientation: PaperOrientation = '')
Bases:
KicadExpr
A standard KiCad paper size.
- Parameters:
format – The paper format from the PaperFormat enum.
orientation – The paper orientation from the PaperOrientation enum.
- Variables:
kicad_expr_tag_name – The KiCad expression tag name for this element (“paper”).
- format: PaperFormat = 'A4'
- orientation: PaperOrientation = ''
- class edea.kicad.common.PolygonArc(start: tuple[float, float], mid: tuple[float, float], end: tuple[float, float])
Bases:
KicadExpr
A polygonal arc KiCad expression element.
- Parameters:
start – The starting X-Y coordinates of the arc.
mid – The midpoint X-Y coordinates of the arc.
end – The ending X-Y coordinates of the arc.
- Variables:
kicad_expr_tag_name – The KiCad expression tag name for this element (“arc”).
- class edea.kicad.common.XY(x: float, y: float)
Bases:
KicadExpr
A 2D coordinate point.
- Parameters:
x – The X coordinate of the point.
y – The Y coordinate of the point.
- class edea.kicad.common.Pts(xys: list[~edea.kicad.common.XY] = <factory>, arcs: list[~edea.kicad.common.PolygonArc] = <factory>)
Bases:
KicadExpr
A collection of points and arcs.
KiCad coordinate point list, KiCad arc
- Parameters:
xys – A list of XY instances representing points.
arcs – A list of PolygonArc instances representing arcs.
- xys: list[XY]
- arcs: list[PolygonArc]
- class edea.kicad.common.Image(at: tuple[float, float], scale: float | None = None, uuid: ~uuid.UUID = <factory>, data: list[str] = <factory>)
Bases:
KicadExpr
An embedded image in a KiCad expression.
- Parameters:
at – The X-Y coordinates specifying the image placement.
scale – The scale factor of the image.
uuid – The unique identifier (UUID) for the image.
data – The image data in the portable network graphics format (PNG) encoded with MIME type base64.
- class edea.kicad.common.TitleBlockComment(number: int = 1, text: str = '')
Bases:
KicadExpr
A comment within a KiCad title block.
- Parameters:
number – A sequential comment number.
text – The comment text content.
- Variables:
kicad_expr_tag_name – The KiCad expression tag name for this element (“comment”).
- class edea.kicad.common.TitleBlock(title: str = '', date: str = '', rev: str = '', company: str = '', comments: list[~edea.kicad.common.TitleBlockComment] = <factory>)
Bases:
KicadExpr
The contents of a KiCad title block.
- Parameters:
title – The title of the document.
date – The document date using the YYYY-MM-DD format.
rev – The revision number of the document.
company – The company name associated with the document.
comments – The document comments where N is a number from 1 to 9 and COMMENT is a quoted string.
- comments: list[TitleBlockComment]
- class edea.kicad.common.Font(face: str | None = None, size: tuple[float, float] = (1.27, 1.27), thickness: float | None = None, bold: bool = False, italic: bool = False, color: tuple[int, int, int, float] = (0, 0, 0, 1.0))
Bases:
KicadExpr
The font style for KiCad expressions.
- Parameters:
face – The font face name. Defaults to None.
size – The font size (width, height) in KiCad units. Defaults to (1.27, 1.27).
thickness – The font thickness.
bold – Whether the font is bold or not.
italic – Whether the font is italic or not.
color – The font color as a 4-tuple of integers (R, G, B, A).
- class edea.kicad.common.Effects(font: ~edea.kicad.common.Font = <factory>, justify: list[~typing.Literal['left', 'right', 'top', 'bottom', 'mirror']] = <factory>, hide: bool = False, href: str | None = None)
Bases:
KicadExpr
The text effects for KiCad expressions.
- Parameters:
font – How the text is shown.
justify – Text justified horizontally right or left and/or vertically top or bottom and/or mirrored.
hide – Whether to hide the text element or not.
href – A hyperlink reference.
- font: Font