# Standoffs

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.

<figure><img src="/files/1gjbDqmVr0dZgSJDg6mT" alt=""><figcaption></figcaption></figure>

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:

```
//===================================================================
//   *** 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) = { <yappBoth> | yappLidOnly | yappBaseOnly }
//    n(b) = { <yappPin>,  yappHole } // Baseplate support treatment
//    n(c) = { yappAllCorners, <yappBackLeft> | yappFrontLeft | yappFrontRight | yappBackRight }
//    n(d) = { <yappCoordPCB> | 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.

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

```
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 syste&#x6D;*.*\
This results in this:

<figure><img src="/files/972BxE3dAJJ3FYyvqOUK" alt=""><figcaption></figcaption></figure>

You can also code this entry as:

```
pcbStands = 
[
    [5, 5, standoffHeight, yappDefault
      , standoffDiameter, standoffPinDiameter, standoffHoleSlack
      , 0, yappBoth, yappPin, yappAllCorners, yappCoordPCB]
]
```

... or as:

```
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 pi&#x6E;*.* 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*):

```
 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*):

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

<div><figure><img src="/files/JkqZh0nyKLNbrne5shqf" alt="" width="413"><figcaption></figcaption></figure> <figure><img src="/files/Bt2pwWhMzRUPkiiZhb7Z" alt=""><figcaption></figcaption></figure></div>

Parameter **n(c)** can be one or more of the following

```
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*)

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

```
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`**:

```
 [3, 12, yappHole]
```

A ***fillet*** is a structure to strengthen the connectors by providing extra mass. Fillets are automatically added unless *yappNoFillets* is used.&#x20;

<figure><img src="/files/KCfqfntnsv3fgtAB4pdd" alt=""><figcaption></figcaption></figure>

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.

```
  [5, 5, yappDefault, yappDefault, yappDefault, yappDefault, yappDefault, 5]
```

This will set the *fillerRadius* to 5 (diameter to 10).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mrwheel-docs.gitbook.io/yappgenerator_en/standoffs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
