chiark / gitweb /
belt-slot-cut-jig: wip punchholder
[reprap-play.git] / belt-slot-cut-jig.scad
index b195df4e8fbb7b93dc349d188437c5e441a68237..3e39d8dbec7ef36684c3b53981bc987407f984cc 100644 (file)
@@ -1,5 +1,12 @@
 // -*- C -*-
 
+crewpunch_slop = 0.3;
+
+holder_min_wall = 1;
+holder_front_wall = 5;
+
+// from careful measurement
+
 crewpunch_shape =
   [[  6, [0.6, 6.0], [1.6, 12.3] ],
    [  8, [1.1, 6.2], [1.9, 12.5] ],
@@ -8,7 +15,25 @@ crewpunch_shape =
    [ 14, [2.1, 6.8], [2.6, 13.0] ],
    [ 16, [2.4, 6.9], [2.7, 13.2] ]];
 
+crewpunch_systematic_size_error = +0.36;
+
+crewpunch_min_y = 4.7 - crewpunch_systematic_size_error;
+
+// computed
+
+crewpunch_smallest_shape = crewpunch_shape[0];
+crewpunch_biggest_shape = crewpunch_shape[len(crewpunch_shape)-1];
+
+holder_block_zsz = crewpunch_biggest_shape[0] - crewpunch_smallest_shape[0];
+holder_xsz = crewpunch_biggest_shape[0][0] + crewpunch_biggest_shape[0][1] +
+  holder_min_wall*2;
+holder_ysz = crewpunch_biggest_shape[1][0] + crewpunch_biggest_shape[1][1] +
+  holder_min_wall + holder_front_wall;
+
+// objects
+
 module CrewPunch(){
+  ourslop = crewpunch_slop - crewpunch_systematic_size_error;
   hull(){
     for(layer=crewpunch_shape){
       translate([0,0, layer[0]]){
@@ -16,8 +41,8 @@ module CrewPunch(){
          for(yind=[0,1]) //translate([0,yind?0.5:0,0])
            mirror([xind?1:0,0,0]) mirror([0,yind?0:1,0]){
              translate([-0.1,-0.1,-0.1])
-               cube([0.1 + layer[2][xind],
-                     0.1 + layer[1][yind],
+               cube([0.1 + layer[2][xind] + ourslop,
+                     0.1 + layer[1][yind] + ourslop,
                      0.2]);
            }
       }
@@ -25,4 +50,12 @@ module CrewPunch(){
   }
 }
 
-CrewPunch();
+module PunchHolder(){
+  difference(){
+    cube([holder_xsz, holder_ysz, holder_block_zsz]);
+    
+  }
+}
+       
+//CrewPunch();
+PunchHolder();