> For the complete documentation index, see [llms.txt](https://mrwheel-docs.gitbook.io/yappgenerator_en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mrwheel-docs.gitbook.io/yappgenerator_en/debugging.md).

# Debugging

There are various ways to debug your projectbox.scad program.

### Overview of parameter values

During compilation most settings are listed in the console window.

```
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.

### 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.

```
//---------------------------
//--     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     --
//---------------------------

```

#### 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.

<div><figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FgOELpgN2GRBEWt1iYZYj%2FYAPPssbs_false.png?alt=media&amp;token=ad4ab274-037b-451d-87f5-357f55ac6622" alt=""><figcaption><p>showSideBySide = false, onLidCap = 15</p></figcaption></figure> <figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2Fv5DituXqhvMTaFEZxq7o%2FYAPPssbs_true.png?alt=media&amp;token=d03c700d-ca2c-4011-a1f9-b571c4712113" alt=""><figcaption><p>showSideBySide = true, shiftLid = 10</p></figcaption></figure></div>

#### 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.

#### shiftLid

This value is only used when **showSideBySide** = **true**.\
A value > zero will place the Lid further away from the Base.

#### hideBaseWalls

If **true** the **`baseWalls`** are not printed so you can see the inside of the box

#### hideLidWalls

If **true** the **`lidWalls`** are not printed so you can see the inside of the box

<div><figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FlAM0LOhfcTwf9AOxc0un%2FYAPPhideWallsFalse.png?alt=media&amp;token=cf2d4144-98ab-49a8-8a17-b7cbc37c2dd6" alt=""><figcaption><p>hideBaseWall = false, hideLidWall = false</p></figcaption></figure> <figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2Fus6QwFm3lRNwbJymUwdM%2FYAPPhideLidWalls.png?alt=media&amp;token=417d42ee-e96e-4ce6-af3f-805f52717e3e" alt=""><figcaption><p>hideBaseWall = true, hideLidWall = true</p></figcaption></figure> <figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FLNOVaTG2r0kt3jX2MRES%2FYAPPhideBaseWalls.png?alt=media&amp;token=9997d4ee-9bac-4efb-a688-d6daee0f03e8" alt=""><figcaption><p>HideBaseWall = true, hideLidWall = false</p></figcaption></figure></div>

#### 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!

<div><figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2Ff8UQQ6ZhQ5eRrwb9Q2Qd%2FYAPPshowOrientation_false.png?alt=media&amp;token=2f0b25bd-ea00-4648-8cbc-b254707992e1" alt=""><figcaption><p>showOrientation = false</p></figcaption></figure> <figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FYLfgUYDhrflyz1DHnSLS%2FYAPPshowOrientation_true.png?alt=media&amp;token=b2ad10e1-6fb4-4e01-89bb-5afb9d20bd14" alt=""><figcaption><p>showOrientation = true</p></figcaption></figure></div>

#### 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.

<div><figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2F2IEN8YghRGzETCoCSbb3%2FYAPPshowPCB_false.png?alt=media&amp;token=d475fdcb-2779-4065-b131-15903758aec6" alt=""><figcaption><p>showPCB = false</p></figcaption></figure> <figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FbJOjVJdHS4GpY2QHtNTt%2FYAPPshowPCB_true.png?alt=media&amp;token=dd0f39b7-5a0f-4923-8427-2441498f85ac" alt=""><figcaption><p>showPCB = true</p></figcaption></figure></div>

#### 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.&#x20;

<div><figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2F1BUEroBLi0XVidZWZmrD%2FYAPPshowPCBandMarkers_true.png?alt=media&amp;token=6ff14dd7-b5c3-486c-8d2c-02f5ccd6888b" alt=""><figcaption><p>showPCBmarkers = true, showPCB = true</p></figcaption></figure> <figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FiikqwIAzNydI8pDi6INN%2FYAPPshowPCBmarkers_true.png?alt=media&amp;token=51f3524e-4d15-4c80-b269-d870acbf40af" alt=""><figcaption><p>showPCBmarkers = true, showPCB = false</p></figcaption></figure></div>

#### showMarkersBox

When **true** it will show a vertical red marker at posX=0 and posY=0

<div><figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FWV0CTfewnrpb7LSrPLZJ%2FYAPPshowShellZero_false.png?alt=media&amp;token=fd7fa2d6-1636-4358-8539-308cc64eacb0" alt=""><figcaption><p>showShellZero = false</p></figcaption></figure> <figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FKuJh9kPnGyQig11C7Ytv%2FYAPPshowShellZero_true.png?alt=media&amp;token=24a7f944-1d9f-47e9-8a06-cb3156c985f5" alt=""><figcaption><p>showShellZero = true</p></figcaption></figure></div>

#### 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.

<figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FDWYhZVKv7VLxzC8ilEx1%2FyappCoordBoxInside.png?alt=media&amp;token=cc3759d3-f7ef-40ba-a6f2-e13d798943ee" alt="" width="444"><figcaption></figcaption></figure>

#### showCenterMarkers

When **true,** blue center markers are printed just below the projectbox.

<figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2F8wb03v7U0oLEwlPAUWmH%2FYAPPshowCenterMarkers.png?alt=media&amp;token=3a2e8a73-cfd3-46de-9616-cad94e7ad80e" alt=""><figcaption></figcaption></figure>

#### 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.

<div><figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2Fa5ozG1r0ri0YMm43i4s3%2FYAPPInspextX_neg.png?alt=media&amp;token=9a5d5b4a-b247-4295-b687-fb2a2c410aa5" alt=""><figcaption><p>inspectX = negative</p></figcaption></figure> <figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FfNlnGTRgo6NPxrHTLQon%2FYAPPinspectX_pos.png?alt=media&amp;token=a4d1473e-5996-414e-91f9-f136a78c455a" alt=""><figcaption><p>inspectX = positive</p></figcaption></figure></div>

#### 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.

<div><figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FCGwpX1s6dwUvKXrO7IvZ%2FYAPPinspectY_neg.png?alt=media&amp;token=63a8eebd-f868-4b47-a9d7-feef53869c9e" alt=""><figcaption><p>inspectY = negative</p></figcaption></figure> <figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FyeKsYlrfVpSNYTpY4EFX%2FYAPPinspectY_pos.png?alt=media&amp;token=b0fda337-136e-4e7d-aa1b-3824f9460226" alt=""><figcaption><p>inspectY = positive</p></figcaption></figure></div>

#### inspectLightTubes

If **-1 or 1** shows the inner structure of the light tubes.

<figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2Fq2T6thLC9DRI4KGPhdNj%2FlightTubes.png?alt=media&amp;token=617acd1f-88b5-482e-b759-e1d53d8c17b4" alt=""><figcaption><p>left: inspectLightTubes = 0, right: inspectLightTubes = 1 (or -1)</p></figcaption></figure>

#### inspectButtons

If **-1** or **1** shows the inner structure of the push buttons.

<figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FMrkOn5wPrKWb0WRywZfK%2FpushButtons.png?alt=media&amp;token=cdf033bd-887a-4323-a072-3f9f397e1dc7" alt=""><figcaption><p>left: inspectButtons = 0, right: inspectButtons = 1 (or -1)</p></figcaption></figure>

#### showSwitches

If **true** tries to show an impression of the tactile switches.

<figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FJlS5bVNlAJlbyLw1Lqqa%2FshowSwitches.png?alt=media&amp;token=58bc36d1-6cdc-46ea-aa05-e1c53f0313bd" alt=""><figcaption></figcaption></figure>
