Skip to main content

Component orientation

The orientation of the component is important for the visual organization of the circuit. A well-organized circuit improves the understanding of the overall circuit's function and purpose. Each component has an "angle" modifier that can be changed to set the component's orientation.

Component angle

The component's angle can be set by specifying the angle: modifier when the component is created.

Example:

import lib

v5v = supply("5V")
gnd = dgnd()

at v5v
wire down 100
add res(10k) angle:0
wire down 100
to gnd

at v5v
wire down 100
add res(10k) angle:90
wire down 100
to gnd

at v5v
wire down 100
add res(10k) angle:180
wire down 100
to gnd

5V12R110kGND5V12R210kGND5V12R310kGND

Component angle from wires

The component's angle can also be automatically assigned based on the first wire that is connected to it.

Example:

import lib

v5v = supply("5V")
gnd = dgnd()

at v5v
wire down 100

branch:
wire down 100
add res(10k)

wire down 100
to gnd

branch:
wire right 100
add res(10k)
wire right 100 to gnd

branch:
wire left 100
add res(10k)
wire left 100 to gnd


5V12R110kGND12R210kGND12R310kGND

In the example above, the orientation/angle of R1 is set 90 degrees. This is because the first wire that connects to R1 has a down orientation.

R2 has an angle of 0 degrees as the first wire that connects to it has an orientation of right. R3 is automatically flipped horizontally as the wire that it is connected to has an orientation of left.