> 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/connecting-base-and-lid.md).

# Connecting Base and Lid

### Connectors to connect Base and Lid together

With this type of connector you can connect the Base and the Lid together.

```
//===================================================================
//   *** 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) = { <yappAllCorners> | yappFrontLeft | yappFrontRight | yappBackLeft | yappBackRight }
//    n(b) = { <yappCoordBox> | 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](/yappgenerator_en/yappgenerator-api.md) to see how to use **Optional** parameters.

Example:

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

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

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:

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

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

{% hint style="info" %}
Thanks to *Oliver Grafe*
{% endhint %}

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.

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

### Melt Inserts

You have to press/melt an **`insert`** into the Lid-connector.&#x20;

<div><figure><img src="/files/Egj06xdkgF30vI47cF4h" alt=""><figcaption></figcaption></figure> <figure><img src="/files/aifhNms0BoWrtFQKpV5o" alt=""><figcaption></figcaption></figure></div>
