YAPPgenerator_en
  • Yet Another Parametric Projectbox generator
  • What you need
  • Getting Started
  • Design Philosophy
  • Coordinate Systems
  • YAPPgenerator API
  • YAPP Box Settings
    • Multiple PCBs
  • Standoffs
    • pcbStands (advanced)
  • Connecting Base and Lid
    • Connecting Base and Lid (advanced)
  • Cutouts
    • n(h) - yappFromInside
    • p(6) - Cutout Depth
    • Placement of the project box
      • Cutouts in the Base Plane
      • Cutouts in the Lid Plane
      • Cutouts in the Front Plane
      • Cutouts in the Back Plane
      • Cutouts in the Left Plane
      • Cutouts in the Right Plane
    • Shapes
    • Optional Parameters
      • p(7) - Angle
      • n(a) = Polygon Definition
      • n(b)/n(c) - Mask Definition
      • n(d) - Coordinate System
      • n(e) - Position reference
      • n(f) - Alternate Origin
      • n(g) - PCB Selection
  • Box Mounts
    • boxMounts (advanced)
  • Snap Joins
  • Light Tubes
  • Push Buttons
    • Optional Parameters
  • Ridge Extension
  • Labels
  • Images
  • Hooks
  • Debugging
  • Advanced Options
    • Specify a PCB
    • Position reference
    • Polygon Definitions
    • Mask Definitions
  • Generating STL file from KiCad
  • License
Powered by GitBook
On this page

Labels

This is the API for labels:

Default origin = yappCoordBox: box[0,0,0]

Parameters:
  Required:
   p(0) = posx
   p(1) = posy/z
   p(2) = rotation degrees CCW
   p(3) = depth : positive values go into case (Remove) negative valies are raised (Add)
   p(4) = plane { yappLeft | yappRight | yappFront | yappBack | yappLid | yappBase }
   p(5) = font
   p(6) = size
   p(7) = "label text"
  Optional:
   p(8) = Expand : Default = 0 : mm to expand text by (making it bolder) 
   p(9) = Direction : { <yappTextLeftToRight>, yappTextRightToLeft, yappTextTopToBottom, yappTextBottomToTop }
   p(10) = Horizontal alignment : { <yappTextHAlignLeft>, yappTextHAlignCenter, yappTextHAlignRight }
   p(11) = Vertical alignment : {  yappTextVAlignTop, yappTextVAlignCenter, yappTextVAlignBaseLine, <yappTextVAlignBottom> } 
   p(12) = Character Spacing multiplier (1.0 = normal)

Here is the code for the labels in the next images:

labelsPlane = 
[
    [ 30, 30,  90, 1, yappBase,    "Liberation Mono:style=bold", 7, "BASE" ]
   ,[ 60, 30,  30, 1, yappBase,    "Liberation Mono:style=bold", 7, "BASE30" ]
   ,[100, 30, 210, 1, yappBase,    "Liberation Mono:style=bold", 7, "BASE210" ]
   ,[ 30, 30,  90, 1, yappLid,     "Liberation Mono:style=bold", 7, "LID" ]
   ,[ 60, 30,  45, 1, yappLid,     "Liberation Mono:style=bold", 7, "LID45" ]
   ,[  8, 10,   0, 1, yappLeft,    "Liberation Mono:style=bold", 7, "LEFT" ]
   ,[ 10, 10,   0, 1, yappRight,   "Liberation Mono:style=bold", 7, "RIGHT" ]
   ,[ 20, 10,   0, 1, yappFront,   "Liberation Mono:style=bold", 7, "FRONT" ]
   ,[ 20, 10,   0, 1, yappBack,    "Liberation Mono:style=bold", 7, "BACK" ]

Here is an example if the use of the Depth (p(3)) parameter:

labelsPlane =  
[
    [ 20, 10, 90, 1, yappLid,  "Liberation Mono:style=bold", 7, "LABEL depth 1 I" ]
   ,[ 40, 10, 90, 2, yappLid,  "Liberation Mono:style=bold", 7, "LABEL depth 2 I" ]
   ,[ 60, 10, 90, 3, yappLid,  "Liberation Mono:style=bold", 7, "LABEL depth 3 I" ]
   ,[ 80, 10, 90, 4, yappLid,  "Liberation Mono:style=bold", 7, "LABEL depth 4 I" ]

];
PreviousRidge ExtensionNextImages

Last updated 2 months ago