Circuit Elements

The elektron module allows for drawing circuits. The drawing follows the basic structure containing pre-defined elements for use in a drawing. A common import structure is:

GlobalLabel

class recad.GlobalLabel(name)

A GlobalLabel is a custom identifier that can be assigned to multiple objects or components across the entire design.

Junction

class recad.Junction

A junction represents a connection point where multiple wires or components intersect, allowing electrical current to flow between them.

at(reference, pin=None)

Place the junction.

LocalLabel

class recad.LocalLabel(name)

A LocalLabel refers to an identifier assigned to individual Components or objects within a specific grouping on the same schema page.

at(reference, pin=None)

place the label.

rotate(angle)

Rotate the label

Parameters:

angle – rotation angle in degrees

NoConnect

class recad.Symbol(reference, value, lib_id)

A schematic Symbol representing an instance from the [symbols] library.

anchor(pin)

Set an anchor Pin.

Parameters:

pin – the anchor pin, can be a string or an integer.

at(reference, pin=None)

place the symbol.

label(pos)

Place property, possible values are offset tuple or position by name: north, n, northeast, ne…

mirror(axis)

Mirror the symbol

Parameters:

axis – the mirror axis [‘x’, ‘y’, ‘xy’]

property(key, val)

Set a property for the symbol

Parameters:
  • key – the property key

  • value – the property value

rotate(angle)

Rotate the symbol

Parameters:

angle – rotation angle in degrees

tox(reference, pin=None)

Set the x coordinate of the symbol.

toy(reference, pin=None)

Set the y coordinate of the symbol.

unit(unit)

Select the unit of a symbol

Parameters:

unit – the Symbol unit number.

Symbol

class recad.Symbol(reference, value, lib_id)

A schematic Symbol representing an instance from the [symbols] library.

anchor(pin)

Set an anchor Pin.

Parameters:

pin – the anchor pin, can be a string or an integer.

at(reference, pin=None)

place the symbol.

label(pos)

Place property, possible values are offset tuple or position by name: north, n, northeast, ne…

mirror(axis)

Mirror the symbol

Parameters:

axis – the mirror axis [‘x’, ‘y’, ‘xy’]

property(key, val)

Set a property for the symbol

Parameters:
  • key – the property key

  • value – the property value

rotate(angle)

Rotate the symbol

Parameters:

angle – rotation angle in degrees

tox(reference, pin=None)

Set the x coordinate of the symbol.

toy(reference, pin=None)

Set the y coordinate of the symbol.

unit(unit)

Select the unit of a symbol

Parameters:

unit – the Symbol unit number.

Wire

class recad.Wire
at(reference, pin=None)

Draw the line from the position.

dot(dots)

Add dots to the wire

down()

Draw a line downwards.

left()

Draw wire to the left.

length(length)

The length of the wire

right()

Draw wire to the right.

tox(element, pin=None)

Draw the line to the X position.

toy(element, pin=None)

Draw the line to the Y position.

up()

Draw wire upward.