# boxMounts (advanced)

The boxMounts API is:

```
Parameters:
 Required:
  p(0) = pos : position along the wall : [pos,offset] : vector for position 
               and offset X.
               Position is to center of mounting screw in leftmost position 
               in slot
  p(1) = screwDiameter
  p(2) = width of opening in addition to screw diameter 
               (0=Circular hole screwWidth = hole twice as wide as it is tall)
  p(3) = height
 Optional:
  p(4) = filletRadius : Default = 0/Auto(0 = auto size)
  n(a) = { yappLeft | yappRight | yappFront | yappBack } : one or more
  n(b) = { yappNoFillet }
  n(c) = { <yappBase>, yappLid }
  n(d) = { yappCenter } : shifts Position to be in the center of the opening 
                          instead of the left of the opening
  n(e) = { <yappGlobalOrigin>, yappLeftOrigin } : Only affects Back and Right 
                                                  Faces
```

The optional parameters n(c) and n(d) are important.

#### n(c) - mount on base or lid

Standard the boxMount will be placed at the base of the box.

```
boxMounts   = 
[
   [0,           3.5, 15, 3, yappLeft]
  ,[shellLength, 3.5, 15, 3, yappLeft]
];
```

The mounts are placed on the base (default):

<figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FIGHP4L5V9KoiLANHB7iR%2FboxMounts_a.png?alt=media&#x26;token=e6bdc33d-3bd9-4112-9eb3-65e92dc6efb7" alt=""><figcaption></figcaption></figure>

With **n(c)** set to `yappLid` the mounts are placed at the lid:

```
boxMounts   = 
[
   [0,           3.5, 15, 3, yappLeft, yappLid]
  ,[shellLength, 3.5, 15, 3, yappLeft, yappLid]
];
```

<figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FmySOUs7CrQgpwYnx88mm%2FboxMounts_lid.png?alt=media&#x26;token=9b46755f-6974-4e5c-901f-e89efc09ad6c" alt=""><figcaption></figcaption></figure>

#### n(d) - yappCenter

When `yappCenter` is added the center of the mount will be the reference for the `pos` parameter \[**p(0)** ].

```
boxMounts   = 
[
   [0,           3.5, 15, 3, yappLeft, yappCenter]
  ,[shellLength, 3.5, 15, 3, yappLeft, yappCenter]
];
```

The mounts pos is centered around the, well, 'center' of the mounts:

<figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2F1scB1jUwcl5Upodffw4p%2FboxMounts_Center.png?alt=media&#x26;token=71fe173f-471f-425b-9d52-0d6d614ea224" alt=""><figcaption></figcaption></figure>

#### p(2) - negative width

With a negative value of the width \[ **p(2)**] the mounts are 90 degrees rotated.

```
boxMounts   = 
[
   [10,             3.5, -5, 3, yappLeft, yappCenter] //-- [A] - p(2) negative
  ,[shellLength/2 , 3.5,  5, 3, yappLeft, yappCenter] //-- [B] - p(2) positive
  ,[shellLength-10, 3.5, -5, 3, yappLeft, yappCenter] //-- [C] - p(2) negative
];
```

<figure><img src="https://832938294-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcI46RW7gXIHinmkl2pBq%2Fuploads%2FBc7WsDSVhTai204mLrWm%2FboxMounts_Negative.png?alt=media&#x26;token=8132d267-6ad3-4850-ac43-9cbda375e1a6" alt=""><figcaption></figcaption></figure>
