preferred-orientation
preferred-orientation = AnyRotation() | PreferRotation(rotation-list)
allows to specify a preferred-orientation as a
SymbolOrientationobject.
AnyRotation()means no specified preferred orientation.
PreferRotation(rotation-list)allows to give a list of preferred rotation options to apply that are integers between 0 and 3. the applied rotation for
i will be of
90° * i` (direct trigonometric sense ie ccw).
SymbolOrientation
is defined in the jitx
package :
public deftype SymbolOrientation
public defstruct AnyRotation <: SymbolOrientation
public defstruct PreferRotation <: SymbolOrientation :
rotations: Tuple<Int> with: (ensure => ensure-rotations!)
Syntax
public pcb-symbol altium-ground-sym :
name = "POWER-GROUND"
pin p[0] at unit-point(0.0, 0.0)
unit-line([[0.0, 0.0], [2.54, 0.0]])
unit-line(0.1, [[2.54, -1.4], [2.54, 1.4]])
unit-line(0.1, [[3.81 -0.93], [3.81, 0.93]])
unit-line(0.1, [[5.08, -0.46], [5.08, 0.46]])
unit-val([7.5, -2.5])
preferred-orientation = PreferRotation([3])
Description
This ground Altium symbol is defined with the pin to the left but needs to be rotated by 270° to have it point upwards in the schematics.