Shapes
Dataclasses describing the graphic items found in .kicad_sch files.
- class edea.kicad.schematic.shapes.FillType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
StrEnum
Different types of fills.
- class edea.kicad.schematic.shapes.FillSimple(type: FillType = 'background')
Bases:
KicadSchExpr
A simple fill style.
- Parameters:
type – How the object is filled.
- Variables:
kicad_expr_tag_name – The tag name for KiCad expression.
- type: FillType = 'background'
- class edea.kicad.schematic.shapes.FillColor(color: tuple[int, int, int, float] = (0, 0, 0, 0))
Bases:
KicadSchExpr
A fill style with a specific color.
- Parameters:
color – The RGBA color value for the fill.
- Variables:
kicad_expr_tag_name – The tag name for KiCad expression.
- class edea.kicad.schematic.shapes.FillTypeColor(type: Literal['color'] = 'color', color: tuple[int, int, int, float] = (0, 0, 0, 0))
Bases:
KicadSchExpr
A color fill style with a specific color.
- Parameters:
type – The type of fill.
color – The RGBA color value for the fill.
- Variables:
kicad_expr_tag_name – The tag name for KiCad expression.
- class edea.kicad.schematic.shapes.Polyline(pts: ~edea.kicad.common.Pts = <factory>, stroke: ~edea.kicad.common.Stroke = <factory>, fill: ~edea.kicad.schematic.shapes.FillSimple | ~edea.kicad.schematic.shapes.FillColor | ~edea.kicad.schematic.shapes.FillTypeColor | None = None, uuid: ~uuid.UUID | None = None)
Bases:
KicadSchExpr
A polyline that defines one or more graphical lines that may or may not define a polygon.
- Parameters:
pts – The list of X-Y coordinates of the line(s).
stroke – The stroke style of the polygon formed by the lines.
fill – How the polygon is filled.
uuid – The unique identifier of the polyline.
Note
The uuid field was added in 20231120 (KiCad 8).
Note
The fill field became optional in 20231120 (KiCad 8).
- pts: Pts
- stroke: Stroke
- fill: FillSimple | FillColor | FillTypeColor | None = None
- class edea.kicad.schematic.shapes.Bezier(pts: ~edea.kicad.common.Pts = <factory>, stroke: ~edea.kicad.common.Stroke = <factory>, fill: ~edea.kicad.schematic.shapes.FillSimple | ~edea.kicad.schematic.shapes.FillColor | ~edea.kicad.schematic.shapes.FillTypeColor = <factory>)
Bases:
KicadSchExpr
A graphic cubic bezier curve.
- Parameters:
pts – The list of X-Y coordinates of each point of the curve.
stroke – The stroke style of the curve outline.
fill – How the curve is filled.
- pts: Pts
- stroke: Stroke
- fill: FillSimple | FillColor | FillTypeColor
- class edea.kicad.schematic.shapes.Rectangle(start: tuple[float, float], end: tuple[float, float], stroke: ~edea.kicad.common.Stroke = <factory>, fill: ~edea.kicad.schematic.shapes.FillSimple | ~edea.kicad.schematic.shapes.FillColor | ~edea.kicad.schematic.shapes.FillTypeColor = <factory>, uuid: ~uuid.UUID | None = None)
Bases:
KicadSchExpr
A rectangle.
- Parameters:
start – The X-Y coordinates of the upper left corner of the rectangle.
end – The X-Y coordinates of the low right corner of the rectangle.
stroke – The line width and style of the rectangle.
fill – How the rectangle is filled.
uuid – The unique identifier of the rectangle.
Note
The uuid field was added in 20231120 (KiCad 8).
- stroke: Stroke
- fill: FillSimple | FillColor | FillTypeColor
- class edea.kicad.schematic.shapes.Circle(center: tuple[float, float], radius: float, stroke: ~edea.kicad.common.Stroke = <factory>, fill: ~edea.kicad.schematic.shapes.FillSimple | ~edea.kicad.schematic.shapes.FillColor | ~edea.kicad.schematic.shapes.FillTypeColor = <factory>, uuid: ~uuid.UUID | None = None)
Bases:
KicadSchExpr
A circle.
- Parameters:
center – The coordinates of the center of the circle.
radius – The radius of the circle.
stroke – The line width and style of the circle.
fill – How the circle is filled.
uuid – The unique identifier of the rectangle.
Note
The uuid field was added in 20231120 (KiCad 8).
- stroke: Stroke
- fill: FillSimple | FillColor | FillTypeColor
- class edea.kicad.schematic.shapes.Radius(at: tuple[float, float], length: float, angles: tuple[float, float])
Bases:
KicadSchExpr
A radius.
- Parameters:
at – The X-Y coordinates of the radius.
length – The length of the radius.
angles – The rotation angle of the radius.
- class edea.kicad.schematic.shapes.Arc(start: tuple[float, float], mid: tuple[float, float], end: tuple[float, float], radius: ~edea.kicad.schematic.shapes.Radius | None = None, stroke: ~edea.kicad.common.Stroke = <factory>, fill: ~edea.kicad.schematic.shapes.FillSimple | ~edea.kicad.schematic.shapes.FillColor | ~edea.kicad.schematic.shapes.FillTypeColor = <factory>, uuid: ~uuid.UUID | None = None)
Bases:
KicadSchExpr
An arc.
- Parameters:
start – The X-Y coordinates of the start position of the arc radius.
mid – The X-Y coordinates of the midpoint along the arc.
end – The X-Y coordinates of the end position of the arc radius.
radius – The radius of the arc.
stroke – The stroke style of the arc.
fill – How the arc is filled.
uuid – The unique identifier of the rectangle.
Note
The uuid field was added in 20231120 (KiCad 8).
- radius: Radius | None = None
- stroke: Stroke
- fill: FillSimple | FillColor | FillTypeColor