Common $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#module-edea.kicad.common">
- class edea.kicad.common.StrokeType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None) $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.StrokeType" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.StrokeType'">
Bases:
StrEnum
Available stroke types that can be used for lines, outlines, etc.
- DASH = 'dash' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.StrokeType.DASH" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.StrokeType.DASH'">
Evenly spaced dashes.
- DASH_DOT = 'dash_dot' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.StrokeType.DASH_DOT" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.StrokeType.DASH_DOT'">
Alternating dashes and dots.
- DASH_DOT_DOT = 'dash_dot_dot' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.StrokeType.DASH_DOT_DOT" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.StrokeType.DASH_DOT_DOT'">
Alternating dashes and double dots.
- SOLID = 'solid' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.StrokeType.SOLID" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.StrokeType.SOLID'">
Continuous solid.
- class edea.kicad.common.Stroke(width: float = 0, type: StrokeType = 'default', color: tuple[int, int, int, float] = (0, 0, 0, 0.0)) $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Stroke" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Stroke'">
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' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Stroke.type" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Stroke.type'">
- color: tuple[int, int, int, float] = (0, 0, 0, 0.0) $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Stroke.color" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Stroke.color'">
- kicad_expr_tag_name: ClassVar[Literal['stroke']] = 'stroke' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Stroke.kicad_expr_tag_name" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Stroke.kicad_expr_tag_name'">
- classmethod from_list(exprs: list[str | QuotedStr | list[str | QuotedStr | SExprList]]) Self $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Stroke.from_list" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Stroke.from_list'">
Turns an s-expression list of arguments into an EDeA dataclass. Note that you omit the tag name in the s-expression so e.g. for (symbol “foo” (pin 1)) you would pass [“foo”, [“pin”, 1]] to this method.
- Returns:
An instance of the ‘KicadExpr’ created from the KiCad expression data.
- class edea.kicad.common.PaperFormat(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None) $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.PaperFormat" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.PaperFormat'">
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) $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.PaperOrientation" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.PaperOrientation'">
Bases:
StrEnum
The two common paper shown modes: landscape and portrait.
- LANDSCAPE = '' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.PaperOrientation.LANDSCAPE" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.PaperOrientation.LANDSCAPE'">
The default value (empty string), represents horizontal orientation.
- PORTRAIT = 'portrait' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.PaperOrientation.PORTRAIT" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.PaperOrientation.PORTRAIT'">
Represents vertical orientation.
- class edea.kicad.common.PaperUser(format: Literal['User'] = 'User', width: float = 0, height: float = 0) $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.PaperUser" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.PaperUser'">
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”).
- kicad_expr_tag_name: ClassVar[Literal['paper']] = 'paper' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.PaperUser.kicad_expr_tag_name" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.PaperUser.kicad_expr_tag_name'">
- as_dimensions_mm() tuple[float, float] $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.PaperUser.as_dimensions_mm" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.PaperUser.as_dimensions_mm'">
Calculates the paper dimensions based on the user-defined width and height.
- Returns:
A tuple containing the width and height of the paper.
- class edea.kicad.common.PaperStandard(format: PaperFormat = 'A4', orientation: PaperOrientation = '') $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.PaperStandard" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.PaperStandard'">
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' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.PaperStandard.format" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.PaperStandard.format'">
- orientation: PaperOrientation = '' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.PaperStandard.orientation" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.PaperStandard.orientation'">
- kicad_expr_tag_name: ClassVar[Literal['paper']] = 'paper' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.PaperStandard.kicad_expr_tag_name" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.PaperStandard.kicad_expr_tag_name'">
- as_dimensions_mm() tuple[float, float] $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.PaperStandard.as_dimensions_mm" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.PaperStandard.as_dimensions_mm'">
Calculates dimensions of the paper in millimeters based on the standard.
- Returns:
A tuple containing the width and height of the paper.
- class edea.kicad.common.PolygonArc(start: tuple[float, float], mid: tuple[float, float], end: tuple[float, float]) $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.PolygonArc" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.PolygonArc'">
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”).
- kicad_expr_tag_name: ClassVar[Literal['arc']] = 'arc' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.PolygonArc.kicad_expr_tag_name" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.PolygonArc.kicad_expr_tag_name'">
- class edea.kicad.common.XY $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.XY" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.XY'">
Bases:
KicadExpr
A 2D coordinate point.
- Parameters:
x – The X coordinate of the point.
y – The Y coordinate of the point.
- kicad_expr_tag_name: ClassVar[Literal['xy']] = 'xy' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.XY.kicad_expr_tag_name" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.XY.kicad_expr_tag_name'">
- class edea.kicad.common.Pts $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Pts" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Pts'">
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] $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Pts.xys" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Pts.xys'">
- arcs: list[PolygonArc] $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Pts.arcs" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Pts.arcs'">
- kicad_expr_tag_name: ClassVar[Literal['pts']] = 'pts' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Pts.kicad_expr_tag_name" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Pts.kicad_expr_tag_name'">
- classmethod from_list(exprs: list[str | QuotedStr | list[str | QuotedStr | SExprList]]) Self $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Pts.from_list" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Pts.from_list'">
Turns an s-expression list of arguments into an EDeA dataclass. Note that you omit the tag name in the s-expression so e.g. for (symbol “foo” (pin 1)) you would pass [“foo”, [“pin”, 1]] to this method.
- Returns:
An instance of the ‘KicadExpr’ created from the KiCad expression data.
- to_list() list[str | QuotedStr | list[str | QuotedStr | SExprList]] $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Pts.to_list" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Pts.to_list'">
Turns a a KicadExpr into an s-expression list. Note that the initial keyword is omitted in the return of this function. It can be retrieved by accessing .kicad_expr_tag_name.
- Returns:
A list representing the KiCad expression data structure generated from the object.
- class edea.kicad.common.Image(at: tuple[float, float], scale: float | None = None, uuid: ~uuid.UUID = <factory>, data: list[str] = <factory>) $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Image" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Image'">
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.
- kicad_expr_tag_name: ClassVar[Literal['image']] = 'image' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Image.kicad_expr_tag_name" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Image.kicad_expr_tag_name'">
- class edea.kicad.common.TitleBlockComment(number: int = 1, text: str = '') $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.TitleBlockComment" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.TitleBlockComment'">
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”).
- kicad_expr_tag_name: ClassVar[Literal['comment']] = 'comment' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.TitleBlockComment.kicad_expr_tag_name" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.TitleBlockComment.kicad_expr_tag_name'">
- class edea.kicad.common.TitleBlock(title: str = '', date: str = '', rev: str = '', company: str = '', comments: list[~edea.kicad.common.TitleBlockComment] = <factory>) $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.TitleBlock" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.TitleBlock'">
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] $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.TitleBlock.comments" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.TitleBlock.comments'">
- kicad_expr_tag_name: ClassVar[Literal['title_block']] = 'title_block' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.TitleBlock.kicad_expr_tag_name" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.TitleBlock.kicad_expr_tag_name'">
- 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)) $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Font" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Font'">
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).
- size: tuple[float, float] = (1.27, 1.27) $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Font.size" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Font.size'">
- color: tuple[int, int, int, float] = (0, 0, 0, 1.0) $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Font.color" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Font.color'">
- kicad_expr_tag_name: ClassVar[Literal['font']] = 'font' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Font.kicad_expr_tag_name" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Font.kicad_expr_tag_name'">
- 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) $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Effects" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Effects'">
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 $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Effects.font" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Effects.font'">
- justify: list[Literal['left', 'right', 'top', 'bottom', 'mirror']] $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Effects.justify" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Effects.justify'">
- kicad_expr_tag_name: ClassVar[Literal['effects']] = 'effects' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.Effects.kicad_expr_tag_name" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.Effects.kicad_expr_tag_name'">
- exception edea.kicad.common.VersionError $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.common.VersionError" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.common.VersionError'">
Bases:
ValueError
Source file was produced with an unsupported KiCad version.