chiark / gitweb /
treefoi: try this
[reprap-play.git] / treefoil.scad.pl
index 82b0c59b0feb8058b690f82d038edcdffc01e88a..fb46feae727a6f45eb83b9ab23f69175006e49aa 100755 (executable)
@@ -37,7 +37,8 @@ while (<DATA>) { o $_ }
 
 __DATA__
 
-thick = 8;
+thick = 7;
+edgeu = 10;
 
 // calculated
 
@@ -45,12 +46,23 @@ octa_long = thick;
 octa_short = octa_long / (1 + sqrt(2));
 
 module OctaThing() {
-    foreach (r = [[0,0,0], [90,0,0], [0,90,0]]) {
-       rotate(r)
-           cube([ octa_short,octa_short, octa_long ], center=true);
+    hull(){
+       for (r = [[0,0,0], [90,0,0], [0,90,0]]) {
+           rotate(r)
+               cube([ octa_short,octa_short, octa_long ], center=true);
+       }
     }
 }
 
-OctaThing();
+module TraceEdge(p,q) {
+    hull(){
+        for (x=[p,q]) {
+            translate(x * edgeu)
+                OctaThing();
+        }
+    }
+}
+
+Trace();