chiark / gitweb /
adafruit-powerboost: solder space prep nfc
[reprap-play.git] / adafruit-powerboost-common.scad
index 1c41a31942069eab18b8c6afb99d0c09b8987a6b..c731c224062fb0e150f8b8e5e42a1e80129e9d54 100644 (file)
@@ -40,6 +40,8 @@ psu_y = +psu_sz[1]/2 + psu_usb_protr;
 
 psu_z = NutBox_h_base(psu_board_nutbox);
 psu_z_down = psu_z + 0.1;
+psu_fix_sz = NutBox_outer_size(psu_board_nutbox);
+psu_board_nutbox_y = psu_sz[1]/2 + psu_board_nutbox[0]/2;
 
 module PsuBoardRepresentation(){
   linear_extrude(height= psu_th)
@@ -123,9 +125,11 @@ module PsuMountPositive(){
        circle(r= psu_hole_dia/2);
     }
   }
-  translate([0, psu_sz[1]/2 + psu_board_nutbox[0]/2, 0])
-    rotate([0,0,180])
-    NutBox(psu_board_nutbox, psu_z_down);
+  difference(){
+    translate([0, psu_board_nutbox_y, 0])
+      rotate([0,0,180])
+      NutBox(psu_board_nutbox, psu_z_down);
+  }
 }
 
 module PsuClamp(){ ////toplevel
@@ -133,7 +137,7 @@ module PsuClamp(){ ////toplevel
     linear_extrude(height=psu_clamp_th + psu_th_for_clamp, convexity=5) {
       difference(){
        hull(){
-         circle(r = fix_sz/2);
+         circle(r = psu_fix_sz/2);
          translate([ -psu_board_nutbox[0]/2, 0])
            square(center=true, [ psu_board_clamp_ovlp*2, psu_clamp_w ]);
        }
@@ -166,10 +170,17 @@ module PsuMountDemo(ceil = 2.5) { ////toplevel
     color("yellow") translate([0,0, -psu_z - ceil])
       linear_extrude(height=0.4, convexity=10)
       PsuLedWindowsPlan();
+
+    translate([0, psu_board_nutbox_y, 10])
+      rotate([180,0,0])
+      rotate([0,0,-90])
+      PsuClamp();
   }
 }
 
 module PsuMountTest(ceil = 2.5) { ////toplevel
+  $fs = 0.1;
+  $fa = 3;
   difference(){
     union(){
       translate([0, psu_y, psu_z])