Reference Label

If you want to specify the location, size, orientation, etc. of the reference label of a component that appears on the silk screen, you can do that with ref-label.

The following are the available ref-label helper functions:

; Creates a reference label from pose and anchor
public defn ref-label (pose:Pose, anchor:Anchor)
; Creates a reference label at a fixed pose
public defn ref-label (pose:Pose)
; Create a default reference label
public defn ref-label ()

This allows you to control or change the reference indicator of a landpattern.

Example usage

Create a reference label at a default location:

pcb-landpattern SOT95P280X100-3N :
  
  val x0 = -0.95
  val y0 = -1.0
  pad p[1] : smd-pad(0.6, 0.7) at loc(x0,y0)
  pad p[2] : smd-pad(0.6, 0.7) at loc((- x0), y0)
  pad p[3] : smd-pad(0.6, 0.7) at loc(0.0, (- y0))

  layer(Courtyard(Top)) = Rectangle(3.3, 3.0)
  layer(Silkscreen("f-silk", Top)) = LineRectangle(3.3, 3.0)  
  ref-label() ; create a reference label

or create a reference label at a specific fixed pose (in this case 90 degrees rotated):

pcb-landpattern SOT95P280X100-3N :
  
  val x0 = -0.95
  val y0 = -1.0
  pad p[1] : smd-pad(0.6, 0.7) at loc(x0,y0)
  pad p[2] : smd-pad(0.6, 0.7) at loc((- x0), y0)
  pad p[3] : smd-pad(0.6, 0.7) at loc(0.0, (- y0))

  layer(Courtyard(Top)) = Rectangle(3.3, 3.0)
  layer(Silkscreen("f-silk", Top)) = LineRectangle(3.3, 3.0)  
  ref-label(loc(0.0, 0.0, 90.0))