What you need
Last updated
Last updated
openSCAD A recent version of “openSCAD” (can be downloaded here).
the YAPP generator "YAPP_Box
" (can be downloaded here).
You can download the YAPP_Box
as a “.zip
” file from github.
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.
Depending on how you downloaded YAPP (git clone
or by a .zip
file) YAPP_Box_main sometimes is named YAPP_Box
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.
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:
You now have a folder that looks like this:
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
And place the YAPPgenerator.scad
file in that folder.
Now, in your openSCAD programs you can include this (now global) library with the following code:
[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:
[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:
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.
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.
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.