chiark / gitweb /
belt-slot-cut-jig: for test prints
[reprap-play.git] / belt-slot-cut-jig.scad
index e7d8ca572349a6d5b110cbfaccc731102e9d9e94..6a5175be1624fb1345e33000ab6b600225d5c677 100644 (file)
@@ -1,14 +1,14 @@
 // -*- C -*-
 
 // todo
-//  attachment point move up so clears when inserted
-//  onejig must be deep enough for strap plus motion plus holder
-//  even deeper for side rails
-//  what about existing slot locator ? maybe not
+//  various registration marks
+//   protrustions at ends at strap width and middle
+//   grooves on top face at 1/4,1/2,3/4 length and 1/2 width
 
 crewpunch_slop = 0.3;
 
 holder_min_wall = 2;
+holder_attach_near_wall = 3;
 
 holder_attach_xsz = 5;
 holder_ctie_width = 4.0 + 0.5;
@@ -18,10 +18,19 @@ holder_attach_roof = 2.5;
 
 jig_interval = 25;
 strap_width = 25;
+strap_thick = 3;
 edgewall_width = 3;
 
+punch_travel = 8;
+
 main_slop = 0.5;
 
+jig_max_len = 160; // print diagonally
+//jig_max_len = 30;
+
+registrationgroove_width = 0.8;
+registrationgroove_depth = 1.2;
+
 // from careful measurement
 
 crewpunch_shape =
@@ -44,7 +53,7 @@ crewpunch_biggest_shape = crewpunch_shape[len(crewpunch_shape)-1];
 // computed
 
 attach_ysz = holder_attach_walls*2 + holder_ctie_width;
-holder_front_wall = crewpunch_shaft_max_y - crewpunch_biggest_shape[1][1]
+holder_front_all = crewpunch_shaft_max_y - crewpunch_biggest_shape[1][1]
   + attach_ysz;
 
 holder_block_zsz = crewpunch_biggest_shape[0] - crewpunch_smallest_shape[0];
@@ -52,9 +61,17 @@ holder_xsz = crewpunch_biggest_shape[2][0] + crewpunch_biggest_shape[2][1] +
   holder_min_wall*2;
 crewpunch_biggest_y =
   crewpunch_biggest_shape[1][0] + crewpunch_biggest_shape[1][1];
-holder_ysz = crewpunch_biggest_y + holder_min_wall + holder_front_wall;
+holder_ysz = crewpunch_biggest_y + holder_min_wall + holder_front_all;
+
+attach_offset = 0.5 * (holder_front_all - holder_attach_near_wall);
+
+jig_main_zsz = holder_block_zsz + punch_travel;
 
-attach_offset = holder_attach_xsz + holder_min_wall;
+jig_ends_extra = 2;
+
+//jig_iters = (jig_max_len - jig_ends_extra) / jig_interval;
+jig_iters=2;
+echo(jig_iters);
 
 // objects
 
@@ -85,7 +102,7 @@ module PunchHolder(cutouts=true){
        cube([holder_xsz, holder_ysz - attach_offset, holder_block_zsz]);
       if (cutouts)
        translate([crewpunch_biggest_shape[2][1] + holder_min_wall,
-                  crewpunch_biggest_shape[1][0] + holder_front_wall,
+                  crewpunch_biggest_shape[1][0] + holder_front_all,
                   -crewpunch_smallest_shape[0]])
          CrewPunch();
     }
@@ -93,30 +110,77 @@ module PunchHolder(cutouts=true){
       translate([holder_xsz/2 - holder_attach_xsz/2, 0, 0])
        cube([holder_attach_xsz,
              attach_ysz,
-             holder_block_zsz + holder_ctie_thick + holder_attach_roof + 1]);
+             holder_block_zsz + punch_travel
+             + holder_ctie_thick + holder_attach_roof + 1]);
       if (cutouts)
-       translate([-30, holder_attach_walls, holder_block_zsz + 0.1])
+       translate([-30,
+                  holder_attach_walls,
+                  holder_block_zsz + punch_travel])
          cube([60, holder_ctie_width, holder_ctie_thick]);
     }
   }
 }
 
+module RegistrationGroove(l){
+  // runs along the +ve X axis for length l but at correct z pos
+  translate([0, 0, jig_main_zsz + 0.1]) {
+    rotate([90,0,90])
+      linear_extrude(height=l)
+      polygon([[-registrationgroove_width/2, 0],
+              [ +registrationgroove_width/2, 0],
+              [ 0, -registrationgroove_depth ]]);
+  }
+}
+
 module OneJig(){
   difference(){
     translate([-(jig_interval/2 + 1),
               -(strap_width/2 + edgewall_width) - attach_offset,
-              0])
+              -strap_thick])
       cube([jig_interval + 2,
            strap_width + edgewall_width*2 + attach_offset,
-           holder_ysz]);
+           jig_main_zsz + strap_thick]);
     minkowski(){
       cube([main_slop*2, main_slop*2, 50], center=true);
       PunchHolder(false);
     }
+    translate([-100, -strap_width/2, -10])
+      cube([200, strap_width, 10]);
+   translate([-100,0,0])
+     RegistrationGroove(200);
+   for (xfrac=[-1/4,0,+1/4])
+     translate([jig_interval * xfrac, -100, 0])
+       rotate([0,0,90])
+       RegistrationGroove(200);
   }
 }
-       
+
+module Jig(){
+  for (i=[0:jig_iters-1]) {
+    translate([jig_interval * i, 0, 0])
+      OneJig();
+  }
+}
+
+module JigT(){ ////toplevel
+  rotate([180,0,0])
+    Jig();
+}
+
+module PunchHolderT(){ ////toplevel
+  PunchHolder(true);
+}
+
+module Demo(){
+  %PunchHolder();
+  Jig();
+}
+
 //CrewPunch();
-PunchHolder();
+//PunchHolder();
 //PunchHolder(false);
 //OneJig();
+//Jig();
+//Demo();
+//JigT();
+//PunchHolderT();