skidl.tools.kicad.kicad module

Handler for reading Kicad libraries and generating netlists.

class skidl.tools.kicad.kicad.DrawArc(cx, cy, radius, start_angle, end_angle, unit, dmg, thickness, fill, startx, starty, endx, endy)

Bases: tuple

cx

Alias for field number 0

cy

Alias for field number 1

dmg

Alias for field number 6

end_angle

Alias for field number 4

endx

Alias for field number 11

endy

Alias for field number 12

fill

Alias for field number 8

radius

Alias for field number 2

start_angle

Alias for field number 3

startx

Alias for field number 9

starty

Alias for field number 10

thickness

Alias for field number 7

unit

Alias for field number 5

class skidl.tools.kicad.kicad.DrawCircle(cx, cy, radius, unit, dmg, thickness, fill)

Bases: tuple

cx

Alias for field number 0

cy

Alias for field number 1

dmg

Alias for field number 4

fill

Alias for field number 6

radius

Alias for field number 2

thickness

Alias for field number 5

unit

Alias for field number 3

class skidl.tools.kicad.kicad.DrawDef(name, ref, zero, name_offset, show_nums, show_names, num_units, lock_units, power_symbol)

Bases: tuple

lock_units

Alias for field number 7

name

Alias for field number 0

name_offset

Alias for field number 3

num_units

Alias for field number 6

power_symbol

Alias for field number 8

ref

Alias for field number 1

show_names

Alias for field number 5

show_nums

Alias for field number 4

zero

Alias for field number 2

class skidl.tools.kicad.kicad.DrawF0(ref, x, y, size, orientation, visibility, halign, valign)

Bases: tuple

halign

Alias for field number 6

orientation

Alias for field number 4

ref

Alias for field number 0

size

Alias for field number 3

valign

Alias for field number 7

visibility

Alias for field number 5

x

Alias for field number 1

y

Alias for field number 2

class skidl.tools.kicad.kicad.DrawF1(name, x, y, size, orientation, visibility, halign, valign, fieldname)

Bases: tuple

fieldname

Alias for field number 8

halign

Alias for field number 6

name

Alias for field number 0

orientation

Alias for field number 4

size

Alias for field number 3

valign

Alias for field number 7

visibility

Alias for field number 5

x

Alias for field number 1

y

Alias for field number 2

class skidl.tools.kicad.kicad.DrawPin(name, num, x, y, length, orientation, num_size, name_size, unit, dmg, electrical_type, shape)

Bases: tuple

dmg

Alias for field number 9

electrical_type

Alias for field number 10

length

Alias for field number 4

name

Alias for field number 0

name_size

Alias for field number 7

num

Alias for field number 1

num_size

Alias for field number 6

orientation

Alias for field number 5

shape

Alias for field number 11

unit

Alias for field number 8

x

Alias for field number 2

y

Alias for field number 3

class skidl.tools.kicad.kicad.DrawPoly(point_count, unit, dmg, thickness, points, fill)

Bases: tuple

dmg

Alias for field number 2

fill

Alias for field number 5

point_count

Alias for field number 0

points

Alias for field number 4

thickness

Alias for field number 3

unit

Alias for field number 1

class skidl.tools.kicad.kicad.DrawRect(x1, y1, x2, y2, unit, dmg, thickness, fill)

Bases: tuple

dmg

Alias for field number 5

fill

Alias for field number 7

thickness

Alias for field number 6

unit

Alias for field number 4

x1

Alias for field number 0

x2

Alias for field number 2

y1

Alias for field number 1

y2

Alias for field number 3

class skidl.tools.kicad.kicad.DrawText(angle, x, y, size, hidden, unit, dmg, text, italic, bold, halign, valign)

Bases: tuple

angle

Alias for field number 0

bold

Alias for field number 9

dmg

Alias for field number 6

halign

Alias for field number 10

hidden

Alias for field number 4

italic

Alias for field number 8

size

Alias for field number 3

text

Alias for field number 7

unit

Alias for field number 5

valign

Alias for field number 11

x

Alias for field number 1

y

Alias for field number 2

skidl.tools.kicad.kicad.gen_netlist(self)[source]
skidl.tools.kicad.kicad.gen_netlist_comp(self)[source]
skidl.tools.kicad.kicad.gen_netlist_net(self)[source]
skidl.tools.kicad.kicad.gen_pcb(self, file_)[source]

Create a KiCad PCB file directly from a Circuit object.

skidl.tools.kicad.kicad.gen_pinboxes(self)[source]

Generate bounding box and I/O pin positions for each unit in a part.

skidl.tools.kicad.kicad.gen_schematic(self, route)[source]
skidl.tools.kicad.kicad.gen_svg_comp(self, symtx, net_stubs=None)[source]

Generate SVG for this component.

Parameters
  • self – Part object for which an SVG symbol will be created.

  • net_stubs – List of Net objects whose names will be connected to part symbol pins as connection stubs.

  • symtx – String such as “HR” that indicates symbol mirroring/rotation.

Returns: SVG for the part symbol.

skidl.tools.kicad.kicad.gen_xml(self)[source]
skidl.tools.kicad.kicad.gen_xml_comp(self)[source]
skidl.tools.kicad.kicad.gen_xml_net(self)[source]
skidl.tools.kicad.kicad.load_sch_lib(self, filename=None, lib_search_paths_=None, lib_section=None)[source]

Load the parts from a KiCad schematic library file.

Parameters

filename – The name of the KiCad schematic library file.

skidl.tools.kicad.kicad.parse_lib_part(self, get_name_only=False)[source]

Create a Part using a part definition from a KiCad schematic library.

Parameters

get_name_only – If true, scan the part definition until the name and aliases are found. The rest of the definition will be parsed if the part is actually used.