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
  1. Box Mounts

boxMounts (advanced)

The boxMounts API is:

Parameters:
 Required:
  p(0) = pos : position along the wall : [pos,offset] : vector for position 
               and offset X.
               Position is to center of mounting screw in leftmost position 
               in slot
  p(1) = screwDiameter
  p(2) = width of opening in addition to screw diameter 
               (0=Circular hole screwWidth = hole twice as wide as it is tall)
  p(3) = height
 Optional:
  p(4) = filletRadius : Default = 0/Auto(0 = auto size)
  n(a) = { yappLeft | yappRight | yappFront | yappBack } : one or more
  n(b) = { yappNoFillet }
  n(c) = { <yappBase>, yappLid }
  n(d) = { yappCenter } : shifts Position to be in the center of the opening 
                          instead of the left of the opening
  n(e) = { <yappGlobalOrigin>, yappLeftOrigin } : Only affects Back and Right 
                                                  Faces

The optional parameters n(c) and n(d) are important.

n(c) - mount on base or lid

Standard the boxMount will be placed at the base of the box.

boxMounts   = 
[
   [0,           3.5, 15, 3, yappLeft]
  ,[shellLength, 3.5, 15, 3, yappLeft]
];

The mounts are placed on the base (default):

With n(c) set to yappLid the mounts are placed at the lid:

boxMounts   = 
[
   [0,           3.5, 15, 3, yappLeft, yappLid]
  ,[shellLength, 3.5, 15, 3, yappLeft, yappLid]
];

n(d) - yappCenter

When yappCenter is added the center of the mount will be the reference for the pos parameter [p(0) ].

boxMounts   = 
[
   [0,           3.5, 15, 3, yappLeft, yappCenter]
  ,[shellLength, 3.5, 15, 3, yappLeft, yappCenter]
];

The mounts pos is centered around the, well, 'center' of the mounts:

p(2) - negative width

With a negative value of the width [ p(2)] the mounts are 90 degrees rotated.

boxMounts   = 
[
   [10,             3.5, -5, 3, yappLeft, yappCenter] //-- [A] - p(2) negative
  ,[shellLength/2 , 3.5,  5, 3, yappLeft, yappCenter] //-- [B] - p(2) positive
  ,[shellLength-10, 3.5, -5, 3, yappLeft, yappCenter] //-- [C] - p(2) negative
];
PreviousBox MountsNextSnap Joins

Last updated 1 year ago