Creating our own OpenSCAD library
One way to turn our desk drawer code into a library file is to add it to our OpenSCAD installation's libraries
directory. We can open this location on our computer by clicking on File | Show Library Folder... in OpenSCAD.
Before we do that, we should take note of how we will be using this library. If we were to simply copy the code as we left it in the Using the BOSL to design a desk drawer section, we could see the whole drawer with the sliders generated. This would happen when using an include
statement for importing:
include <desk_drawer.scad>
This is due to the non-module code at the end of the file that creates the drawer and the sliders we added in the Using the BOSL to design a desk drawer section. We will, however, be able to change the size of the drawer and sliders, as we will have access to the non-module variables declared at the beginning of the desk_drawer.scad
library file. This may seem like the way we should approach...