chiark / gitweb /
toolbox-inserts: wip Bits
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 20 May 2025 19:18:42 +0000 (20:18 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 20 May 2025 19:18:42 +0000 (20:18 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
toolbox-inserts.scad

index 217dd9190ef9f10e30ac06fbe8d26b0959ccdcc1..b9b1d589e1710582443053b46ab7edab74233acc 100644 (file)
@@ -56,6 +56,18 @@ ratchet_handle_grip_end_x = 63.1 + 0.5; // far end of handle
 ratchet_handle_grip_end_h = 23.5; // height of handle at far end (width l.d.)
 // many other parameters hardcoded in RatchetHandlePositive
 
+bit_pitch_x = 25.4 * 2 / 5;
+bit_pitch_y = 25.4 * 3 / 4;
+bit_n_x = 10;
+bit_n_y = 2;
+bit_mag_d = 6 + 0.5;
+bit_bit_d = 7.2 + 0.4;;
+bit_around_mag_r = 0.75; // unused
+bit_around_bit_wall = 2.0;
+bit_registration_wall = 1.0;
+bit_registration_wall_gap = 0.33;
+bit_mag_th = 1.0 + 0.125;
+
 $fs = 0.1;
 $fa = 3;
 $screw_test = false;
@@ -464,6 +476,45 @@ module RatchetHandleHolder() { ////toplevel
     RatchetHandleWell();
 }
 
+//==================== bit holder ====================
+
+bitholder_sz = [
+   bit_pitch_x * (bit_n_x -1),
+   bit_pitch_y * (bit_n_y -1)
+               ]
+  + [2,2] * bit_around_bit_wall;
+
+module BitHolderOuterPlan() {
+  square(bitholder_sz, center=true);
+}
+module BitHolderInnerPlan() {
+  offset(r= -bit_registration_wall_gap)
+    BitHolderOuterPlan();
+}
+module BitMagnetHolderPlan() {
+  offset(r= -bit_registration_wall)
+    BitHolderInnerPlan();
+}
+module BitAtBits() {
+  for (x = [0 : bit_n_x-1]) {
+    for (y = [0 : bit_n_y-1]) {
+      xy = [x, y] - [bit_n_x-1, bit_n_y-1]/2;
+      translate([xy[0] * bit_pitch_x, xy[1] * bit_pitch_y])
+       children(0);
+    }
+  }
+}
+
+module BitMagnetHolder(){ ////toplevel
+  linextr(0, bit_mag_th){
+    difference(){
+      BitMagnetHolderPlan();
+      BitAtBits()
+       circle(r = bit_mag_d/2);
+    }
+  }
+}
+
 //==================== tests and demos ====================
 
 module TestPlatesPrint() { ////toplevel