chiark / gitweb /
poster-tube-lid: Make SomeStrap etc. take width; adjust catch
[reprap-play.git] / poster-tube-lid.scad
index d5d1f9318f3c2d7c1ad6c1c477f3148e4709f5ab..b08eae29301f39a1098224adcc4cd3f837d8e942 100644 (file)
@@ -86,6 +86,7 @@ catch_pin_slop_x_extra = 0.0; // only on one side
 catch_stalk_above_gap = 1.5;
 catch_stalk_eff_bend_rad = catch_stalk_len * 0.75;
 
+catch_strap_width = 12;
 catch_stalk_base_width = 15;
 
 catch_knob_dia = 6;
@@ -149,7 +150,6 @@ smc_cnr_c_x = sm_bolt_shaft/2 - sm_closure_cnr
   + sm_bolt_head_thick/2 + smc_bolt_nut_eff_thick/2;
 
 catch_cr = catch_knob_dia/2 + catch_stalk_beside_gap;
-catch_strap_width = sm_main_width;
 catch_strap_thick = sm_main_thick;
 
 echo("R ", sm_inner_rad, bayo_real_rad, bayo_nom_rad);
@@ -491,31 +491,32 @@ module ImplHeadCupTest(){ ////toplevel
       ImplHeadCup();
 }
 
-module SomeStrap(){
+module SomeStrap(width){
   // children(0) is to add, (1) subtract
   difference(){
     union(){
-      cylinder(r=sm_outer_rad, h=sm_main_width);
+      cylinder(r=sm_outer_rad, h=width);
       StrapMountProtrusion(smc_cnr_c_x + sm_closure_cnr,
                           smc_max_y,
-                          sm_closure_cnr);
+                          sm_closure_cnr,
+                          width);
       children(0);
     }
     translate([0,0,-1])
-      cylinder(r=sm_inner_rad, h=sm_main_width+2);
+      cylinder(r=sm_inner_rad, h=width+2);
     translate(smc_pos)
-      StrapMountBolt(10);
+      StrapMountBolt(10, width);
     translate(smc_pos)
       cube([ sm_bolt_tighten_allow, 40,100 ], center=true);
     children(1);
   }
 }
 
-module StrapMountBolt(l_delta){ ///toplevel
+module StrapMountBolt(l_delta, strap_width){ ///toplevel
   // positioned relative to smc_pos
   translate([(smc_bolt_nut_eff_thick - sm_bolt_head_thick)/2,
             smc_bolt_y,
-            sm_main_width/2]){
+            strap_width/2]){
     translate([ -sm_bolt_shaft/2-1, 0,0 ]){
       rotate([0,90,0]) cylinder(r= sm_bolt_dia/2, h= sm_bolt_shaft+2);
     }
@@ -529,9 +530,9 @@ module StrapMountBolt(l_delta){ ///toplevel
   }
 }
 
-module StrapMountProtrusion(half_x, max_y, cnr){
+module StrapMountProtrusion(half_x, max_y, cnr, width){
   translate(smc_pos){
-    linear_extrude(height=sm_main_width, convexity=10){
+    linear_extrude(height=width, convexity=10){
       hull(){
        for (m = [0,1]) mirror([m,0,0]) {
          translate([-(half_x - cnr), max_y - cnr])
@@ -545,7 +546,7 @@ module StrapMountProtrusion(half_x, max_y, cnr){
 }
 
 module StrapMount(){ ////toplevel
-  SomeStrap(){
+  SomeStrap(sm_main_width){
     rotate([0,0,180]){
       StrapMountProtrusion(strap_hoop_inside/2 + strap_hoop_thick,
                           strap_hoop_thick,
@@ -651,7 +652,7 @@ module CatchAssembly(){ /////toplevel
               ".stl"),
           convexity=20);
 
-  SomeStrap(){
+  SomeStrap(catch_strap_width){
     union(){ }
     union(){
       translate([-200, -200, -200])