# Table of Contents - [Yet Another Parametric Projectbox generator | YAPPgenerator_en](#yet-another-parametric-projectbox-generator-yappgenerator-en) - [YAPPgenerator API | YAPPgenerator_en](#yappgenerator-api-yappgenerator-en) - [Design Philosophy | YAPPgenerator_en](#design-philosophy-yappgenerator-en) - [Getting Started | YAPPgenerator_en](#getting-started-yappgenerator-en) - [Coordinate Systems | YAPPgenerator_en](#coordinate-systems-yappgenerator-en) - [Cutouts | YAPPgenerator_en](#cutouts-yappgenerator-en) - [Multiple PCBs | YAPPgenerator_en](#multiple-pcbs-yappgenerator-en) - [Connecting Base and Lid (advanced) | YAPPgenerator_en](#connecting-base-and-lid-advanced-yappgenerator-en) - [n(h) - yappFromInside | YAPPgenerator_en](#n-h-yappfrominside-yappgenerator-en) - [pcbStands (advanced) | YAPPgenerator_en](#pcbstands-advanced-yappgenerator-en) - [YAPP Box Settings | YAPPgenerator_en](#yapp-box-settings-yappgenerator-en) - [Cutouts in the Front Plane | YAPPgenerator_en](#cutouts-in-the-front-plane-yappgenerator-en) - [What you need | YAPPgenerator_en](#what-you-need-yappgenerator-en) - [Placement of the project box | YAPPgenerator_en](#placement-of-the-project-box-yappgenerator-en) - [Standoffs | YAPPgenerator_en](#standoffs-yappgenerator-en) - [Cutouts in the Lid Plane | YAPPgenerator_en](#cutouts-in-the-lid-plane-yappgenerator-en) - [Connecting Base and Lid | YAPPgenerator_en](#connecting-base-and-lid-yappgenerator-en) - [p(6) - Cutout Depth | YAPPgenerator_en](#p-6-cutout-depth-yappgenerator-en) - [Cutouts in the Base Plane | YAPPgenerator_en](#cutouts-in-the-base-plane-yappgenerator-en) - [p(7) - Angle | YAPPgenerator_en](#p-7-angle-yappgenerator-en) - [n(f) - Alternate Origin | YAPPgenerator_en](#n-f-alternate-origin-yappgenerator-en) - [Optional Parameters | YAPPgenerator_en](#optional-parameters-yappgenerator-en) - [n(g) - PCB Selection | YAPPgenerator_en](#n-g-pcb-selection-yappgenerator-en) - [n(a) = Polygon Definition | YAPPgenerator_en](#n-a-polygon-definition-yappgenerator-en) - [n(d) - Coordinate System | YAPPgenerator_en](#n-d-coordinate-system-yappgenerator-en) - [n(e) - Position reference | YAPPgenerator_en](#n-e-position-reference-yappgenerator-en) - [Shapes | YAPPgenerator_en](#shapes-yappgenerator-en) - [Cutouts in the Back Plane | YAPPgenerator_en](#cutouts-in-the-back-plane-yappgenerator-en) - [Cutouts in the Right Plane | YAPPgenerator_en](#cutouts-in-the-right-plane-yappgenerator-en) - [Cutouts in the Left Plane | YAPPgenerator_en](#cutouts-in-the-left-plane-yappgenerator-en) - [Optional Parameters | YAPPgenerator_en](#optional-parameters-yappgenerator-en) - [Polygon Definitions | YAPPgenerator_en](#polygon-definitions-yappgenerator-en) - [Advanced Options | YAPPgenerator_en](#advanced-options-yappgenerator-en) - [Position reference | YAPPgenerator_en](#position-reference-yappgenerator-en) - [Specify a PCB | YAPPgenerator_en](#specify-a-pcb-yappgenerator-en) - [Images | YAPPgenerator_en](#images-yappgenerator-en) - [Ridge Extension | YAPPgenerator_en](#ridge-extension-yappgenerator-en) - [Snap Joins | YAPPgenerator_en](#snap-joins-yappgenerator-en) - [n(b)/n(c) - Mask Definition | YAPPgenerator_en](#n-b-n-c-mask-definition-yappgenerator-en) - [Box Mounts | YAPPgenerator_en](#box-mounts-yappgenerator-en) - [Mask Definitions | YAPPgenerator_en](#mask-definitions-yappgenerator-en) - [Light Tubes | YAPPgenerator_en](#light-tubes-yappgenerator-en) - [Push Buttons | YAPPgenerator_en](#push-buttons-yappgenerator-en) - [boxMounts (advanced) | YAPPgenerator_en](#boxmounts-advanced-yappgenerator-en) - [Hooks | YAPPgenerator_en](#hooks-yappgenerator-en) - [Labels | YAPPgenerator_en](#labels-yappgenerator-en) - [License | YAPPgenerator_en](#license-yappgenerator-en) - [Generating STL file from KiCad | YAPPgenerator_en](#generating-stl-file-from-kicad-yappgenerator-en) - [Debugging | YAPPgenerator_en](#debugging-yappgenerator-en) --- # Yet Another Parametric Projectbox generator | YAPPgenerator_en This documentation applies to v3.0 (from Februari 2024) and is 'work in progress' [My gitbook](https://mrwheel-docs.gitbook.io/mrwheel_gitbooks) bookshelf With every electronic circuit I make, there comes a moment when the project is “finished”…. almost! The last step is always to find a suitable projectbox and even then it is difficult to provide a (often plastic) projectbox with cutouts of the right size and in the right place. Fortunately I have a 3D printer and in theory I can make a projectbox myself, but it always takes a lot of time. For standard processor boards you can find 3D STL files on the internet, but if you have “designed” a printed circuit board yourself, the only way is a “_parameter controlled_” solution that you can read in Fusion 360 or in openSCAD. Then you can specify the size of the box via parameters and sometimes a little more, but it never really “fits” well or it is so complex that you have to graduate before you can make something useful with it. I made a solution that can provide almost any printed circuit board with a nice projectbox: _the_ _**YAPP generator**_! See [this post](https://willem.aandewiel.nl/index.php/2022/01/02/yet-another-parametric-projectbox-generator/) for more information! In this book I explain what the principles of this `**YAPPgenerator**` are and how you can use it to 3D print beautiful projectboxes! ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2Fwillem.aandewiel.nl%2Fwp-content%2Fuploads%2F2022%2F08%2FESPotifyEcho_Design-1.gif&width=768&dpr=4&quality=100&sign=903c2fea&sv=2) With the YAPPgenerator as a basis you can make complex project boxes The name _**YAPPgenerator**_ is inspired by the Great and Famous [YACC](https://en.wikipedia.org/wiki/Yacc) (Yet Another Compiler Compiler) [NextWhat you need](https://mrwheel-docs.gitbook.io/yappgenerator_en/what-you-need) Last updated 1 year ago --- # YAPPgenerator API | YAPPgenerator_en All objects (cutouts, pcbStands, labels) are entered as elements in an array. Each element is an array of its own. The way you populate the array's is named the '_YAPPgenerator API_', `**API**` for short. In the description of the API we use the following convention: Parameters p(..) means it is a **Positional** parameter like. These parameters must be entered in _fixed order_. n(..) means it is a a **non-Positional** parameter. These parameters can be entered in _random order_. There are **required** parameters (you need to enter all required parameters) and **optional** parameters (they mostly have a default value and can be omitted). For non-numerical parameters the following syntax is used: Copy { yappKeyWord } | means one or more values from the list are allowed , means only one value from the list is allowed To elaborate lets use a fictional _demoArray_ with this API: Copy demoArray Parameters: Required: p(0) = posx --\ p(1) = posy > required positional parameters (0),(1) and (2) p(2) = { yappThis | yappThat } --/ Optional: p(3) = standoffDiameter Default = standoffDiameter; --\ p(4) = standoffPinDiameter Default = standoffPinDiameter; > Optional p(5) = standoffHoleSlack Default = standoffHoleSlack; --/ Positional n(a) = { | yappLidOnly | yappBaseOnly } --\ n(b) = { , yappHole } // Baseplate support treatment | n(c) = { | yappFrontLeft | yappFrontRight > Optional, non- | yappBackLeft | yappBackRight } | Positional n(d) = { | yappCoordBox | yappCoordBoxInside } | n(e) = { yappNoFillet } --/ As you can see, there are three required positional parameters p(0, 1 and 2) and there are three optional positional parameters p(3, 4 and 5). Not all `positional` parameters are required but if you want to give f.i. positional parameter p(5) a value of '50' you also have to enter values for optional parameters p(3) and p(4). This might look like this: Copy +---+-----+----< required parameters p(0), p(1) and p(2) | | | V V V [10, 13, yappThat, yappDefault, yappDefault, 50 ...] ^ ^ ^ | | | | | \---> new value for positional | | parameter p(5) | \------------> positional/required parameter p(4) \-------------------> positional/required parameter p(3) The following entries are all valid: Copy demoArray = [\ [5, 6, yappThis] //-> Parameters 0, 1 and 2 are given, the rest\ // are optional with default values.\ [5, 6, yappThis, yappDefault, 2] //-> Same as previous entry, but with a value \ // of '3' for parameter 4.\ [5, 6, yappThis, yappDefault, yappDefault, 0.5] //-> Same as the first entry, but \ // a value of 0.5 for\ // parameter 5.\ [5, 6, yappThis, yappDefault, 2, 0.5] //-> Same as the first entry, but with a value\ // of '2' for parameter 4 and \ // a value of '0.5' for parameter 5.\ [5, 6, yappThis, 8, 2, 0.5] //-> Same as the first entry, but with a value\ // of '8' for parameter 3 and a value of '2'\ // for parameter 4 and a value of '0.5' for\ // parameter 5.\ ]; Parameter **n(a)** can have the values (one or more) _yappBoth_, _yappLidOnly_ and/or _yappBaseOnly_. If neither is given, the default _yappBoth_ will be used. Parameter **n(b)** can have one (and only one) of the values _yappHole_ or _yappPin_. If omited the default value _yappPin_ will be used. Parameter **n(c)** can have one or more values _yappAllCorners_, _yappRightLeft_, _yappFrontRight_, _yappBackLeft_ and/or _yappBackRight_. If omitted _yappAllCorners_ will be used. Parameter **n(d)** can have one of the following values _yappCoordBox_ or **yappCoordPCB**. If omitted _yappCoordPCB_ is used. Parameter **n(e)** can have the value _yappNoFillet_. If omitted the default is that for this object fillets are created. [PreviousCoordinate Systems](https://mrwheel-docs.gitbook.io/yappgenerator_en/coordinate-systems) [NextYAPP Box Settings](https://mrwheel-docs.gitbook.io/yappgenerator_en/yapp-box-settings) Last updated 1 year ago --- # Design Philosophy | YAPPgenerator_en Most box generators that you can find on the internet allow you to specify the size of the box. Sometimes you have to give inside measurements and sometimes outside measurements. YAPPgenerator does this differently and starts from the printed circuit board for which you need a projectbox. The most important measurements are therefore the **length**, **width** and **thickness** of the printed circuit board. Then you specify where the holes are with which the printed circuit board should be secured. The holes can be used to secure the PCB with screws or you can clamp the PCB between the standoffs in the bottom and top of the projectbox. Then you can specify for all surfaces (lid, base, front, back, left and right) of the projectbox where rectangular and/or round cutouts should be placed. Finally, texts can be entered that will be printed at the lid of the projectbox. [PreviousGetting Started](https://mrwheel-docs.gitbook.io/yappgenerator_en/getting-started) [NextCoordinate Systems](https://mrwheel-docs.gitbook.io/yappgenerator_en/coordinate-systems) Last updated 1 year ago --- # Getting Started | YAPPgenerator_en To use the YAPP API you need at a minimum the following: Copy include <./YAPPgenerator_v3.scad> YAPPgenerate(); This assumes that the `YAPPgenerator_v3.scad` library file is in the same location as your script. If it is in another location update the "./" as needed to locate the library (see [What you need](https://mrwheel-docs.gitbook.io/yappgenerator_en/what-you-need) ). These two lines of code will include the API and generate a box (in this case with all of the default settings). While this will get you "a box" it won't get you "_your box_". To get "your box" you will need to add all of the options that you need. ### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/getting-started#the-simplest-project-box) The Simplest Project Box The YAPPgenerator assumes a lot of default values that you should override to the needs of your project box. So in addition to the two lines that are always needed you have to tell the YAPPgenerator the specifics of "your box". First of all the YAPPgenerator needs the length, width and the thickness of the Printed Circuit Board (PCB) to calculate the size of the project box. Copy /* ** The Simplest Project Box ** The YAPPgenerator.scad library is in the ** project box folder */ include pcbLength = 40; pcbWidth = 30; pcbThickness = 2; YAPPgenerate(); This will result in this project box: ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FDCVdrUpAEku4BzbyjkaW%252FsimplesProjectBox.png%3Falt%3Dmedia%26token%3D562f6061-69a2-402d-aece-72c31b03578c&width=768&dpr=4&quality=100&sign=8233358d&sv=2) Simplest Project Box The Lid (green) will fit nicely over the Base (brown). But it would be nice if the Lid snaps on to the Base so it won't come off easily. Thats where snap joins come in handy. By simply adding the following array to the code (actually `snapJoins` is an array that, in this example, has two elements in it that both ara also array's): Copy // *** Snap Joins *** snapJoins = [\ [6, 5, yappLeft, yappRight]\ ,[pcbLength-6, 5, yappLeft, yappRight]\ ]; The first element tells the YAPPgenerator to add a snap-join with a length of 5mm at 6mm from the back of the box to both the left and right of the box. The second element tells the YAPPgenerator to add a snap-join of also 5mm at 'pcbLength-6' or '40-6' or 34mm from the back (which is 6mm from the front) and also at the left and the right of the box. The resulting box looks like this: ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252F8kCkH2GgwCgZrBGxRQsp%252FsimpleBoxWithSnapJoins.png%3Falt%3Dmedia%26token%3D6c700576-af55-494d-bb77-9705846f0fb7&width=768&dpr=4&quality=100&sign=4a180f1f&sv=2) Simple Box with snapJoins The snapJoins will click in each other and keep the Lid firmly connected with the Base. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FsBAAaiFTUo3dkls761jK%252FsimpleBoxOnTop.png%3Falt%3Dmedia%26token%3Dddeca6e8-fee1-4da7-a2a0-862c9ed74404&width=768&dpr=4&quality=100&sign=271b7e33&sv=2) Lid snapped on the Base Next we like to have control over the height of the Lid and Base. You can do that by adding the next two lines of code: Copy lidWallHeight = 10; baseWallHeight = 15; The _inside_ height of the project box will now be 25mm. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252F1DTOsxXFCFidaKVkaBlr%252FsimpleBoxCutOut.png%3Falt%3Dmedia%26token%3D1e8487dc-fb95-448a-8cd7-42d8bb80dde1&width=768&dpr=4&quality=100&sign=1a9815f1&sv=2) The complete code to generate the above project box: Copy /* ** The Simplest Project Box ** The YAPPgenerator.scad library is in the ** project box folder */ include pcbLength = 40; pcbWidth = 30; pcbThickness = 2; lidWallHeight = 10; baseWallHeight = 15; snapJoins = [\ [6, 5, yappLeft, yappRight]\ ,[pcbLength -6, 5, yappLeft, yappRight]\ ]; YAPPgenerate(); To make use of all the available options of the YAPPgenerator you best read the rest of this document and use the `YAPP_Template.scad` file as a boilerplate (just remove everything you don't need). [PreviousWhat you need](https://mrwheel-docs.gitbook.io/yappgenerator_en/what-you-need) [NextDesign Philosophy](https://mrwheel-docs.gitbook.io/yappgenerator_en/design-philosophy) Last updated 1 year ago --- # Coordinate Systems | YAPPgenerator_en Before going further it is necessary to understand what the orientation of the projectbox is. It should be clear that the projectbox has six “planes”. The top is called `**Lid**` the bottom is called `**Base**`. The plane closest to the Y-axis is the `**back**`. `**left**` is closest to the X-axis. The plane opposite `**back**` (which is furthest from the Y-axis) is called `**front**` and the plane opposite “**left**” is called “**right**” There are three "Coordinate System" to choose from creating objects for the Project Box. Copy yappCoordPCB : Every posX, posY and posZ is related to the PCB (for most of the objects this is the default) yappCoordBox : Every posX, posY and posZ is related to the outside of the box yappCoordBoxInside : Every posX, posY and posZ is related to the inside of the box ### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/coordinate-systems#yappcoordpcb) yappCoordPCB The `**zero point**` (\[x=0, y=0, z=0\]) is left-back at the top of the PCB. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252Fx1CiIOcu57jfnKeniTGf%252FYAPP_CoordinationSystem.png%3Falt%3Dmedia%26token%3Ddfff83ff-6301-47d4-8e53-e55c46a5b103&width=768&dpr=4&quality=100&sign=a652c671&sv=2) ### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/coordinate-systems#yappcoordbox) yappCoordBox The `**zero point**` of this coordinate system is the outside of the box. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252Fl4g9dZJfEtD9XqVZvPnf%252FyappCoordBox.png%3Falt%3Dmedia%26token%3D230d0a53-96fe-4f8e-b188-fa72ceff30ec&width=768&dpr=4&quality=100&sign=4e72b340&sv=2) ### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/coordinate-systems#yappcoordboxinside) yappCoordBoxInside The `**zero point**` of this coordinate system is the inside of the box. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FDWYhZVKv7VLxzC8ilEx1%252FyappCoordBoxInside.png%3Falt%3Dmedia%26token%3Dcc3759d3-f7ef-40ba-a6f2-e13d798943ee&width=768&dpr=4&quality=100&sign=72b777f4&sv=2) Using this coordinate system has the benefit that changing this thickness of the walls (wallThickness) does not move the created objects. ### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/coordinate-systems#adding-objects-to-the-projectbox) Adding objects to the projectBox For every type of object and often for each plane there is an array in which you can specify where the objects should be (in that plane). For instance the default for _cutouts_ is the _yappCoordPCB_ coordinate system. That means that they all have **(pcb)\[0,0,0\]** as their starting point. If, at any time, you decide to enlarge the edges around the PCB (_padding_) or to make the `**pcbStandoffs**` higher, the cutouts will move neatly with the position of the PCB. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FaaycTHzBgIn2kAkMOHmI%252FYAPP_padding.png%3Falt%3Dmedia%26token%3D1c07d735-c71f-4b80-8bcb-b3662e359c23&width=768&dpr=4&quality=100&sign=d037f8d0&sv=2) [PreviousDesign Philosophy](https://mrwheel-docs.gitbook.io/yappgenerator_en/design-philosophy) [NextYAPPgenerator API](https://mrwheel-docs.gitbook.io/yappgenerator_en/yappgenerator-api) Last updated 1 year ago --- # Cutouts | YAPPgenerator_en For each **plane** (face) there is an array in which you can specify per line where cutouts should come, what the `**origin**` of such a recess is, what shape the recess should have (_Rectangle_, _RoundedRect_, _Circle_, _CircleWithFlats_, _CircleWithKey_ or _Polygon_). Depending on the **plane**, the first element is the position on the **X-axis** (lid-, base-, left- or rightPlane) or the **Y-axis** (front- or backPlane) and the second element is the position on the **Y-axis** (lid-, base-, left- or rightPlane) and the **Z-axis** (front-, back-, left- or rightPlane). Copy =================================================================== *** Cutouts *** There are 6 cutouts one for each surface: cutoutsBase, cutoutsLid, cutoutsFront, cutoutsBack, cutoutsLeft, cutoutsRight ------------------------------------------------------------------- Default origin = yappCoordPCB Required Not Used Note ----------------------+-----------------------+---------------+------------------------------------ yappRectangle | width, length | radius | yappCircle | radius | width, length | yappRoundedRect | width, length, radius | | yappCircleWithFlats | width, radius | length | length=distance | | | between flats yappCircleWithKey | width, length, radius | | width = key width | | | length=key depth yappPolygon | width, length | radius | yappPolygonDef object | | | must be provided ----------------------+-----------------------+---------------+------------------------------------ Parameters: Required: p(0) = from Back p(1) = from Left p(2) = width p(3) = length p(4) = radius p(5) = shape : { yappRectangle | yappCircle | yappPolygon | yappRoundedRect | yappCircleWithFlats | yappCircleWithKey } Optional: p(6) = depth : Default = 0/Auto : 0 = Auto (plane thickness) p(7) = angle : Default = 0 n(a) = { yappPolygonDef } : Required if shape = yappPolygon specified - n(b) = { yappMaskDef } : If a yappMaskDef object is added it will be used as a mask for the cutout. n(c) = { [yappMaskDef, hOffset, vOffset, rotation] } : If a list for a mask is added it will be used as a mask for the cutout. With the Rotation and offsets applied. This can be used to fine tune the mask placement within the opening. n(d) = { | yappCoordBox | yappCoordBoxInside } n(e) = { , yappCenter } n(f) = { , yappAltOrigin } // Only affects Top(lid), Back and Right Faces n(g) = [yappPCBName, "XXX"] : Specify a PCB. Defaults to [yappPCBName, "Main"] n(h) = { yappFromInside } Make the cut from the inside towards the outside ------------------------------------------------------------------- [PreviousConnecting Base and Lid (advanced)](https://mrwheel-docs.gitbook.io/yappgenerator_en/connecting-base-and-lid/connecting-base-and-lid-advanced) [Nextn(h) - yappFromInside](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/n-h-yappfrominside) Last updated 1 year ago --- # Multiple PCBs | YAPPgenerator_en Copy // =================================================================== // *** PCBs *** // Printed Circuit Boards //------------------------------------------------------------------- // Default origin = yappCoordPCB : yappCoordBoxInside[0,0,0] // // Parameters: // Required: // p(0) = name // p(1) = length // p(2) = width // p(3) = posx // p(4) = posy // p(5) = Thickness // p(6) = standoff_Height // p(7) = standoff_Diameter // p(8) = standoff_PinDiameter // Optional: // p(9) = standoff_HoleSlack (default to 0.4) //The following can be used to get PCB values. If "PCB Name" is omitted then "Main" is used // pcbLength --> pcbLength("PCB Name") // pcbWidth --> pcbWidth("PCB Name") // pcbThickness --> pcbThickness("PCB Name") // standoffHeight --> standoffHeight("PCB Name") // standoffDiameter --> standoffDiameter("PCB Name") // standoffPinDiameter --> standoffPinDiameter("PCB Name") // standoffHoleSlack --> standoffHoleSlack("PCB Name") pcb = [\ //-- Default Main PCB - DO NOT REMOVE the "Main" line.\ ["Main", pcbLength,pcbWidth, 0,0, pcbThickness, standoffHeight, standoffDiameter, standoffPinDiameter, standoffHoleSlack]\ ]; The "pcb" array can be used to define multiple printed circuit boards. Note: The first line should not be changed, except for the 0,0 (posX, posY).pcb = Copy [\ ["Main", pcbLength,pcbWidth, 0,0, pcbThickness, standoffHeight, standoffDiameter, standoffPinDiameter, standoffHoleSlack]\ ,["Voltage Detect 1", 15.1,71.5+3, pcbLength + 2, 0, 1.6, 3, 7, 2.4]\ ,["Voltage Detect 2", 15.1,71.5+3, pcbLength + 4 + 15.1, 0, 1.6, 3, 7, 2.4]\ ]; ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FQPLc0W0FtMnZ3fXpO3Y9%252Fimage.png%3Falt%3Dmedia%26token%3D828c7fb3-496b-4920-99a5-4d3e6c6af7fe&width=768&dpr=4&quality=100&sign=913aec63&sv=2) [PreviousYAPP Box Settings](https://mrwheel-docs.gitbook.io/yappgenerator_en/yapp-box-settings) [NextStandoffs](https://mrwheel-docs.gitbook.io/yappgenerator_en/standoffs) Last updated 1 year ago --- # Connecting Base and Lid (advanced) | YAPPgenerator_en // n(g) = {yappSelfThreading} : Make the insert self threading specify the Screw Diameter in the insertDiameter ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FW1uGLRX1tBdYY6rbYWnq%252Fimage.png%3Falt%3Dmedia%26token%3D564a5d9d-1aba-4fd5-8453-ee684b99d5a5&width=768&dpr=4&quality=100&sign=eeaf64e8&sv=2) Self Threading insert on 1,3 2,4 are standard inserts [PreviousConnecting Base and Lid](https://mrwheel-docs.gitbook.io/yappgenerator_en/connecting-base-and-lid) [NextCutouts](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts) Last updated 6 months ago --- # n(h) - yappFromInside | YAPPgenerator_en `n(h) = { yappFromInside } Make the cut from the inside towards the outside` If this optional non-positional parameter is used then the cuts go from the inside to the outside ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FeiwpwN8diUn37aMMjOeM%252Fimage.png%3Falt%3Dmedia%26token%3D462c739a-45ea-485b-bf93-75b67a6cf3db&width=768&dpr=4&quality=100&sign=c550eb02&sv=2) [PreviousCutouts](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts) [Nextp(6) - Cutout Depth](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/p-6-cutout-depth) Last updated 1 year ago --- # pcbStands (advanced) | YAPPgenerator_en The pcbStands object has a few optional parameters: Copy Optional: p(2) = Height to bottom of PCB from inside of base: Default = standoffHeight negative measures from inside of the lid to the top of the PCB p(3) = PCB Gap : Default = -1 : Default for yappCoordPCB=pcbThickness, yappCoordBox=0 p(4) = standoffDiameter Default = standoffDiameter; p(5) = standoffPinDiameter Default = standoffPinDiameter; p(6) = standoffHoleSlack Default = standoffHoleSlack; p(7) = filletRadius (0 = auto size) p(8) = Pin Length : Default = 0 -> PCB Gap + standoff_PinDiameter Indicated length of pin without the half sphere tip. Example : pcbThickness() only leaves the half sphere tip above the PCB n(a) = { | yappLidOnly | yappBaseOnly } n(b) = { , yappHole, yappTopPin } yappPin = Pin on Base and Hole on Lid yappHole = Hole on Both yappTopPin = Hole on Base and Pin on Lid n(c) = { yappAllCorners, yappFrontLeft | | yappFrontRight | yappBackRight } n(d) = { | yappCoordBox | yappCoordBoxInside } n(e) = { yappNoFillet } : Removes the internal and external fillets and the Rounded tip on the pins n(f) = [yappPCBName, "XXX"] : Specify a PCB. Defaults to [yappPCBName, "Main"] n(g) = yappSelfThreading : make the hole a self threading hole This ignores the holeSlack and would only be usefull if the opposing stand if deleted see sample in Demo_Connectors #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/standoffs/pcbstands-advanced#p-2-height-to-bottom-of-pcb) p(2) - Height to bottom of PCB Well, it defines the height of the pcbStand which is useful if a pcbStand needs to be of a different height than the default (f.i. if you have more than one PCB that needs to fit in your projectbox. #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/standoffs/pcbstands-advanced#p-3-pcb-gap) p(3) - PCB Gap This defines the thickness of the (f.i.) second PCB Take this code: Copy pcbStands = [\ [pcbLength-7, 5, yappAllCorners]\ //-- (0), (1), (2),(3),(4), (5), (6),(7)\ ,[70, 5, 10, 5, 6, default, default, 1]\ ,[70, 40, 10, 5, 6, default, default, 1]\ ,[100, 5, 10, 5, 6, default, default, 1]\ ,[100, 40, 10, 5, 6, default, default, 1]\ ]; The first entry will create four 'standard' pcbStands based on the size of the PCB. The next four entries will create one pcbStand each for a second PCB that is 5mm thick \[p(3)\] and that stands 10mm above the base \[p(2)\]. The fillet radius \[p(7)\] for each of these stands is set to 1mm. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FLAObbP0oyOxMb3LEYrYg%252FsecondPCBstands.png%3Falt%3Dmedia%26token%3D74b6c130-69c8-4420-af28-771d5cda6d99&width=768&dpr=4&quality=100&sign=8140971c&sv=2) [PreviousStandoffs](https://mrwheel-docs.gitbook.io/yappgenerator_en/standoffs) [NextConnecting Base and Lid](https://mrwheel-docs.gitbook.io/yappgenerator_en/connecting-base-and-lid) Last updated 2 days ago --- # YAPP Box Settings | YAPPgenerator_en There are a view settings that the YAPPgenerator needs, to create your perfect project box. From Top to Bottom of the `**YAPP_template.scad**` file: Copy //-- which part(s) do you want to print? printBaseShell = true; printLidShell = true; printSwitchExtenders = true; `**printBaseShell**``:` if `true` will print (generate) the **base** of the projectbox and if `**printLidShell**` is `true` the **lid** will be printed. **printSwitchExtenders** controls whether or not switch extenders are printed. Copy //-- pcb dimensions -- very important!!! pcbLength = 150; // Front to back pcbWidth = 100; // Side to side pcbThickness = 1.6; These `pcb-variables` are the reference for most of the other measurements! Copy //-- padding between pcb and inside wall paddingFront = 15; paddingBack = 8; paddingRight = 12; paddingLeft = 5; With the `paddingFields` you define the space between the PCB and the (inside!) walls of your projectbox. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FaaycTHzBgIn2kAkMOHmI%252FYAPP_padding.png%3Falt%3Dmedia%26token%3D1c07d735-c71f-4b80-8bcb-b3662e359c23&width=768&dpr=4&quality=100&sign=d037f8d0&sv=2) Copy //-- Edit these parameters for your own box wallThickness = 2.4; basePlaneThickness = 4.0; lidPlaneThickness = 1.2; ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FrOvu4g1x0eEmSUx1abhm%252FYAPPthickness.png%3Falt%3Dmedia%26token%3D61e2a3a8-d7c1-4285-899d-2626ee209f03&width=768&dpr=4&quality=100&sign=fa250983&sv=2) `**wallThickness**` determines the thickness of the standing walls. `**basePlaneThickness**` and `**lidPlaneThickness**` respectively determines the thickness of the base plane and the lid plane. Copy //-- total height inside = baseWallHeight + lidWallHeight //-- 35.0 = 15 + 20 //-- total height outside = total-height-inside //-- + basePlaneThickness + lidPlaneThickness //-- 41.2 = 35 + 2.0 + 4.2 baseWallHeight = 15; lidWallHeight = 20; ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FfsPJVpHjW1Kp5HRCq0oy%252FYAPPboxHeights.png%3Falt%3Dmedia%26token%3D1f55bebf-54d1-479e-bd0c-bee1fc4cfc98&width=768&dpr=4&quality=100&sign=b44723bd&sv=2) Copy //-- ridge where base and lid off box can overlap //-- Make sure this isn't less than lidWallHeight ridgeHeight = 4; ridgeSlack = 0.2; //-- the radius of all outside edges and corners roundRadius = 3.0; `**ridgeHeight**` is the height of the overlapping edges that centers the lid nicely on the base. `**ridgeSlack**` makes some room between the lid-ridge and the base-ridge so they snap nicely in each other. `**roundRadius**` is the diameter with which all edges are rounded. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FMWvt6sAogaqAVfxesI9T%252FYAPProundRidge.png%3Falt%3Dmedia%26token%3D4fa86b63-b0a0-4a8e-bb17-327e81f7cb2e&width=768&dpr=4&quality=100&sign=3f7b2af4&sv=2) Copy //-- How much the PCB needs to be raised from the base //-- to leave room for solderings and whatnot standoffHeight = 15.0; //-- used for PCB Supports, Push Button and showPCB standoffDiameter = 7; standoffPinDiameter = 2.4; standoffHoleSlack = 0.4; ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252Faet5ZunjBzyfHix8Xxrx%252FYAPPstandoff_cap.png%3Falt%3Dmedia%26token%3Dbb9d12ab-e19f-4e0c-bc68-7b44c27c451b&width=768&dpr=4&quality=100&sign=21c4aff7&sv=2) ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FBS5QRwGWBS3dtxjhHWCb%252FYAPPstandoff.png%3Falt%3Dmedia%26token%3Dae73905b-906c-430a-8ac6-e8608cc31087&width=768&dpr=4&quality=100&sign=15556823&sv=2) [PreviousYAPPgenerator API](https://mrwheel-docs.gitbook.io/yappgenerator_en/yappgenerator-api) [NextMultiple PCBs](https://mrwheel-docs.gitbook.io/yappgenerator_en/yapp-box-settings/multiple-pcbs) Last updated 1 year ago --- # Cutouts in the Front Plane | YAPPgenerator_en ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252F3AoQEkOrmoLWhDWn88CK%252FYAPPcutoutsFront.png%3Falt%3Dmedia%26token%3D1874be6e-f316-4e87-a3db-fbd4171b14b6&width=768&dpr=4&quality=100&sign=d695a471&sv=2) This code: Copy cutoutsFront = [\ [10, 0, 10, 14, 0, yappRectangle, yappDefault, 0, yappCenter]\ ,[35, 0, 10, 14, 0, yappRectangle, yappDefault, -20, yappCenter]\ ,[60, 0, 10, 14, 0, yappRectangle, yappDefault, -45, yappCenter, yappCoordPCB]\ ]; Will produce this: ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FggOGG3dMYWVAfKZBvWNo%252FYAPPcutoutsFront-c.png%3Falt%3Dmedia%26token%3D585d98df-f5bd-4a37-a6ca-95df42ef9a93&width=768&dpr=4&quality=100&sign=44b871a2&sv=2) [PreviousCutouts in the Lid Plane](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/placement-of-the-project-box/cutouts-in-the-lid-plane) [NextCutouts in the Back Plane](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/placement-of-the-project-box/cutouts-in-the-back-plane) Last updated 1 year ago --- # What you need | YAPPgenerator_en * openSCAD A recent version of “**openSCAD**” (can be [downloaded here](https://openscad.org/downloads.html) ). * the YAPP generator "`**YAPP_Box**`" (can be [downloaded here](https://github.com/mrWheel/YAPP_Box) ). ### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/what-you-need#download-the-yapp_box-as-a-.zip-file) Download the YAPP\_Box as a .zip file You can download the `YAPP_Box` as a “`.zip`” file from [github](https://github.com/mrWheel/YAPP_Box) . ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FdsVIUKZ0dtUiviq9OuLI%252FDownload_zip_YAPP_Box.png%3Falt%3Dmedia%26token%3Dafbe4f40-099e-429a-bdf6-c829b6d9f217&width=768&dpr=4&quality=100&sign=a55a5c51&sv=2) Extract the “`**YAPP_Box-main.zip**`” file into your openSCAD projects folder. You now have a new folder “`**YAPP_Box-main**`” containing several sample files and the `YAPPgenerator.scad` library. As there are many examples in this folder I would leave the folder structure as it is and copy the examples (in the `examples` sub-folder) you want to try out to your opensSCAD project folder. Also best practise is not to change the `YAPP_Template.scad` file but save a copy to the folder where you want to make a new project box. That way you leave the `YAPP_Template.scad` in tact for your next project. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FQ2ijKTpwMTaDHBQyuBrw%252FYAPP_zip.png%3Falt%3Dmedia%26token%3D479a6cff-6e64-49e9-8aad-a2a6d96e983a&width=768&dpr=4&quality=100&sign=5ab14c45&sv=2) Download .zip Depending on how you downloaded YAPP (`git clone` or by a `.zip` file) **YAPP\_Box\_main** sometimes is named **YAPP\_Box** ### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/what-you-need#clone-the-yapp_box-from-github) Clone the YAPP\_Box from github If you have `git` installed on your computer you can also clone the `YAPP_Box`. Click on the two squares icon to copy the URL to the clipboard. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FERWTE4J5BINF6QlO7VT4%252FClone_YAPP_Box.png%3Falt%3Dmedia%26token%3D9bd97232-409c-4598-8894-4f1685a6bd6b&width=768&dpr=4&quality=100&sign=f045a12e&sv=2) Copy clone URL Now, in a terminal window go to the folder where you want to save the library and clone the `YAPP_Box` using the URL you just copied to the clipboard: Copy cd git clone https://github.com/mrWheel/YAPP_Box.git You now have a folder that looks like this: ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FFh5M6ZKy0ghSS6Q5qHJR%252FYAPP_Clone.png%3Falt%3Dmedia%26token%3Dbc929ef7-695e-4c81-a5df-a9d1c13bd954&width=768&dpr=4&quality=100&sign=de96cc64&sv=2) cloned YAPP\_Box [](https://mrwheel-docs.gitbook.io/yappgenerator_en/what-you-need#where-to-put-the-yappgenerator.scad) Where to put the YAPPgenerator.scad ----------------------------------------------------------------------------------------------------------------------------------------------- In the folder "`YAPP_Box`" you will find the `YAPPgenerator.scad` file that is the backbone of the library. There are three ways to organize the way you want to work with the YAPPgenerator. * **\[1\]** Save the `YAPPgenerator.scad` library in the library folder of your openSCAD installation ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FvO4gcDUD4fciBd1Xawqd%252FshowLibraryFolder.png%3Falt%3Dmedia%26token%3D16881f86-104c-4e1d-b0ab-de0ba83e4f87&width=768&dpr=4&quality=100&sign=5f83fc44&sv=2) And place the `YAPPgenerator.scad` file in that folder. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FHO3ImvJ9CX749bRpyeLk%252FlibraryFolder.png%3Falt%3Dmedia%26token%3Df307eb9c-eabb-4dae-b804-75f29aa077be&width=768&dpr=4&quality=100&sign=ab1fba6f&sv=2) Now, in your openSCAD programs you can include this (now **global**) library with the following code: Copy // your openSCAD program include . // your program code goes here . //---- This is where the magic happens ---- YAPPgenerate(); * **\[2\]** Save the YAPPgenerator library in a convenient folder of your choice or leave it at `YAPP_Box` (if you git-cloned the library) or at `YAPP_Box-main` (if you downloaded the library as a `.zip` file). In all your openSCAD programs you need to use the exact location of the `YAPPgenerator.scad` library. If, for instance, you have placed the library in the folder `"/User/openScadProjects/YAPP_Box-main"` your program should look like this: Copy // your openSCAD program include . // your program code goes here . //---- This is where the magic happens ---- YAPPgenerate(); * **\[3\]** Save the YAPPgenerator library in the same folder where you write the code for a box you want to make. You can now insert the library as in the next code fragment: Copy // your openSCAD program include // or: include <./YAPPgenerator.scad> . // your program code goes here . //---- This is where the magic happens ---- YAPPgenerate(); [](https://mrwheel-docs.gitbook.io/yappgenerator_en/what-you-need#pros-and-cons-of-the-three-methods) Pros and Cons of the three methods --------------------------------------------------------------------------------------------------------------------------------------------- 1. If you place the library in the openSCAD global library folder: * **Pro**: Conveniënt especially if you are not over organized. You have only one copy of the YAPPgenerator library. * **Con**: If you update the library to a new version there is a change your previously created boxes won't compile or have a different outcome. 2. If you place the library in a folder of your choosing: * **Pro**: You only have one copy of the library. * **Con**: You have to use the whole path to the library in all your box-programs. If you update the library to a new version there is a change your previously created boxes won't compile or won't look the same. 3. If you save the YAPPgenerator library in the same folder where you create a project: * **Pro**: Even if you install a new version of the YAPPgenerator library this won't influence your box-program (as long as you don't save the new library in your project-box folder). * **Con**: You have multiple copies of the library on your system. Of course you can store a "_production version_" in the global library folder (1) and a "_new version_" in the same folder where create a project box (3) so you can test the new functionality/API of the library. [PreviousYet Another Parametric Projectbox generator](https://mrwheel-docs.gitbook.io/yappgenerator_en) [NextGetting Started](https://mrwheel-docs.gitbook.io/yappgenerator_en/getting-started) Last updated 1 year ago --- # Placement of the project box | YAPPgenerator_en There is an array for each face of the box: `cutoutsBase = [ ]; cutoutsLid = [ ]; cutoutsFront = [ ]; cutoutsBack = [ ]; cutoutsLeft = [ ]; cutoutsRight = [ ];` [Previousp(6) - Cutout Depth](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/p-6-cutout-depth) [NextCutouts in the Base Plane](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/placement-of-the-project-box/cutouts-in-the-base-plane) Last updated 1 year ago --- # Standoffs | YAPPgenerator_en The `**pcbStandoffs**` defines the distance between the top of the “**base plane**” and the bottom of the printed circuit board. Opposite the `**standoffs**` are automatically made `**pushdowns**` on the `lid` that are exactly so long that the circuit board is neatly clamped between them. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FzNQv88ejmpEMbf0myiWF%252FYAPP_stands-768x484.png%3Falt%3Dmedia%26token%3D0d79a2e9-b695-4019-baeb-832f408dfc5c&width=768&dpr=4&quality=100&sign=a473b15c&sv=2) The `**pcbStands**` can be fitted with `**pins**` so that the printed circuit board is also fixed on the X and Y axes. How many “`pcb standoffs`” should come and where they should be is specified in the array `**pcbStands**`. The position of each **pcbStand** and it's dimensions are specified in one line. This is how you use the `**pcbStands**` array: Copy //=================================================================== // *** PCB Supports *** // Pin and Socket standoffs //------------------------------------------------------------------- // Default origin = yappCoordPCB : pcb[0,0,0] // // Parameters: // Required: // p(0) = posX // p(1) = posY // Optional: // p(2) = Height to bottom of PCB : Default = standoffHeight // p(3) = PCB Gap : Default = -1 : Default for yappCoordPCB=pcbThickness, yappCoordBox=0 // p(4) = standoffDiameter Default = standoffDiameter; // p(5) = standoffPinDiameter Default = standoffPinDiameter; // p(6) = standoffHoleSlack Default = standoffHoleSlack; // p(7) = filletRadius (0 = auto size) // n(a) = { | yappLidOnly | yappBaseOnly } // n(b) = { , yappHole } // Baseplate support treatment // n(c) = { yappAllCorners, | yappFrontLeft | yappFrontRight | yappBackRight } // n(d) = { | yappCoordBox | yappCoordBoxInside } // n(e) = { yappNoFillet } // n(f) = [yappPCBName, "XXX"] : Specify a PCB. Defaults to [yappPCBName, "Main"] // n(g) = yappSelfThreading : make the hole a self threading hole // This ignores the holeSlack and would only be usefull // if the opposing stand if deleted see sample in Demo_Connectors //------------------------------------------------------------------- For every entry in the pcbStands array at least the first two parameters (_posX_ and _posY_) are required. All the others can be omitted. Copy pcbStands = [\ [5, 5] //-- Add one pcbStand 5mm from the [0,0,0] corners of the PCB\ ] If you want to create four pcbStands in all four corners of the PCB you have to add `yappAllCorners`: Copy pcbStands = [\ [5, 5, yappAllCorners] //-- Add pcbStands 5mm for all four corners of the PCB\ ] This entry creates four pcbStands in all four corners of the PCB. Every pcbStand will have the default **Optional** values _standoffHeight_, _pcbThickness_, _standoffDiameter_, _standoffPinDiameter_, _standoffHoleSlack_ and _automatic calculated fillet_ and the _**n**__\-values yappBoth, yappPin,_ and in the _yappCoordPCB_ coördination system_._ This results in this: ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FDWpCM59CNqR9owZVJamW%252FpcbStands_V30%2520simplest.png%3Falt%3Dmedia%26token%3De38f7197-227a-47bc-bc89-39e392884798&width=768&dpr=4&quality=100&sign=5156056a&sv=2) You can also code this entry as: Copy pcbStands = [\ [5, 5, standoffHeight, yappDefault\ , standoffDiameter, standoffPinDiameter, standoffHoleSlack\ , 0, yappBoth, yappPin, yappAllCorners, yappCoordPCB]\ ] ... or as: Copy pcbStands = [\ [5, 5, yappBoth, yappPin, yappFrontLeft]\ ,[5, 5, yappPin, yappBoth, yappFrontRight]\ ,[5, 5, yappBoth, yappPin, yappBackLeft]\ ,[5, 5, yappBackRight, yappPin, yappBoth]\ ]; Each line in the array provides one standoff. \[p(2)\] **Height to bottom of PCB** defaults to _standoffHeight_ but can be changed to any number. \[p(3)\] **PCB Gap** defaults to '_**\-1**_' which makes it dependent of the used coordination system (_yappCoordPCB_ (default) or _yappCoordBox_) or you can use a number. \[p(4)\] **standoffDiameter** defaults to the global setting _standoffDiameter_ but can be overwritten with any number (within limits). \[p(5)\] **standoffPinDiameter** defaults to the global setting _standoffPinDiameter_ but can be overwritten with an other value. \[p(6)\] **standoffHoleSlack** is the space between the hole and the pin_._ It defaults to the global setting _standoffHoleSlack_ but can be overwritten with an other value. \[p(7)\] **filletRadius** defaults to '_0_' which means it will automatically set the fillet depending on the _standoffDiameter_. Parameter **n(a)** can be one of the following (defaults to _yappBoth_): Copy yappBoth: place a pcbStand both on the Base and on the Lid. yappLidOnly: the pcbStand is only printed above (lidHalf) yappBaseOnly: the pcbStand will only be printed at the base (baseHalf). Parameter **n(b)** can be one of the following (defaults to _yappPin_): Copy yappPin: the pcbStand is provided with a “pin” yappHole: the pcbStand is provided with a “hole” If the **n(a)** parameter is `**yappBoth**` and the **n(b)** parameter is specified as `**yappPin**` then the pin will be printed on the _baseHalf_ and a hole on the _lidHalf_. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252Fmw0ljrCVg4ZV1t2Wundh%252FYAPPpcbstands.png%3Falt%3Dmedia%26token%3D909cddbe-59f8-4749-9bac-65844a7b7334&width=768&dpr=4&quality=100&sign=5ee41836&sv=2) ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252F72XJvxIgTTmMtrWiFdJs%252FYAPPpcbstand-3D.png%3Falt%3Dmedia%26token%3Dc08d3c83-a33c-4f40-b7ae-8a660676a252&width=768&dpr=4&quality=100&sign=afc3fc02&sv=2) Parameter **n(c)** can be one or more of the following Copy yappAllCorners: A pcbStand will be created in all four corners of the PCB yappFrontLeft: A pcbStand will be created in the front-left corner yappFrontRight: A pcbStand will be created in the front-right corner yappBackLeft: A pcbStand will be created in the back-left corner (default) yappBackRight: A pcbStand will be created in the back-right corner Parameter **n(d)** can be one of the following (defaults to _yappCoordPCB_) Copy yappCoordPCB: Coördinate [0,0,0] will be from the PCB (default) yappCoordBox: Coördinate [0,0,0] will be from the project box yappCoordBoxInside: Coördinate [0,0,0] will be from the inside of the project box With parameter **n(e)** you can suppress the creation of fillets Copy yappNoFillet: no fillets will be created It is possible to print a hole both on the Base (below) and on the Lid (above) by specifying the **n(b)** parameter `**yappHole**`: Copy [3, 12, yappHole] A _**fillet**_ is a structure to strengthen the connectors by providing extra mass. Fillets are automatically added unless _yappNoFillets_ is used. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252F3JW0fSIq08fh0kqaGPnA%252Ffillets_v30.png%3Falt%3Dmedia%26token%3D60ec7f1d-72e0-40cb-8fa4-0c3b9aa88977&width=768&dpr=4&quality=100&sign=fff0c7cf&sv=2) If you want to change the filletRadius (Optional parameter **p(7)**) then you have to provide al preceding params as well. But if you want to keep the default values for these parameters (in this case p(2, 3, 4, 5, and 6)) you can just enter '**undef**' for each of them. Copy [5, 5, yappDefault, yappDefault, yappDefault, yappDefault, yappDefault, 5] This will set the _fillerRadius_ to 5 (diameter to 10). [PreviousMultiple PCBs](https://mrwheel-docs.gitbook.io/yappgenerator_en/yapp-box-settings/multiple-pcbs) [NextpcbStands (advanced)](https://mrwheel-docs.gitbook.io/yappgenerator_en/standoffs/pcbstands-advanced) Last updated 6 months ago --- # Cutouts in the Lid Plane | YAPPgenerator_en This code: Copy cutoutsLid = [ \ [10, 10, 10, 15, 0, yappRectangle] //-- A\ ,[25, 15, 10, 15, 0, yappRectangle, yappDefault, -30] //-- B\ ,[45, 10, 10, 15, 2, yappRoundedRect] //-- C\ ,[66, 15, 10, 15, 2, yappRoundedRect, yappDefault, 30] //-- D\ ,[10, 40, 8, 0, 6, yappCircleWithFlats] //-- E\ ,[25, 40, 4, 3, 6, yappCircleWithKey] //-- F\ ,[45, 40, 8, 0, 6, yappCircleWithFlats, yappDefault, yappDefault, yappCenter] //-- G\ ,[60, 40, 4, 3, 6, yappCircleWithKey, yappDefault, yappDefault, yappCenter] //-- H\ ]; Will result in this lid: ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FRAArNYpYIk0jxafJ4NnM%252FcutoutsLid.png%3Falt%3Dmedia%26token%3D206a695c-cbd6-49f5-9020-361e75140c89&width=768&dpr=4&quality=100&sign=179783f6&sv=2) [PreviousCutouts in the Base Plane](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/placement-of-the-project-box/cutouts-in-the-base-plane) [NextCutouts in the Front Plane](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/placement-of-the-project-box/cutouts-in-the-front-plane) Last updated 1 year ago --- # Connecting Base and Lid | YAPPgenerator_en ### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/connecting-base-and-lid#connectors-to-connect-base-and-lid-together) Connectors to connect Base and Lid together With this type of connector you can connect the Base and the Lid together. Copy //=================================================================== // *** Connectors *** // Standoffs with hole through base and socket in lid for screw type connections. //------------------------------------------------------------------- // Default origin = yappCoordBox: box[0,0,0] // // Parameters: // Required: // p(0) = posX // p(1) = posY // p(2) = pcbStandHeight // p(3) = screwDiameter // p(4) = screwHeadDiameter (don't forget to add extra for the fillet) // p(5) = insertDiameter // p(6) = outsideDiameter // Optional: // p(7) = PCB Gap : Default = -1 : Default for yappCoordPCB=pcbThickness, yappCoordBox=0 // p(8) = filletRadius : Default = 0/Auto(0 = auto size) // n(a) = { | yappFrontLeft | yappFrontRight | yappBackLeft | yappBackRight } // n(b) = { | yappCoordPCB | yappCoordBoxInside } // n(c) = { yappNoFillet } // n(g) = {yappSelfThreading} : Make the insert self threading specify the Screw Diameter in the insertDiameter //------------------------------------------------------------------- For every entry in the connectors array at least the first seven (0..6) parameters are required. All the others can be omitted. Look at [YAPPgenerator API](https://mrwheel-docs.gitbook.io/yappgenerator_en/yappgenerator-api) to see how to use **Optional** parameters. Example: Copy connectors = [\ [10, 10, standoffHeight\ , 2.7 //-- diameter of the screw (add some slack)\ , 5 //-- the diameter of the screw head\ , 4.1 //-- the diameter of the insert\ , 9] //-- the outside diameter of the connector\ ]; ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FvhBxdkvCNGTWOwj5V7yY%252FYAPP_connector.png%3Falt%3Dmedia%26token%3Df214179a-2862-4ef7-b228-45df70fca1ef&width=768&dpr=4&quality=100&sign=b8672553&sv=2) The **Optional** parameter **n(b)** specifies whether there will be space for the PCB (_yappCoordPCB_) between the two parts of the connector or not (default _yappCoordBox_) as well as the origin of the posX and posY values. Example: Copy connectors = [\ [10, 10, standoffHeight\ , 2.7 //-- diameter of the screw (add some slack)\ , 5 //-- the diameter of the screw head\ , 4.1 //-- the diameter of the insert\ , 9 //-- the outside diameter of the connector\ , yappCoordPCB] //-- use [0,0,0] of the PCB os origen\ ]; Results in these connectors: ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252Fj4npBIjPvsBUfFpkfZh9%252FYAPP_connectPCB.png%3Falt%3Dmedia%26token%3De4aa6457-e82d-401f-b614-aed00c788f79&width=768&dpr=4&quality=100&sign=8b20b3b1&sv=2) Thanks to _Oliver Grafe_ The depth of the screw is changed with the standoffHeight so you don't have to buy new screws every time you make a projectbox with a different height. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FIrnDA34WZZVHiVCS5dfy%252FYAPPstandoffHeight.png%3Falt%3Dmedia%26token%3D13632e6c-7c84-4570-9a38-c2cc8c7f8b4f&width=768&dpr=4&quality=100&sign=a9b59cee&sv=2) ### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/connecting-base-and-lid#melt-inserts) Melt Inserts You have to press/melt an `**insert**` into the Lid-connector. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252F467Dt24Jy5seo8mtinBS%252FRuthex-insert-a.png%3Falt%3Dmedia%26token%3Dca79c883-082f-4fe6-afd2-86ea12414090&width=768&dpr=4&quality=100&sign=ba6d6906&sv=2) ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FXcQqVD2pd38uGKaQdczm%252FRuthex-insert-b.png%3Falt%3Dmedia%26token%3D709d0d5a-54df-43a5-81a2-4c85061e5429&width=768&dpr=4&quality=100&sign=fb9cdaec&sv=2) [PreviouspcbStands (advanced)](https://mrwheel-docs.gitbook.io/yappgenerator_en/standoffs/pcbstands-advanced) [NextConnecting Base and Lid (advanced)](https://mrwheel-docs.gitbook.io/yappgenerator_en/connecting-base-and-lid/connecting-base-and-lid-advanced) Last updated 6 months ago --- # p(6) - Cutout Depth | YAPPgenerator_en In the previous paragraph we have only used the basic options for most of the objects but as you have seen from the API's, most objects have more options to tailer the project box to your needs. We will now dive in the advanced cutouts options. All cutout objects have the following optional parameters: p(6) - depth This parameter defines how far from the outside of the lid this cutout should extend. This can be handy if you need a pcbStand or connector that is close to this cutout. Look at this code: Copy cutoutsLeft = [\ [13, 0, 15, 10, 2, yappRoundedRect, yappCoordPCB, yappCenter]\ ]; And: Copy cutoutsLeft = [\ [13, 0, 15, 10, 2, yappRoundedRect, 10, yappCoordPCB, yappCenter]\ ]; The result for the first object is on the left, for the second on the right: ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FBuevAHwoYeSbRHxxO3GF%252FdepthParameter.png%3Falt%3Dmedia%26token%3Dbea19421-fcf0-4550-84b1-c5276d47c4d3&width=768&dpr=4&quality=100&sign=b8f9e9a&sv=2) [Previousn(h) - yappFromInside](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/n-h-yappfrominside) [NextPlacement of the project box](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/placement-of-the-project-box) Last updated 1 year ago --- # Cutouts in the Base Plane | YAPPgenerator_en ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FqUae7g7SRXgSKOhFm96P%252FYAPPcutoutsBase.png%3Falt%3Dmedia%26token%3Dfc6bdb0b-43b4-43ef-98b3-72bc93aa0088&width=768&dpr=4&quality=100&sign=c7ac02fc&sv=2) This code: Copy cutoutsBase = [\ [10, 10, 10, 15, 0, yappRectangle] //--- A\ ,[25, 15, 10, 15, 0, yappRectangle, yappDefault, -30] //--- B\ ,[45, 10, 10, 15, 2, yappRoundedRect] //--- C\ ,[60, 15, 10, 15, 2, yappRoundedRect, yappDefault, -30] //--- D\ ,[50, 40, 5, 0, 6, yappCircle] //--- G\ ,[20, 40, 10, 15, 0, yappRectangle, yappDefault, yappDefault, yappCenter] //--- E\ ,[35, 40, 10, 15, 0, yappRectangle, yappDefault, -30, yappCenter] //--- F\ ]; Creates this cutouts in the base plane: ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FGYc8FKmf7xxzygMYB5xt%252FcutoutsBase.png%3Falt%3Dmedia%26token%3D758e9d8c-df14-4ed4-bf1a-6047658cebcd&width=768&dpr=4&quality=100&sign=a779fccd&sv=2) [PreviousPlacement of the project box](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/placement-of-the-project-box) [NextCutouts in the Lid Plane](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/placement-of-the-project-box/cutouts-in-the-lid-plane) Last updated 1 year ago --- # p(7) - Angle | YAPPgenerator_en [PreviousOptional Parameters](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/optional-parameters) [Nextn(a) = Polygon Definition](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/optional-parameters/n-a-polygon-definition) --- # n(f) - Alternate Origin | YAPPgenerator_en Copy n(f) = { , yappAltOrigin } // Only affects Top(lid), Back and Right Faces Specifying yappLeftOrigin will invert the x-axis if on the lid, back or right faces. These faces normally have the x axis starting at the right end (if you are holding the box with that face facing you). This is to have them match up with the opposite face of the cube. [Previousn(e) - Position reference](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/optional-parameters/n-e-position-reference) [Nextn(g) - PCB Selection](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/optional-parameters/n-g-pcb-selection) Last updated 1 year ago --- # Optional Parameters | YAPPgenerator_en All cutout objects have the following optional parameters: Copy Optional: p(6) = depth : Default = 0/Auto : 0 = Auto (plane thickness) p(7) = angle : Default = 0 n(a) = { yappPolygonDef } : Required if shape = yappPolygon specified - n(b) = { yappMaskDef } : If a yappMaskDef object is added it will be used as a mask for the cutout. n(c) = { [yappMaskDef, hOffset, vOffset, rotation] } : If a list for a mask is added it will be used as a mask for the cutout. With the Rotation and offsets applied. This can be used to fine tune the mask placement within the opening. n(d) = { | yappCoordBox | yappCoordBoxInside } n(e) = { , yappCenter } n(f) = { , yappAltOrigin } // Only affects Top(lid), Back and Right Faces n(g) = [yappPCBName, "XXX"] : Specify a PCB. Defaults to [yappPCBName, "Main"] n(h) = { yappFromInside } Make the cut from the inside towards the outside [PreviousShapes](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/shapes) [Nextp(7) - Angle](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/optional-parameters/p-7-angle) Last updated 1 year ago --- # n(g) - PCB Selection | YAPPgenerator_en Copy n(g) = [yappPCBName, "XXX"] : Specify a PCB. Defaults to [yappPCBName, "Main"] See [Specify a PCB](https://mrwheel-docs.gitbook.io/yappgenerator_en/advanced-options/specify-a-pcb) for usage instructions. [Previousn(f) - Alternate Origin](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/optional-parameters/n-f-alternate-origin) [NextBox Mounts](https://mrwheel-docs.gitbook.io/yappgenerator_en/box-mounts) Last updated 1 year ago --- # n(a) = Polygon Definition | YAPPgenerator_en Copy n(a) = { yappPolygonDef } : Required if shape = yappPolygon specified * Predefined Shapes:" * shapeIsoTriangle - An Isosceles triangle. Note the width is equal to the bounding width but the height is less. * shapeIsoTriangle2 - an Isosceles triangle with the center at the center of the bounding box. * shapeHexagon - a hexagon centered in the bounding rectangle. * shape6ptStar - a 6 pointed star centered in the bounding rectangle. * shapeTriangle - triangle with height and width matching the bounding rectangle but centered in the rectangle. * shapeTriangle2- triangle with height and width matching the bounding rectangle. At 90 degree increments the base of the triangle aligns with the bounding box. * shapeArrow - Home plate shaped arrow. Useful for buttons. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FkA3Trbsoy8PCbFUyvRDD%252Fshape_animation.gif%3Falt%3Dmedia%26token%3D1bfe36ba-6e2c-47c7-bd3f-467ec6a826c5&width=768&dpr=4&quality=100&sign=c051d7c6&sv=2) 20x20 shapes with the bounding rectangle in pink. Notice how the center affects the rotation of the shapes. see [Polygon Definition](https://mrwheel-docs.gitbook.io/yappgenerator_en/advanced-options/polygon-definitions) to create your own polygons. [Previousp(7) - Angle](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/optional-parameters/p-7-angle) [Nextn(b)/n(c) - Mask Definition](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/optional-parameters/n-b-n-c-mask-definition) Last updated 1 year ago --- # n(d) - Coordinate System | YAPPgenerator_en Copy n(d) = { | yappCoordBox | yappCoordBoxInside } This specifies the coordinate system to use for the positioning of the cutout. See [Coordinate Systems](https://mrwheel-docs.gitbook.io/yappgenerator_en/coordinate-systems) for details. [Previousn(b)/n(c) - Mask Definition](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/optional-parameters/n-b-n-c-mask-definition) [Nextn(e) - Position reference](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/optional-parameters/n-e-position-reference) Last updated 1 year ago --- # n(e) - Position reference | YAPPgenerator_en Copy n(e) = { , yappCenter } Cutouts can be created in two ways, either at the origin or centered . yappOrigin is the default for all shapes. It specifies the reference to be the lower left (closest to the faces origin) of the bounding rectangle. see [Position reference](https://mrwheel-docs.gitbook.io/yappgenerator_en/advanced-options/position-reference) [Previousn(d) - Coordinate System](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/optional-parameters/n-d-coordinate-system) [Nextn(f) - Alternate Origin](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/optional-parameters/n-f-alternate-origin) Last updated 1 year ago --- # Shapes | YAPPgenerator_en There are six shapes for cutouts: yappRectangle**, rectangles with rounded corners, circles** , **circles with flat sides,** **circles with a key** and **polygons**. * yappRectangle * yappRoundedRect * yappCircle * yappCircleWithFlats * yappCircleWithKey * yappPolygon ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252F8Xuy5JySAuMsrluIJbVn%252Fimage.png%3Falt%3Dmedia%26token%3D7b0d4fcf-e1cb-4dca-9d92-6eafce09a388&width=768&dpr=4&quality=100&sign=4f18f5fe&sv=2) 5 basic shapes and polygon * yappRectangle * Uses the width and length parameters. radius is ignored * yappRoundedRect * Uses the width and length parameters to define the rectangle and radius for the corner radius. * yappCircle * Uses the radius parameter. Width and length are ignored. * yappCircleWithFlats * Uses the radius parameters and the width parameter for the distance between the flat sides. * yappCircleWithKey * Uses the radius parameters and the width parameter for the width of the key and the length as the depth of the key. * yappPolygon * Uses the width and length parameters to scale the polygon. The polygon should be defined with a base size of 1x1 (-0.5 to 0.5 in both X and Y). A yappPolygonDef is required. [PreviousCutouts in the Right Plane](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/placement-of-the-project-box/cutouts-in-the-right-plane) [NextOptional Parameters](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/optional-parameters) Last updated 1 year ago --- # Cutouts in the Back Plane | YAPPgenerator_en This code: Copy cutoutsBack = [\ [10, -4, 20, 10, 0, yappRectangle, yappCoordPCB]\ ,[55, 0, 10, 14, 0, yappRectangle, yappCenter]\ ,[40, 5, 10, 10, 5, yappCircle, yappCoordPCB, yappCenter]\ ]; ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FsYcSdhmzjU2tXpdllZH8%252FYAPPcutoutsBack.png%3Falt%3Dmedia%26token%3D4598172d-d350-4f5e-b2b2-123ea903f2dc&width=768&dpr=4&quality=100&sign=ab769ba3&sv=2) [PreviousCutouts in the Front Plane](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/placement-of-the-project-box/cutouts-in-the-front-plane) [NextCutouts in the Left Plane](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/placement-of-the-project-box/cutouts-in-the-left-plane) Last updated 1 year ago --- # Cutouts in the Right Plane | YAPPgenerator_en This code: Copy cutoutsRight = [\ [10, 0, 0, 0, 7, yappCircle, yappCenter, yappCoordPCB]\ ,[40, 0, 10, 14, 0, yappRectangle]\ ,[70, 0, 10, 14, 0, yappRectangle, yappCenter]\ ]; ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FwBzr4JN1KKMbPWe4fyBQ%252FYAPPcutoutsRight.png%3Falt%3Dmedia%26token%3D21e17f15-85ba-4328-987b-6b7ca3a7a59f&width=768&dpr=4&quality=100&sign=f7c72196&sv=2) ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252Fmxle4Degu1l6qjfwXlNA%252FYAPPcutoutsRight-S.png%3Falt%3Dmedia%26token%3D4db572e1-6f8e-4f9d-b8cd-1ef3fe539834&width=768&dpr=4&quality=100&sign=41470e53&sv=2) [PreviousCutouts in the Left Plane](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/placement-of-the-project-box/cutouts-in-the-left-plane) [NextShapes](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/shapes) Last updated 1 year ago --- # Cutouts in the Left Plane | YAPPgenerator_en This code: Copy cutoutsLeft = [\ [10, 0, 0, 0, 7, yappCircle, yappCenter]\ ,[40, 0, 10, 14, 0, yappRectangle, yappCoordPCB]\ ,[70, 0, 10, 14, 0, yappRectangle, yappCenter, yappCoordPCB]\ ]; ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FVEPXhZMqmqrSiFiNPMmU%252FYAPPcutoutsLeft.png%3Falt%3Dmedia%26token%3D4949740b-3ca8-401f-8c0d-9afc587f6663&width=768&dpr=4&quality=100&sign=8f77629&sv=2) ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FfRDdYRlW9TmLGWnyI7AA%252FYAPPcutoutsLeft-S.png%3Falt%3Dmedia%26token%3Da7453bad-9d25-4f3c-8a32-98382642935a&width=768&dpr=4&quality=100&sign=b7432778&sv=2) [PreviousCutouts in the Back Plane](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/placement-of-the-project-box/cutouts-in-the-back-plane) [NextCutouts in the Right Plane](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/placement-of-the-project-box/cutouts-in-the-right-plane) Last updated 1 year ago --- # Optional Parameters | YAPPgenerator_en * p(9) = Height to top of PCB : Default = standoffHeight + pcbThickness * This can be used to specify the distance from the bottom of the case to eh bottom of the Switch. If the switch isn't located on a PCB. * p(10) = { | yappCircle | yappPolygon | yappRoundedRect | yappCircleWithFlats | yappCircleWithKey } : Shape of the pushbutton. See Cutouts->Shapes for examples. * p(11) = angle : Default = 0 * p(12) = filletRadius : Default = 0/Auto * p(13) = buttonWall : Default = 2.0; * p(14) = buttonPlateThickness : Default= 2.5; * p(15) = buttonSlack : Default= 0.25; * p(16) = snapSlack : Default= 0.10; * n(a) = { | yappCoordBox | yappCoordBoxInside } * n(b) = { , yappLeftOrigin } * n(c) = { yappNoFillet } * n(d) = \[yappPCBName, "XXX"\] : Specify a PCB. Defaults to \[yappPCBName, "Main"\] [PreviousPush Buttons](https://mrwheel-docs.gitbook.io/yappgenerator_en/push-buttons) [NextRidge Extension](https://mrwheel-docs.gitbook.io/yappgenerator_en/ridge-extension) Last updated 1 year ago --- # Polygon Definitions | YAPPgenerator_en { yappPolygonDef } : Required if shape = yappPolygon specified _**Coming Soon!**_ [PreviousPosition reference](https://mrwheel-docs.gitbook.io/yappgenerator_en/advanced-options/position-reference) [NextMask Definitions](https://mrwheel-docs.gitbook.io/yappgenerator_en/advanced-options/mask-definitions) Last updated 1 year ago --- # Advanced Options | YAPPgenerator_en In the previous paragraphs we have only used the basic options for most of the objects but as you have seen from the API's, most objects have more options to tailer the project box to your needs. We will now dive in the advanced options. [PreviousDebugging](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging) [NextSpecify a PCB](https://mrwheel-docs.gitbook.io/yappgenerator_en/advanced-options/specify-a-pcb) Last updated 1 year ago --- # Position reference | YAPPgenerator_en Copy n(e) = { , yappCenter } Object locations can be specified in two ways, either at the origin or centered . yappOrigin specifies the reference to be the origin of the bounding rectangle. yappCenter changes the reference to be the center of the object. Copy // Sample Lid Cutouts cutoutsLid = [\ [10, 10, 10, 20, undef, yappRectangle] //(A)\ ,[10, 50, 10, 20, undef, yappRectangle, yappCenter] //(B)\ \ ,[30, 10, undef, undef, 5, yappCircle, ] //(C)\ ,[30, 50, undef, undef, 5, yappCircle, yappCenter] //(D)\ \ ,[50, 10, 10, 20, 2, yappRoundedRect, ] //(E)\ ,[50, 50, 10, 20, 2, yappRoundedRect, yappCenter] //(F)\ \ ,[70, 10, 15, undef, 10, yappCircleWithFlats, ] //(G)\ ,[70, 50, 15, undef, 10, yappCircleWithFlats, yappCenter] //(H)\ \ ,[90, 10, 5, 2, 8, yappCircleWithKey, ] //(I)\ ,[90, 50, 5, 2, 8, yappCircleWithKey, yappCenter] //(J)\ \ ,[110, 10, 20, 20, undef, yappPolygon, shape6ptStar] //(K)\ ,[110, 50, 20, 20, undef, yappPolygon, shape6ptStar, yappCenter] //(L)\ \ ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FnElaHm1Srf3rxYKFhMbi%252FyappCenterDemo.png%3Falt%3Dmedia%26token%3Df5ed1282-de07-4dbe-8fa6-60a2462b0be1&width=768&dpr=4&quality=100&sign=b33ef13c&sv=2)\ \ [PreviousSpecify a PCB](https://mrwheel-docs.gitbook.io/yappgenerator_en/advanced-options/specify-a-pcb)\ [NextPolygon Definitions](https://mrwheel-docs.gitbook.io/yappgenerator_en/advanced-options/polygon-definitions)\ \ Last updated 2 days ago --- # Specify a PCB | YAPPgenerator_en Copy n(g) = [yappPCBName, "XXX"] : Specify a PCB. Defaults to [yappPCBName, "Main"] [PreviousAdvanced Options](https://mrwheel-docs.gitbook.io/yappgenerator_en/advanced-options) [NextPosition reference](https://mrwheel-docs.gitbook.io/yappgenerator_en/advanced-options/position-reference) Last updated 1 year ago --- # Images | YAPPgenerator_en This is the API for labels: Copy Default origin = yappCoordBox: box[0,0,0] Parameters: p(0) = posx p(1) = posy/z p(2) = rotation degrees CCW p(3) = depth : positive values go into case (Remove) negative values are raised (Add) p(4) = { yappLeft, yappRight, yappFront, yappBack, yappLid, yappBase } : plane p(5) = "image filename.svg" Optional: p(6) = Scale : Default = 1 : ratio to scale image by (making it larger or smaller) Here is the code for the labels in the next images: Copy imagesPlane = [\ [ 10, 10, 180, 0.5, yappLid, "logo.svg", 1.25 ]\ ]; ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252F5sxAU5qonms198ia2DNr%252F313781514-ca6b2599-8c68-4e8b-aa70-75cac555252d.png%3Falt%3Dmedia%26token%3Dbbead991-6d9e-487b-9724-0f02278aaa89&width=768&dpr=4&quality=100&sign=f2082637&sv=2) The RX/TX is a text label, and the other red stuff is an SVG logo. [PreviousLabels](https://mrwheel-docs.gitbook.io/yappgenerator_en/labels) [NextHooks](https://mrwheel-docs.gitbook.io/yappgenerator_en/hooks) Last updated 1 year ago --- # Ridge Extension | YAPPgenerator_en The Ridge Extension provides a local shift to the split so that you can make any opening on the sides of the case that is half in the lid and half in the base. This is useful if you need to feed a cable inside of the box. This is the API for the Ridge Extension: Copy Extension from the lid into the case for adding split opening at various heights Default origin = yappCoordBox: box[0,0,0] Parameters: Required: (0) = pos (1) = width (2) = height : Distance below the ridge : Negative to move into lid Optional: (n) = { , yappCenter } (n) = { , yappLeftOrigin } : Only affects Top(lid), Back and Right Faces Note: use ridgeExtTop to reference the top of the extension for cutouts. Note: Snaps should not be placed on ridge extensions as they remove the ridge to place them. This is an example code for a Ridge (you also have to make a cutout for the Ridge Extension to work) Copy cutoutsBack = [\ //-- [A] Make the hole thru the end of the ridge extansion\ [25,8, 6, 6, 0, yappPolygon, shape6ptStar, yappLeftOrigin\ , yappCenter, yappCoordBox]\ \ //-- [B] Make the rounded rect thru the end of the ridge extansion\ ,[55,13, 20, 6, 3, yappRoundedRect, yappCenter, yappCoordBox]\ \ //-- [C] Make the hexagonal thru the end of the ridge extansion\ ,[38,35, 6, 6, 0, yappPolygon, 0, 30, shapeHexagon, yappCenter\ , yappCoordBox]\ \ //-- [D] Make the hole thru the end of the ridge extension\ ,[18,8, 0, 0, 3, yappCircle, yappCenter, yappCoordBox]\ ]; ridgeExtBack = [\ //-- [A] Make a ridge extension 6mm wide 8mm from the bottom of \ //-- the box from the left edge\ [25, 6, 8, yappLeftOrigin, yappCoordBox, yappCenter]\ \ //-- [B] Make a ridge extension 20mm wide 13mm from the bottom \ //-- of the box\ ,[45, 20, 13, yappCoordBox]\ \ //-- [C] Make a ridge extension 6mm wide 35mm from the bottom \ //-- of the box\ ,[35, 6, 35, yappCoordBox]\ \ //-- [D] Make a ridge extension 6mm wide 8mm from the bottom \ //-- of the box\ ,[15, 6, 8, yappCoordBox]\ ]; Will have these Ridge Extensions as a result: ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FD9MMHzrb2SkC2ncHhlUt%252FRidgeExtention.png%3Falt%3Dmedia%26token%3Daae35e7b-8437-4a50-a6b2-c111ba3a9f8b&width=768&dpr=4&quality=100&sign=41e544b3&sv=2) [PreviousOptional Parameters](https://mrwheel-docs.gitbook.io/yappgenerator_en/push-buttons/optional-parameters) [NextLabels](https://mrwheel-docs.gitbook.io/yappgenerator_en/labels) Last updated 1 year ago --- # Snap Joins | YAPPgenerator_en With `**snapJoins**` the Base and Lid “click” together without the need for screws or other aids. Copy Default origin = yappCoordBox: box[0,0,0] Parameters: Required: p(0) = posx | posy p(1) = width p(2) = { yappLeft | yappRight | yappFront | yappBack } (one or more) Optional: n(a) = { | yappCenter } n(b) = { yappSymmetric } n(c) = { yappRectangle } : Make a diamond shape snap snapJoins = [\ [10, 5, yappLeft, yappRight, yappSymmetric]\ ,[ 5, 5, yappFront, yappBack, yappSymmetric]\ ]; ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FFDipTJkXkRYNmaHVn6v8%252FsnapJoinsSBS.png%3Falt%3Dmedia%26token%3D0a30a5da-2cbf-403a-a6b0-a018a75c3477&width=768&dpr=4&quality=100&sign=f0bee3cb&sv=2) ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FtmCyaCn1g0bHJo1X8gPJ%252FsnapJounsOnTOP.png%3Falt%3Dmedia%26token%3D5b08fc9c-1d5e-4451-88a8-73f6109c0523&width=768&dpr=4&quality=100&sign=73f9e4da&sv=2) [PreviousboxMounts (advanced)](https://mrwheel-docs.gitbook.io/yappgenerator_en/box-mounts/boxmounts-advanced) [NextLight Tubes](https://mrwheel-docs.gitbook.io/yappgenerator_en/light-tubes) Last updated 1 year ago --- # n(b)/n(c) - Mask Definition | YAPPgenerator_en Copy n(b) = { yappMaskDef } : If a yappMaskDef object is added it will be used as a mask for the cutout. n(c) = { [yappMaskDef, hOffset, vOffset, rotation] } : If a list for a mask is added it will be used as a mask for the cutout. With the Rotation and offsets applied. This can be used to fine tune the mask placement within the opening. There are several predefined masks or you can create your own custom mask definition. The following are the predefined masks: * maskHoneycomb * maskHexCircles * maskCircles * maskBars * maskOffsetBars * maskSquares ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FGmDZdJkLt25ZhlOqV1QE%252Fimage.png%3Falt%3Dmedia%26token%3Dd34ad531-8d19-467a-8276-2ca60e0ecd33&width=768&dpr=4&quality=100&sign=28be15eb&sv=2) To use a mask without modifiers **n(b)** you can simply list the mask name. For example **maskHoneycomb**. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FVEAQfsrLRo9NtrvAS5qM%252Fimage.png%3Falt%3Dmedia%26token%3D2e2308b1-de01-48d8-a5a9-b0614ab1ec9a&width=768&dpr=4&quality=100&sign=f330b9fa&sv=2) **maskHoneycomb** To use a mask with optional modifiers **n(c)** you can specify a vector (list enclosed in \[\]'s) as follows: Copy [mask name, hOffset, vOffset, rotation] mask Name = the masks name from the predefined list or a custom mask you have created. hOffset = the distance in mm to shift the mask in the X axis (horizontal). This will change how the mask aligns with the opening. vOffset = the distance to shift it in the Y axis (Vertical) rotation = the angle to rotate the mask in reference to the cutout. for example **\[maskHoneycomb, 0, 3.3, 30\]**. This will select the honeycomb shaped mask with a vertical offset of 3.3mm and rotated 30 degrees. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252Fs1uSv67iPU0Vt74DoqqK%252Fimage.png%3Falt%3Dmedia%26token%3D5eaada59-2a30-4750-97d5-af23edb0cb03&width=768&dpr=4&quality=100&sign=cedc68d6&sv=2) **\[maskHoneycomb, 0, 3.3, 30\]** you can only use n(b) or n(c) on the same object. see [Mask Definition](https://mrwheel-docs.gitbook.io/yappgenerator_en/advanced-options/mask-definitions) for how to create your own masks. [Previousn(a) = Polygon Definition](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/optional-parameters/n-a-polygon-definition) [Nextn(d) - Coordinate System](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/optional-parameters/n-d-coordinate-system) Last updated 1 year ago --- # Box Mounts | YAPPgenerator_en The API for boxMounts is: Copy =================================================================== *** Box Mounts *** Mounting tabs on the outside of the box ------------------------------------------------------------------- Default origin = yappCoordBox: box[0,0,0] 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) = { , yappLid } n(d) = { yappCenter } : shifts Position to be in the center of the opening instead of the left of the opening n(e) = { , yappLeftOrigin } : Only affects Back and Right Faces To add boxMount you can use this code: Copy baseMounts = [\ [15+(15/2), 3.5, 15, 3, yappRight]\ ,[shellLength-(15/2), 3.5, 15, 3, yappRight]\ ,[36, 5, shellLength, 7, yappLeft]\ ]; ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FMa8zxJQ5YGRyznQi9ZAC%252FYAPPpcbmountsLeft.png%3Falt%3Dmedia%26token%3D5000d43d-7a1c-47c4-a64d-df07f88293f5&width=768&dpr=4&quality=100&sign=3537758d&sv=2) ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FmYhslioocyN3k3yYr3Am%252FYAPPpcbmountsRight.png%3Falt%3Dmedia%26token%3Ddeac7d04-f5c6-4358-9b84-12091c14121c&width=768&dpr=4&quality=100&sign=c5e6719a&sv=2) [Previousn(g) - PCB Selection](https://mrwheel-docs.gitbook.io/yappgenerator_en/cutouts/optional-parameters/n-g-pcb-selection) [NextboxMounts (advanced)](https://mrwheel-docs.gitbook.io/yappgenerator_en/box-mounts/boxmounts-advanced) Last updated 1 year ago --- # Mask Definitions | YAPPgenerator_en How to create your own masks. _**Coming Soon!**_ [PreviousPolygon Definitions](https://mrwheel-docs.gitbook.io/yappgenerator_en/advanced-options/polygon-definitions) [NextGenerating STL file from KiCad](https://mrwheel-docs.gitbook.io/yappgenerator_en/generating-stl-file-from-kicad) Last updated 1 year ago --- # Light Tubes | YAPPgenerator_en A "Light Tube" is a way to let a LED (or NeoPixel) shine only through the Lid. It projects the light on the Lid of the project box. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FrYQ6dHIQacca8OfFtUGK%252FlightTube.gif%3Falt%3Dmedia%26token%3Dce8464ff-b7a4-4a3a-82cd-9d015f331725&width=768&dpr=4&quality=100&sign=cde92279&sv=2) Copy Default origin = yappCoordPCB: PCB[0,0,0] Parameters: Required: p(0) = posx p(1) = posy p(2) = tubeLength p(3) = tubeWidth p(4) = tubeWall p(5) = gapAbovePcb p(6) = { yappCircle | yappRectangle } : tubeType Optional: p(7) = lensThickness (how much to leave on the top of the lid for the light to shine through) 0 for open hole : Default = 0/Open p(8) = Height to top of PCB : Default = standoffHeight+pcbThickness p(9) = filletRadius : Default = 0/Auto n(a) = { | yappCoordBox | yappCoordBoxInside } n(b) = { yappNoFillet } lightTubes = [\ //--- 0, 1, 2, 3, 4, 5, 6, 7\ [15, 20, 1.5, 5, 1, 2, yappCircle, 0.5]\ ,[15, 30, 1.5, 5, 1, 2, yappRectangle]\ ]; `tubeLength` The length of the tube-window in the Y-ax direction `tubeWidth` The width of the tube-window in the X-ax direction `tubeWall` The wall thickness around the tube `abovePcb` The space between the PCB and the bottom of the light tube `lensThickness` Will make an opening in the Lid to let the light shine trough. If lensThickness is omitted there will be an open hole on top of the Lid, otherwise there will be a small layer of material on top of the Lid `tubeType` The shape of the window. Either a rectangle (yappRectangle) or a circle (yappCircle) With this code: Copy lightTubes = [\ [15, 20, 2, 6, 1, 5, yappCircle, 0.5]\ ,[15, 30, 2, 10, 1, 5, yappRectangle]\ ]; You get these light tubes: ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FtkjSmi3h0UK2yz6JKq86%252FlightTubes.png%3Falt%3Dmedia%26token%3D7e86244a-7167-4ded-8862-8728efa31ebc&width=768&dpr=4&quality=100&sign=6370d8df&sv=2) [PreviousSnap Joins](https://mrwheel-docs.gitbook.io/yappgenerator_en/snap-joins) [NextPush Buttons](https://mrwheel-docs.gitbook.io/yappgenerator_en/push-buttons) Last updated 1 year ago --- # Push Buttons | YAPPgenerator_en If you have one or more tactile switches on your PCB you can make a knop guide with witch you can push the tactile switch. You can size the button in any dimension you like and you can control the height of the button above the Lid (all within limits). ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FDWmKSf0x3Usi8EP9x1aU%252FbuttonGuides.png%3Falt%3Dmedia%26token%3D466a69ac-af05-4b2b-a58f-b71397af9205&width=768&dpr=4&quality=100&sign=336ad0b8&sv=2) The API for push buttons is: Copy //=================================================================== // *** Push Buttons *** //------------------------------------------------------------------- // Default origin = yappCoordPCB: PCB[0,0,0] // // Parameters: // Required: // p(0) = posx // p(1) = posy // p(2) = capLength // p(3) = capWidth // p(4) = capRadius // p(5) = capAboveLid // p(6) = switchHeight // p(7) = switchTravel // p(8) = poleDiameter // Optional: // p(9) = Height to top of PCB : Default = standoffHeight + pcbThickness // p(10) = { yappRectangle | yappCircle | yappPolygon | yappRoundedRect // | yappCircleWithFlats | yappCircleWithKey } : Shape, Default = yappRectangle // p(11) = angle : Default = 0 // p(12) = filletRadius : Default = 0/Auto // p(13) = buttonWall : Default = 2.0; // p(14) = buttonPlateThickness : Default= 2.5; // p(15) = buttonSlack : Default= 0.25; // p(16) = snapSlack : Default= 0.10; // n(a) = { | yappCoordBox | yappCoordBoxInside } // n(b) = { , yappLeftOrigin } // n(c) = { yappNoFillet } // n(d) = [yappPCBName, "XXX"] : Specify a PCB. Defaults to [yappPCBName, "Main"] //------------------------------------------------------------------- ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252F3kki2eBl8vXz4WgGoYIq%252FpushButtonStuff.png%3Falt%3Dmedia%26token%3D2e329b17-04ce-4cb2-99f4-4207051d26a1&width=768&dpr=4&quality=100&sign=3570d839&sv=2) ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FjHvWrrPsmlSnPQ5KIiat%252FYAPP_Demo_buttons_v30_ImageA.png%3Falt%3Dmedia%26token%3D66b257be-44cc-4190-b067-84b198ac4a2c&width=768&dpr=4&quality=100&sign=7e4bf979&sv=2) ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FA6MqBfm5aGVUhop69UV1%252FpushButtons.png%3Falt%3Dmedia%26token%3D2e98c5aa-11f6-430e-b23e-f4f55a8a87fa&width=768&dpr=4&quality=100&sign=702ec52f&sv=2) The three buttons in the above images are created with this code: Copy pushButtons = [\ [84.2, 30.7, 8, 8, 0, 2, 1, 3.5, yappCircle]\ ,[85, 13.5, 8, 5, 3, 2, 1, 3.5, yappRectangle]\ ,[85, 7, 8, 5, 3, 2, 1, 3.5, yappRectangle] \ ]; ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252F19YUwWyXRTF9kSqTDlr6%252FtacktileSwitches.png%3Falt%3Dmedia%26token%3D22bfda36-f9c7-4fbf-95a7-e6615e7e148b&width=768&dpr=4&quality=100&sign=2b69c69a&sv=2) [PreviousLight Tubes](https://mrwheel-docs.gitbook.io/yappgenerator_en/light-tubes) [NextOptional Parameters](https://mrwheel-docs.gitbook.io/yappgenerator_en/push-buttons/optional-parameters) Last updated 1 year ago --- # boxMounts (advanced) | YAPPgenerator_en The boxMounts API is: Copy 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) = { , yappLid } n(d) = { yappCenter } : shifts Position to be in the center of the opening instead of the left of the opening n(e) = { , yappLeftOrigin } : Only affects Back and Right Faces The optional parameters n(c) and n(d) are important. #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/box-mounts/boxmounts-advanced#n-c-mount-on-base-or-lid) n(c) - mount on base or lid Standard the boxMount will be placed at the base of the box. Copy boxMounts = [\ [0, 3.5, 15, 3, yappLeft]\ ,[shellLength, 3.5, 15, 3, yappLeft]\ ]; The mounts are placed on the base (default): ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FIGHP4L5V9KoiLANHB7iR%252FboxMounts_a.png%3Falt%3Dmedia%26token%3De6bdc33d-3bd9-4112-9eb3-65e92dc6efb7&width=768&dpr=4&quality=100&sign=6a713032&sv=2) With **n(c)** set to `yappLid` the mounts are placed at the lid: Copy boxMounts = [\ [0, 3.5, 15, 3, yappLeft, yappLid]\ ,[shellLength, 3.5, 15, 3, yappLeft, yappLid]\ ]; ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FmySOUs7CrQgpwYnx88mm%252FboxMounts_lid.png%3Falt%3Dmedia%26token%3D9b46755f-6974-4e5c-901f-e89efc09ad6c&width=768&dpr=4&quality=100&sign=cc489919&sv=2) #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/box-mounts/boxmounts-advanced#n-d-yappcenter) n(d) - yappCenter When `yappCenter` is added the center of the mount will be the reference for the `pos` parameter \[**p(0)** \]. Copy 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: ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252F1scB1jUwcl5Upodffw4p%252FboxMounts_Center.png%3Falt%3Dmedia%26token%3D71fe173f-471f-425b-9d52-0d6d614ea224&width=768&dpr=4&quality=100&sign=602b3ab2&sv=2) #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/box-mounts/boxmounts-advanced#p-2-negative-width) p(2) - negative width With a negative value of the width \[ **p(2)**\] the mounts are 90 degrees rotated. Copy 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\ ]; ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FBc7WsDSVhTai204mLrWm%252FboxMounts_Negative.png%3Falt%3Dmedia%26token%3D8132d267-6ad3-4850-ac43-9cbda375e1a6&width=768&dpr=4&quality=100&sign=24b707b9&sv=2) [PreviousBox Mounts](https://mrwheel-docs.gitbook.io/yappgenerator_en/box-mounts) [NextSnap Joins](https://mrwheel-docs.gitbook.io/yappgenerator_en/snap-joins) Last updated 1 year ago --- # Hooks | YAPPgenerator_en `**Hooks**` gives you a tool to add objects to your projectbox. But be aware that hooks are only partially controlled by the YAPPgenerator! Copy module baseHookOutside() { translate([shellLength/2, shellWidth-roundRadius, 0]) { color("green") { cube([10,20,((basePlaneThickness/2)+(baseWallHeight-ridgeHeight))]); } } } // baseHookOutside() module baseHookInside() { translate([50, wallThickness, (basePlaneThickness/2)]) { color("blue") { cube([2,(shellWidth-(wallThickness*2)),((basePlaneThickness/2)+baseWallHeight)]); } } } // baseHookInside() module lidHookOutside() { } // lidHookOutside() module lidHookInside() { translate([50, wallThickness\ , ((lidPlaneThickness/2)+(lidPlaneThickness+lidWallHeight+0.05))*-1]) { color("red") { cube([2,(shellWidth-(wallThickness*2)),(lidPlaneThickness+lidWallHeight)]); } } } // lidHookInside() ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252F6CGqoCK8FvJ74yPPU4L7%252FYAPPhooks.png%3Falt%3Dmedia%26token%3Dd19924f4-6f29-4745-97fa-5c8a21b1a270&width=768&dpr=4&quality=100&sign=cffc8750&sv=2) **Hooks** are only partially controlled by the YAPPgenerator! [PreviousImages](https://mrwheel-docs.gitbook.io/yappgenerator_en/images) [NextDebugging](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging) Last updated 1 year ago --- # Labels | YAPPgenerator_en This is the API for labels: Copy 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 : { , yappTextRightToLeft, yappTextTopToBottom, yappTextBottomToTop } p(10) = Horizontal alignment : { , yappTextHAlignCenter, yappTextHAlignRight } p(11) = Vertical alignment : { yappTextVAlignTop, yappTextVAlignCenter, yappTextVAlignBaseLine, } p(12) = Character Spacing multiplier (1.0 = normal) Here is the code for the labels in the next images: Copy 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" ]\ \ \ ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FEPWccJyzoYWsNy39m6GY%252FYAPPlabelsBase.png%3Falt%3Dmedia%26token%3D015ff219-4eff-4886-bedb-fe44b0fd18b1&width=768&dpr=4&quality=100&sign=85034fe2&sv=2)\ \ ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FqPBG8CrTHgNnukXyiGx5%252FYAPPlabelsLid.png%3Falt%3Dmedia%26token%3De0d969a3-c0b7-401f-9d8f-957c693f34d9&width=768&dpr=4&quality=100&sign=ba17f0c1&sv=2)\ \ Here is an example if the use of the Depth (**p(3)**) parameter:\ \ Copy\ \ 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" ]\ \ ];\ \ ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FwmR0l5lpcibUa0qpFUEd%252FYAPPlabelsDepth.png%3Falt%3Dmedia%26token%3D57f56791-d71d-4055-bc5a-db909b003a6d&width=768&dpr=4&quality=100&sign=903bafc3&sv=2)\ \ ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FEFThJyKAAvL6iSU3DdW7%252FScreenshot%25202023-12-05%2520at%252012.42.59.png%3Falt%3Dmedia%26token%3D87524221-0c1c-4145-b084-3695dc6adf42&width=768&dpr=4&quality=100&sign=da7b7a6&sv=2)\ \ [PreviousRidge Extension](https://mrwheel-docs.gitbook.io/yappgenerator_en/ridge-extension)\ [NextImages](https://mrwheel-docs.gitbook.io/yappgenerator_en/images)\ \ Last updated 6 months ago --- # License | YAPPgenerator_en MIT License Copyright (c) 2022, 2023, 2024 Willem Aandewiel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. [PreviousGenerating STL file from KiCad](https://mrwheel-docs.gitbook.io/yappgenerator_en/generating-stl-file-from-kicad) Last updated 1 year ago --- # Generating STL file from KiCad | YAPPgenerator_en Making a projectbox with all the holes in the right place is quite a challenge. Luckily for the makers that use `**KiCad**` as a PCB making tool there is a rescue! ### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/generating-stl-file-from-kicad#tools-needed) Tools needed If not already done you first have to install the latest version of [FreeCAD](https://www.freecad.org/) . Then you have to install the `**KiCadStepUp**` tool with the `**Addon Manager**`. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FULqzmqgm7r7Qo7qc6y1P%252FFreeCAD_Addon-Manager.png%3Falt%3Dmedia%26token%3D3cccabe5-b8e9-4847-92d0-01d814bb2dfd&width=768&dpr=4&quality=100&sign=26e5bb&sv=2) ### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/generating-stl-file-from-kicad#creating-a-step-file-with-kicad) Creating a STEP file with KiCad Start the `**PCB Editor**` ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FDCIswiyleg66j2n2EtX5%252FKiCad_Select-PCB-Editor.png%3Falt%3Dmedia%26token%3D41c61509-7964-4a9f-bf2b-d30b31e4788a&width=768&dpr=4&quality=100&sign=1f8de602&sv=2) From the `**File**` menu select `**Export -> STEP**` ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FIkvhLKKYbEl2LqOS4Bcd%252FKiCad_Select-Export-STEP.png%3Falt%3Dmedia%26token%3D906b4b6f-5b05-4747-8bd0-754057de04ce&width=768&dpr=4&quality=100&sign=56d58267&sv=2) In the popUp `**[Browse]**` to the map where you want to save the STEP file and click on `**[Export]**`. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FfN8EaqxXPr8GKjVaPaMG%252FKiCad_popUp-Export.png%3Falt%3Dmedia%26token%3Ded680afa-a962-4f78-ae4a-77038a08f574&width=768&dpr=4&quality=100&sign=6f2f2f62&sv=2) ### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/generating-stl-file-from-kicad#start-freecad) Start FreeCAD ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FTGjKY4sBk8qdxkjKBOVK%252FFreeCAD_Splash.png%3Falt%3Dmedia%26token%3Daa12a017-a073-472c-a41b-491b1df943b9&width=768&dpr=4&quality=100&sign=15fe0c17&sv=2) Click on the select box .. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FRJ6PWgVaVQ5gdOLNF2Kc%252FFreeCAD_Select_Setup.png%3Falt%3Dmedia%26token%3D821e79fb-4b9e-4f02-a22c-08dbc174b3ba&width=768&dpr=4&quality=100&sign=881ff699&sv=2) .. and select the `**KiCadStepUp**` tool ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FYnysPHb4XC0mUSfwWXPK%252FKiCad_SelectStepUp-tool.png%3Falt%3Dmedia%26token%3D12aedd13-07d6-4707-ac6f-594cac941258&width=768&dpr=4&quality=100&sign=50d99e69&sv=2) Go to `**File->Open**` and select the STEP file from the KiCad Export ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FOGSDosiYKOgMCrFWKgeO%252FKiCad_Open-STEP-file.png%3Falt%3Dmedia%26token%3D029b2ee3-a91e-43a4-a042-4993e038dd0b&width=768&dpr=4&quality=100&sign=1a9a32fe&sv=2) .. and click on `**[Open]**` ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252F84NdzG0U59nseOoM5DSn%252FKiCad_Select-STEP-file.png%3Falt%3Dmedia%26token%3Dcd7ed667-14a0-4e36-b7cf-265dbc86ddd4&width=768&dpr=4&quality=100&sign=7af2ed42&sv=2) After a while you see the result of this import ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252F9sMrUUYtQ6PXWTmnb3uD%252FKiCad_Window2.png%3Falt%3Dmedia%26token%3De56b75de-82c3-4cd4-96fd-9e67c4ff69d8&width=768&dpr=4&quality=100&sign=d0aad604&sv=2) Now all you have to do is `**Export**` this file ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FJRVd6nNNBsOwoP6bLGwp%252FKiCad_Export_Active.png%3Falt%3Dmedia%26token%3D7a237364-961d-42d2-9c5a-ceeacce32f3f&width=768&dpr=4&quality=100&sign=3cf662e2&sv=2) Select "`**STL Mesh**`" as type .. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FCN9RT22v6hMqPleVFCXv%252FKiCad_Export-As-STL.png%3Falt%3Dmedia%26token%3D8e3bffba-cbf7-4ac9-9912-299b49633217&width=768&dpr=4&quality=100&sign=4dd880de&sv=2) .. and click on `**[Save]**` The result is a nice STL file ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FjAITwiGRdfh0I13eUK9k%252FKiCad_Show_Resulting-STL.png%3Falt%3Dmedia%26token%3D9d806cf8-7030-4d5e-b269-171a58fedd22&width=768&dpr=4&quality=100&sign=9f908f90&sv=2) [](https://mrwheel-docs.gitbook.io/yappgenerator_en/generating-stl-file-from-kicad#use-this-stl-file-with-the-yappgenerator) Use this STL file with the YAPPgenerator -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Add the following code to the beginning of your `**.scad**` file: Copy myPcb = "./STL/DSMRloggerESP32_PCB.stl"; if (true) { translate([42,43,4.6]) { rotate([0,0,90]) color("darkgray") import(myPcb); } } `**myPcb**` has to point to the generated `**.stl**` file With `**translate()**` and `**rotate()**` you can place the `**.stl**` file to the exact location of your projectbox. This is a bit fiddling in the beginning but once set it does not change anymore. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FMtkGmk5NGBsDpbkmQfTF%252FYAPP_PCB_fiddling.png%3Falt%3Dmedia%26token%3D7bf602a5-00b1-41f7-ae29-7e45a9f3869d&width=768&dpr=4&quality=100&sign=8163f193&sv=2) [PreviousMask Definitions](https://mrwheel-docs.gitbook.io/yappgenerator_en/advanced-options/mask-definitions) [NextLicense](https://mrwheel-docs.gitbook.io/yappgenerator_en/license) Last updated 2 years ago --- # Debugging | YAPPgenerator_en There are various ways to debug your projectbox.scad program. ### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging#overview-of-parameter-values) Overview of parameter values During compilation most settings are listed in the console window. Copy OpenSCAD 2021.01 https://www.openscad.org/ Copyright (C) 2009-2021 The OpenSCAD Developers Compiling design (CSG Tree generation)... ECHO: "YAPP==========================================" ECHO: "YAPP:", pcbLength = 150 ECHO: "YAPP:", pcbWidth = 100 ECHO: "YAPP:", pcbThickness = 1.6 ECHO: "YAPP:", paddingFront = 2 ECHO: "YAPP:", paddingBack = 2 ECHO: "YAPP:", paddingRight = 2 ECHO: "YAPP:", paddingLeft = 2 ECHO: "YAPP==========================================" ECHO: "YAPP:", standoffHeight = 10 ECHO: "YAPP:", standoffPinDiameter = 2.4 ECHO: "YAPP:", standoffDiameter = 7 ECHO: "YAPP==========================================" ECHO: "YAPP:", buttonWall = 2 ECHO: "YAPP:", buttonPlateThickness = 2.5 ECHO: "YAPP:", buttonSlack = 0.25 ECHO: "YAPP:", buttonCupDepth = 3 ECHO: "YAPP==========================================" ECHO: "YAPP:", baseWallHeight = 25 ECHO: "YAPP:", lidWallHeight = 23 ECHO: "YAPP:", wallThickness = 2 ECHO: "YAPP:", ridgeHeight = 5 ECHO: "YAPP:", roundRadius = 3 ECHO: "YAPP:", shellLength = 158 ECHO: "YAPP:", shellInsideLength = 154 ECHO: "YAPP:", shellWidth = 108 ECHO: "YAPP:", shellInsideWidth = 104 ECHO: "YAPP:", shellHeight = 51 ECHO: "YAPP==========================================" ECHO: "YAPP:", pcbX = 4 ECHO: "YAPP:", pcbY = 4 ECHO: "YAPP:", pcbZ = 13.1 ECHO: "YAPP:", pcbZlid = 37.9 ECHO: "YAPP==========================================" ECHO: "YAPP:", shiftLid = 5 ECHO: "YAPP:", onLidGap = 3 ECHO: "YAPP==========================================" ECHO: "YAPP:", Version = "v3.0.0 (08-12-2023)" ECHO: "YAPP: copyright by Willem Aandewiel" ECHO: "YAPP==========================================" ECHO: "YAPP: Predefined Shapes" ECHO: "YAPP: shapeIsoTriangle, shapeHexagon, shape6ptStar" ECHO: "YAPP: Predefined Masks" ECHO: "YAPP: maskHoneycomb, maskHexCircles, maskCircles, maskBars, maskOffsetBars" ECHO: "YAPP==========================================" ECHO: "pcbPushdowns", pcbGap = 1.6 ECHO: ridgeHeight = 5, wallThickness = 2 These variables can be used in the various arrays to make the values comply to changes you made in the setup. ### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging#controlling-the-compiled-image) Controlling the Compiled Image There are various settings that you can tune to change the compiled image so you can get more "**insight**" in the projectbox the YAPPgenerator is making. Copy //--------------------------- //-- C O N T R O L -- //--------------------------- // -- Render -- renderQuality = 8; //-> from 1 to 32, Default = 8 // --Preview -- previewQuality = 5; //-> from 1 to 32, Default = 5 showSideBySide = true; //-> Default = true onLidGap = 0; //-- tip don't override to animate the lid opening colorLid = "YellowGreen"; alphaLid = 1; colorBase = "BurlyWood"; alphaBase = 1; hideLidWalls = false; //-- Remove the walls from the lid : only if preview and showSideBySide=true hideBaseWalls = false; //-- Remove the walls from the base : only if preview and showSideBySide=true showOrientation = true; //-- Show the Front/Back/Left/Right labels : only in preview showPCB = false; //-- Show the PCB in red : only in preview showSwitches = false; //-- Show the switches (for pushbuttons) : only in preview showButtonsDepressed = false; //-- Should the buttons in the Lid On view be in the pressed position showOriginCoordBox = false; //-- Shows red bars representing the origin for yappCoordBox : only in preview showOriginCoordBoxInside = false; //-- Shows blue bars representing the origin for yappCoordBoxInside : only in preview showOriginCoordPCB = false; //-- Shows blue bars representing the origin for yappCoordBoxInside : only in preview showMarkersPCB = false; //-- Shows black bars corners of the PCB : only in preview showMarkersCenter = false; //-- Shows magenta bars along the centers of all faces inspectX = 0; //-> 0=none (>0 from Back) inspectY = 0; //-> 0=none (>0 from Right) inspectZ = 0; //-> 0=none (>0 from Bottom) inspectXfromBack = true; //-> View from the inspection cut foreward inspectYfromLeft = true; //-> View from the inspection cut to the right inspectZfromBottom = true; //-> View from the inspection cut up //--------------------------- //-- C O N T R O L -- //--------------------------- #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging#showsidebyside) showSideBySide When **true** it the Base and Lid are printed side by side. This is usually the setting to use if you want to compile a STL file for 3D printing. When **false** the Base and Lid are printed "_on top_" of each other. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FgOELpgN2GRBEWt1iYZYj%252FYAPPssbs_false.png%3Falt%3Dmedia%26token%3Dad4ab274-037b-451d-87f5-357f55ac6622&width=768&dpr=4&quality=100&sign=8a1af930&sv=2) showSideBySide = false, onLidCap = 15 ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252Fv5DituXqhvMTaFEZxq7o%252FYAPPssbs_true.png%3Falt%3Dmedia%26token%3Dd03c700d-ca2c-4011-a1f9-b571c4712113&width=768&dpr=4&quality=100&sign=91b72364&sv=2) showSideBySide = true, shiftLid = 10 #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging#onlidgap) onLidGap This value is only used when **showSideBySide** = **false**. A value of zero prints the Base and Lid right on to of each other. A value > zero will lift the Lid up from the Base. #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging#shiftlid) shiftLid This value is only used when **showSideBySide** = **true**. A value > zero will place the Lid further away from the Base. #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging#hidebasewalls) hideBaseWalls If **true** the `**baseWalls**` are not printed so you can see the inside of the box #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging#hidelidwalls) hideLidWalls If **true** the `**lidWalls**` are not printed so you can see the inside of the box ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FlAM0LOhfcTwf9AOxc0un%252FYAPPhideWallsFalse.png%3Falt%3Dmedia%26token%3Dcf2d4144-98ab-49a8-8a17-b7cbc37c2dd6&width=768&dpr=4&quality=100&sign=97be955f&sv=2) hideBaseWall = false, hideLidWall = false ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252Fus6QwFm3lRNwbJymUwdM%252FYAPPhideLidWalls.png%3Falt%3Dmedia%26token%3D417d42ee-e96e-4ce6-af3f-805f52717e3e&width=768&dpr=4&quality=100&sign=4b3f5349&sv=2) hideBaseWall = true, hideLidWall = true ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FLNOVaTG2r0kt3jX2MRES%252FYAPPhideBaseWalls.png%3Falt%3Dmedia%26token%3D9997d4ee-9bac-4efb-a688-d6daee0f03e8&width=768&dpr=4&quality=100&sign=87b04198&sv=2) HideBaseWall = true, hideLidWall = false #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging#showorientation) showOrientation When **true** the text Front, Right, Back and Left are printed at the four planes. When creating a STL file the orientation markers are never printed! ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252Ff8UQQ6ZhQ5eRrwb9Q2Qd%252FYAPPshowOrientation_false.png%3Falt%3Dmedia%26token%3D2f0b25bd-ea00-4648-8cbc-b254707992e1&width=768&dpr=4&quality=100&sign=3aac0a47&sv=2) showOrientation = false ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FYLfgUYDhrflyz1DHnSLS%252FYAPPshowOrientation_true.png%3Falt%3Dmedia%26token%3Db2ad10e1-6fb4-4e01-89bb-5afb9d20bd14&width=768&dpr=4&quality=100&sign=4b02d00b&sv=2) showOrientation = true #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging#showpcb) showPCB For reference and for getting a feel of the projectbox it is, sometimes, handy to show exactly where the PCB will fit into the projectbox. When **true** a (dummy) PCB is printed. When **false** no PCB is printed. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252F2IEN8YghRGzETCoCSbb3%252FYAPPshowPCB_false.png%3Falt%3Dmedia%26token%3Dd475fdcb-2779-4065-b131-15903758aec6&width=768&dpr=4&quality=100&sign=b41b0a98&sv=2) showPCB = false ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FbJOjVJdHS4GpY2QHtNTt%252FYAPPshowPCB_true.png%3Falt%3Dmedia%26token%3Ddd0f39b7-5a0f-4923-8427-2441498f85ac&width=768&dpr=4&quality=100&sign=a92e5c21&sv=2) showPCB = true #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging#showmarkerspcb) showMarkersPCB To get a better feel where the pcb\[0,0,0\] point is you can set `**showMarkersPCB**` to **true**. The vertical black markers are on the exact corners of the PCB. The horizontal black markers are drawn at the top of the PCB. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252F1BUEroBLi0XVidZWZmrD%252FYAPPshowPCBandMarkers_true.png%3Falt%3Dmedia%26token%3D6ff14dd7-b5c3-486c-8d2c-02f5ccd6888b&width=768&dpr=4&quality=100&sign=29396ebb&sv=2) showPCBmarkers = true, showPCB = true ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FiikqwIAzNydI8pDi6INN%252FYAPPshowPCBmarkers_true.png%3Falt%3Dmedia%26token%3D51f3524e-4d15-4c80-b269-d870acbf40af&width=768&dpr=4&quality=100&sign=a07804be&sv=2) showPCBmarkers = true, showPCB = false #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging#showmarkersbox) showMarkersBox When **true** it will show a vertical red marker at posX=0 and posY=0 ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FWV0CTfewnrpb7LSrPLZJ%252FYAPPshowShellZero_false.png%3Falt%3Dmedia%26token%3Dfd7fa2d6-1636-4358-8539-308cc64eacb0&width=768&dpr=4&quality=100&sign=ca40304a&sv=2) showShellZero = false ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FKuJh9kPnGyQig11C7Ytv%252FYAPPshowShellZero_true.png%3Falt%3Dmedia%26token%3D24a7f944-1d9f-47e9-8a06-cb3156c985f5&width=768&dpr=4&quality=100&sign=45538e6b&sv=2) showShellZero = true #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging#showmarkersboxinside) showMarkersBoxInside When **true** it will show a vertical blue marker at posX=0 and posY=0 and two blue markers in the length and width of the project box at posZ=0. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FDWYhZVKv7VLxzC8ilEx1%252FyappCoordBoxInside.png%3Falt%3Dmedia%26token%3Dcc3759d3-f7ef-40ba-a6f2-e13d798943ee&width=768&dpr=4&quality=100&sign=72b777f4&sv=2) #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging#showcentermarkers) showCenterMarkers When **true,** blue center markers are printed just below the projectbox. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252F8wb03v7U0oLEwlPAUWmH%252FYAPPshowCenterMarkers.png%3Falt%3Dmedia%26token%3D3a2e8a73-cfd3-46de-9616-cad94e7ad80e&width=768&dpr=4&quality=100&sign=879d9be2&sv=2) #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging#inspectx) inspectX With a value greater than zero you get a cross section of the projectbox from the Front towards the Back. A negative value gives a cross section from the Back towards the Front. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252Fa5ozG1r0ri0YMm43i4s3%252FYAPPInspextX_neg.png%3Falt%3Dmedia%26token%3D9a5d5b4a-b247-4295-b687-fb2a2c410aa5&width=768&dpr=4&quality=100&sign=adfa2870&sv=2) inspectX = negative ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FfNlnGTRgo6NPxrHTLQon%252FYAPPinspectX_pos.png%3Falt%3Dmedia%26token%3Da4d1473e-5996-414e-91f9-f136a78c455a&width=768&dpr=4&quality=100&sign=18e88c31&sv=2) inspectX = positive #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging#inspecty) inspectY With a value greater than zero you get a cross section of the projectbox from the Left towards Right. A negative value gives a cross section from the Right towards Left. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FCGwpX1s6dwUvKXrO7IvZ%252FYAPPinspectY_neg.png%3Falt%3Dmedia%26token%3D63a8eebd-f868-4b47-a9d7-feef53869c9e&width=768&dpr=4&quality=100&sign=6493cd97&sv=2) inspectY = negative ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FyeKsYlrfVpSNYTpY4EFX%252FYAPPinspectY_pos.png%3Falt%3Dmedia%26token%3Db0fda337-136e-4e7d-aa1b-3824f9460226&width=768&dpr=4&quality=100&sign=f4b020a3&sv=2) inspectY = positive #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging#inspectlighttubes) inspectLightTubes If **\-1 or 1** shows the inner structure of the light tubes. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252Fq2T6thLC9DRI4KGPhdNj%252FlightTubes.png%3Falt%3Dmedia%26token%3D617acd1f-88b5-482e-b759-e1d53d8c17b4&width=768&dpr=4&quality=100&sign=f9a1eb00&sv=2) left: inspectLightTubes = 0, right: inspectLightTubes = 1 (or -1) #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging#inspectbuttons) inspectButtons If **\-1** or **1** shows the inner structure of the push buttons. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FMrkOn5wPrKWb0WRywZfK%252FpushButtons.png%3Falt%3Dmedia%26token%3Dcdf033bd-887a-4323-a072-3f9f397e1dc7&width=768&dpr=4&quality=100&sign=2458aa54&sv=2) left: inspectButtons = 0, right: inspectButtons = 1 (or -1) #### [](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging#showswitches) showSwitches If **true** tries to show an impression of the tactile switches. ![](https://mrwheel-docs.gitbook.io/yappgenerator_en/~gitbook/image?url=https%3A%2F%2F832938294-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcI46RW7gXIHinmkl2pBq%252Fuploads%252FJlS5bVNlAJlbyLw1Lqqa%252FshowSwitches.png%3Falt%3Dmedia%26token%3D58bc36d1-6cdc-46ea-aa05-e1c53f0313bd&width=768&dpr=4&quality=100&sign=b4a6b4ff&sv=2) [PreviousHooks](https://mrwheel-docs.gitbook.io/yappgenerator_en/hooks) [NextAdvanced Options](https://mrwheel-docs.gitbook.io/yappgenerator_en/advanced-options) Last updated 1 year ago ---