chiark / gitweb /
quacks-ingredients: -counts: Include spares in Base_White
[reprap-play.git] / quacks-ingredients-demos.scad
index ecd031c6f537b1c065bb6bb9d283b78cdaedb22e..1f02c60877387a849aee05a866afc6097590d8f5 100644 (file)
@@ -3,8 +3,8 @@
 include <quacks-ingredients.scad>
 
 sandingframe_gap = 0.3; // to be added to radius
-sandingframe_nw = 3;
-sandingframe_nl = 5;
+sandingframe_nw = 5;
+sandingframe_nl = 6;
 sandingframe_th = thick*2/3;
 
 module Demo(){ ////toplevel
@@ -15,18 +15,24 @@ module Demo(){ ////toplevel
 }
 
 module SandingFrame(){ ////toplevel
-  stride = token_dia + 5;
+  stridel = token_dia + 5;
   nl = sandingframe_nl;
   nw = sandingframe_nw;
+  stridew = stridel * cos(30);
+  stride = [stridel,stridew];
 
   linear_extrude(height = sandingframe_th) {
     difference(){
-      translate((token_dia/2 + stride) * 0.5 * [-1,-1])
-       square([ stride * (nl + 0.5),
-                stride * 1.5 ]);
-      for (i = [0 : nl-1]) {
-       translate([ stride*i, 0 ])
-         circle(r = token_dia/2 + sandingframe_gap);
+      translate((token_dia/2 + stridel) * 0.5 * [-1,-1])
+       square([ stridel * (nl + 0.5),
+                stridew * nw + stridel * 0.5 ]);
+      for (j = [0 : nw-1]) {
+       eo = j % 2;
+       for (i = [0 : nl-1-0.5*eo]) {
+         translate([stridel * (i + 0.5 * eo),
+                    stridew * j])
+           circle(r = token_dia/2 + sandingframe_gap);
+       }
       }
     }
   }