# 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](https://mrwheel-docs.gitbook.io/yappgenerator_en/yappgenerator-api) 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="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FvhBxdkvCNGTWOwj5V7yY%2FYAPP_connector.png?alt=media&#x26;token=f214179a-2862-4ef7-b228-45df70fca1ef" 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="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2Fj4npBIjPvsBUfFpkfZh9%2FYAPP_connectPCB.png?alt=media&#x26;token=e4aa6457-e82d-401f-b614-aed00c788f79" 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="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FIrnDA34WZZVHiVCS5dfy%2FYAPPstandoffHeight.png?alt=media&#x26;token=13632e6c-7c84-4570-9a38-c2cc8c7f8b4f" alt=""><figcaption></figcaption></figure>

### Melt Inserts

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

<div><figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2F467Dt24Jy5seo8mtinBS%2FRuthex-insert-a.png?alt=media&#x26;token=ca79c883-082f-4fe6-afd2-86ea12414090" alt=""><figcaption></figcaption></figure> <figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FXcQqVD2pd38uGKaQdczm%2FRuthex-insert-b.png?alt=media&#x26;token=709d0d5a-54df-43a5-81a2-4c85061e5429" alt=""><figcaption></figcaption></figure></div>
