# What you need

* openSCAD\
  A recent version of “**openSCAD**” (can be [downloaded here](https://openscad.org/downloads.html)).
* the YAPP generator "**`YAPP_Box`**" (can be [downloaded here](https://github.com/mrWheel/YAPP_Box)).

### Download the YAPP\_Box as a .zip file

You can download the `YAPP_Box` as a “`.zip`” file from [github](https://github.com/mrWheel/YAPP_Box).&#x20;

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

Extract the “**`YAPP_Box-main.zip`**” file into your openSCAD projects folder. You now have a new folder “**`YAPP_Box-main`**” containing several sample files and the `YAPPgenerator.scad` library. \
As there are many examples in this folder I would leave the folder structure as it is and copy the examples (in the `examples` sub-folder) you want to try out to your opensSCAD project folder. Also best practise is not to change the `YAPP_Template.scad` file but save a copy to the folder where you want to make a new project box. That way you leave the `YAPP_Template.scad` in tact for your next project.

<figure><img src="/files/KOgaQgIqkltesMCSQRQB" alt="" width="242"><figcaption><p>Download .zip</p></figcaption></figure>

{% hint style="warning" %}
Depending on how you downloaded YAPP (`git clone` or by a `.zip` file) **YAPP\_Box\_main** sometimes is named **YAPP\_Box**
{% endhint %}

### Clone the YAPP\_Box from github

If you have `git` installed on your computer you can also clone the `YAPP_Box`. Click on the two squares icon to copy the URL to the clipboard.

<figure><img src="/files/nCLBKhGasrbxMQvhdCdl" alt=""><figcaption><p>Copy clone URL</p></figcaption></figure>

Now, in a terminal window go to the folder where you want to save the library and clone the `YAPP_Box` using the URL you just copied to the clipboard:

```
cd <myOpenScadProject Folder>
git clone https://github.com/mrWheel/YAPP_Box.git
```

You now have a folder that looks like this:

<figure><img src="/files/rX2BMI3wHcAfmNQuhpFN" alt="" width="323"><figcaption><p>cloned YAPP_Box</p></figcaption></figure>

## Where to put the YAPPgenerator.scad

In the folder "`YAPP_Box`" you will find the `YAPPgenerator.scad` file that is the backbone of the library. There are three ways to organize the way you want to work with the YAPPgenerator.

* **\[1]** Save the `YAPPgenerator.scad` library in the library folder of your openSCAD installation

<figure><img src="/files/NGgiwXgQRJm8dzTVXUXF" alt="" width="375"><figcaption></figcaption></figure>

&#x20;         And place the `YAPPgenerator.scad` file in that folder.

<figure><img src="/files/6LPdzFEx4n5Np6LA88EC" alt="" width="255"><figcaption></figcaption></figure>

&#x20;         Now, in your openSCAD programs you can include this (now **global**) library with the \
&#x20;         following code:

```
// your openSCAD program
include <YAPPgenerator.scad>
   .
// your program code goes here
   .
//---- This is where the magic happens ----
YAPPgenerate();
```

* **\[2]** Save the YAPPgenerator library in a convenient folder of your choice or leave it at `YAPP_Box` (if you git-cloned the library) or at `YAPP_Box-main` (if you downloaded the library as a `.zip` file).\
  In all your openSCAD programs you need to use the exact location of the `YAPPgenerator.scad` library. If, for instance, you have placed the library in the folder `"/User/openScadProjects/YAPP_Box-main"` your program should look like this:

```
// your openSCAD program
include </User/openScadProjects/YAPP_Box-main/YAPPgenerator.scad>
   .
// your program code goes here
   .
//---- This is where the magic happens ----
YAPPgenerate();
```

* **\[3]** Save the YAPPgenerator library in the same folder where you write the code for a box you want to make. You can now insert the library as in the next code fragment:

```
// your openSCAD program
include <YAPPgenerator.scad>
// or: include <./YAPPgenerator.scad>
   .
// your program code goes here
   .
//---- This is where the magic happens ----
YAPPgenerate();
```

## Pros and Cons of the three methods

1. If you place the library in the openSCAD global library folder:
   * **Pro**: Conveniënt  especially if you are not over organized. You have only one copy of the YAPPgenerator library.
   * **Con**: If you update the library to a new version there is a change your previously created boxes won't compile or have a different outcome.
2. If you place the library in a folder of your choosing:
   * **Pro**: You only have one copy of the library.
   * **Con**: You have to use the whole path to the library in all your box-programs. If you update the library to a new version there is a change your previously created boxes won't compile or won't look the same.
3. If you save the YAPPgenerator library in the same folder where you create a project:
   * **Pro**: Even if you install a new version of the YAPPgenerator library this won't influence your box-program (as long as you don't save the new library in your project-box folder).
   * **Con**: You have multiple copies of the library on your system.

Of course you can store a "*production version*"  in the global library folder (1) and a "*new version*" in the same folder where create a project box (3) so you can test the new functionality/API of the library.&#x20;


---

# 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/what-you-need.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.
