smc_max_y = smc_bolt_y + sm_bolt_y_over
+ max(sm_bolt_head_dia/2, smc_bolt_nut_dia/2);
smc_cnr_c_x = sm_bolt_shaft/2 - sm_closure_cnr
- - max(sm_bolt_head_thick, sm_bolt_nut_thick);
+ + max(sm_bolt_head_thick, sm_bolt_nut_thick);
$fs= coarse ? 2.5 : 0.5;
$fa= coarse ? 5 : 1;
}
}
-module StrapMountBolt(){ ///toplevel
+module StrapMountBolt(l_delta){ ///toplevel
// positioned relative to smc_pos
+ translate([(sm_bolt_nut_thick - sm_bolt_head_thick)/2,
+ smc_bolt_y,
+ sm_main_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);
+ }
+ translate([ -sm_bolt_shaft/2, 0,0 ])
+ rotate([0,-90,0])
+ cylinder($fn=6, r=smc_bolt_nut_dia/2, h=sm_bolt_nut_thick + l_delta);
+ translate([ sm_bolt_shaft/2, 0,0 ])
+ rotate([0,90,0])
+ cylinder(r=sm_bolt_head_dia/2, h=sm_bolt_head_thick + l_delta);
+ }
+}
+
+module StrapMountProtrusion(half_x, max_y){
+ translate(smc_pos){
+ linear_extrude(height=sm_main_width, convexity=10){
+ hull(){
+ for (m = [0,1]) mirror([m,0,0]) {
+ translate([-(half_x - sm_closure_cnr), max_y - sm_closure_cnr])
+ circle(r=sm_closure_cnr);
+ translate([-half_x, -sm_inner_rad])
+ square([1,1]);
+ }
+ }
+ }
+ }
}
module StrapMount(){ ////toplevel
difference(){
union(){
cylinder(r=sm_outer_rad, h=sm_main_width);
- translate(smc_pos){
- linear_extrude(height=sm_main_width, convexity=10){
- hull(){
- for (m = [0,1]) mirror([m,0,0]) {
- translate([-smc_cnr_c_x, smc_max_y - sm_closure_cnr])
- circle(r=sm_closure_cnr);
- translate([-smc_cnr_c_x, -sm_inner_rad])
- square([1,1]);
- }
- }
- }
- }
+ StrapMountProtrusion(smc_cnr_c_x + sm_closure_cnr, smc_max_y);
}
translate([0,0,-1])
cylinder(r=sm_inner_rad, h=sm_main_width+2);
+ translate(smc_pos)
+ StrapMountBolt(10);
}
}