aboutsummarylogtreecommitdiffstats
path: root/logo.scad
diff options
context:
space:
mode:
authornaramski2018-03-27 21:33:07 +0200
committernaramski2018-03-27 21:37:19 +0200
commitda5765f459012cf75d5b03b8d25ba75be24b4542 (patch)
treeb51897f491c5672b4c1d21ce2c0e49a22abb9a10 /logo.scad
downloadaur-da5765f459012cf75d5b03b8d25ba75be24b4542.tar.gz
Initial commit
Diffstat (limited to 'logo.scad')
-rw-r--r--logo.scad22
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);
+