Board

class kicad.pcbnew.Board(board=None)

Create a new Board object

Parameters:board (pcbnew.BOARD) – already existing board object
Example:
>>> from kicad.pcbnew import Board
>>> b = Board()
aux_origin

Aux origin of Board

Returns:kicad.util.Point2D
Example:
>>> from kicad.pcbnew import Board
>>> b = Board()
>>> b.aux_origin = [1, 2]
>>> b.aux_origin
kicad.util.point.Point2D(1.0, 2.0)
filepath

Filepath of the Board

Returns:unicode
Example:
>>> from kicad.pcbnew import Board
>>> b = Board()
>>> b.filepath = "path/to/board.kicad_mod"
>>> print(b.filepath)
path/to/board.kicad_mod
static from_editor()

Get the current board visible in pcbnew

Returns:kicad.pcbnew.Board
Example:
>>> from kicad.pcbnew import Board
>>> b = Board.from_editor()
static from_file(path)

Load a board from a given filepath

Parameters:path (str, unicode) – path to the “.kicad_pcb” file
Returns:kicad.pcbnew.Board
Example:
>>> from kicad.pcbnew import Board
>>> b = Board.from_file("path/to/board.kicad_pcb")# doctest: +SKIP
get_native()

Get native object from the low level API

Returns:pcbnew.BOARD
grid_origin

Grid origin of Board

Returns:kicad.util.Point2D
Example:
>>> from kicad.pcbnew import Board
>>> b = Board()
>>> b.grid_origin = [1, 2]
>>> b.grid_origin
kicad.util.point.Point2D(1.0, 2.0)
is_highlighted

is highlighted?

Returns:bool
is_locked

is locked?

Returns:bool
is_selected

is selected?

Returns:bool
layer

primary layer of the item

Returns:kicad.pcbnew.Layer
layers

All layers where the item is present on

Returns:kicad.pcbnew.LayerSet
modules

List of Modules present in the Board

Returns:Iterator over kicad.pcbnew.Module
to_file(path)

Save a board to a given filepath

Parameters:path (str, unicode) – path for the “.kicad_pcb” file
tracks

List of Tracks present in the Board

Returns:Iterator over kicad.pcbnew.Track
vias

List of Vias present in the Board

Returns:Iterator over kicad.pcbnew.Via
zones

List of Zones present in the Board

Returns:Iterator over kicad.pcbnew.Zone