> 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="/files/lwvlv0ce9Kmz2Gcy0wMp" alt=""><figcaption><p>showSideBySide = false, onLidCap = 15</p></figcaption></figure> <figure><img src="/files/Tjc10TF9WR0cafduBQ5u" 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="/files/zeDUvh9zrkzHcsgy5BLg" alt=""><figcaption><p>hideBaseWall = false, hideLidWall = false</p></figcaption></figure> <figure><img src="/files/zgFWfh3AJmBFTuBJSih8" alt=""><figcaption><p>hideBaseWall = true, hideLidWall = true</p></figcaption></figure> <figure><img src="/files/CClOFL8WxMgrSvG9GcZy" 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="/files/CIcEYbZpMuniskmbJo6q" alt=""><figcaption><p>showOrientation = false</p></figcaption></figure> <figure><img src="/files/zE6lTWlLpxjd4nSKk1Oa" 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="/files/Sfts15Egd8O6G9Lk3C5y" alt=""><figcaption><p>showPCB = false</p></figcaption></figure> <figure><img src="/files/etlrDnfPjzbc1oBms7H9" 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="/files/BELwhgoAI16uY130O1N4" alt=""><figcaption><p>showPCBmarkers = true, showPCB = true</p></figcaption></figure> <figure><img src="/files/IpTfDmKZuXLiBfm2k3He" 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="/files/qLEHfkxLgym0l3Hrg7R0" alt=""><figcaption><p>showShellZero = false</p></figcaption></figure> <figure><img src="/files/AX3PIepa2nTDWALwiKSN" 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="/files/NUwtIjr644QXDzVRqVWy" alt="" width="444"><figcaption></figcaption></figure>

#### showCenterMarkers

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

<figure><img src="/files/hcKJabNajrr4gUlo6WHP" 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="/files/CO476RFrFTR5rjQjegGh" alt=""><figcaption><p>inspectX = negative</p></figcaption></figure> <figure><img src="/files/ACFHqADB4ZLi7qfQX2E9" 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="/files/yqlhgmmJXr2Nayoaotm2" alt=""><figcaption><p>inspectY = negative</p></figcaption></figure> <figure><img src="/files/clQuUnEmuvCcb41teSss" 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="/files/ATXDsA4HB31D0lEm5moh" 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="/files/G4bfpW34xWXcYsQRweIS" 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="/files/vKRnxSniSGyl4eToUKfe" alt=""><figcaption></figcaption></figure>
