diff options
author | naramski | 2018-03-27 21:33:07 +0200 |
---|---|---|
committer | naramski | 2018-03-27 21:37:19 +0200 |
commit | da5765f459012cf75d5b03b8d25ba75be24b4542 (patch) | |
tree | b51897f491c5672b4c1d21ce2c0e49a22abb9a10 /logo.scad | |
download | aur-da5765f459012cf75d5b03b8d25ba75be24b4542.tar.gz |
Initial commit
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); + |