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:

from "std" import *

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
line 6:15VComponent R1: line 8:1R110kline 10:4GNDline 12:15VComponent R2: line 14:1R210kline 16:4GNDline 18:15VComponent R3: line 20:1R310kline 22:4GND

Component angle from wires

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

Example:

from "std" import *

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


line 6:15VComponent R1: line 11:5R110kline 14:8GNDComponent R2: line 18:5R210kline 19:23GNDComponent R3: line 23:5R310kline 24:22GND

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.