diff options
Diffstat (limited to 'logo.scad')
-rw-r--r-- | logo.scad | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/logo.scad b/logo.scad new file mode 100644 index 000000000000..fc2097822f1b --- /dev/null +++ b/logo.scad @@ -0,0 +1,22 @@ +// logo.scad - Basic example of module, top-level variable and $fn usage + +// The $fn parameter will influence all objects inside this module +// It can, optionally, be overridden when instantiating the module +module Logo(size=50, fn=100) { + // Temporary variables + hole = size/2; + cylinderHeight = size * 1.25; + + // One positive object (sphere) and three negative objects (cylinders) + difference() { + sphere(r=size/2); + + cylinder(r1=hole / 2, r2=hole/2, h=cylinderHeight, center=true); + // The '#' operator highlights the object + rotate(a = [90, 0, 0]) cylinder(r1=hole / 2, r2=hole/2, h=cylinderHeight, center=true); + rotate(a = [0, 90, 0]) cylinder(r1=hole / 2, r2=hole/2, h=cylinderHeight, center=true); + } +} + +Logo(50); + |