Quote Originally Posted by old man emu View Post
QUESTIONS:

1. Say I've just created a module to make a whatsit, and I'm going to be making whatsits of various sizes in the future. If I click on <Save As> in Openscad do I save my .scad file here
C:\Program Files\OpenSCAD\Libraries?
2. If I've saved my module as whatsit.scad, can i create a whatsit using this bit of code:

use <whatsit.scad>
whatsit (parameters);

3. Which is better practice, putting this in the code:
module ring(height, radius, radial_width)
{
difference()
{
cylinder(h = height, r = radius + radial_width / 2);
translate([0, 0, -1])
cylinder(h = height + 2, r = radius - radial_width / 2);
}}

or this:
use <ring.scad>
ring(h,rw,r);

OME

If you have some modules that are in another file and you want to call those modules then you can either "include" the file or "use" the file.

"Include" will perform calculations that are within the file whereas "use" will not do any internal calculations, it will just use the functions.

For example:

With the toroid file from the other thread I can simply
use <./new_toroid.scad>




//CentretoShape,CornerRadius
toroid (25,5);


to make the toroid