8 hinge_pin = 1.5; // xxx
13 screw_head = 10; // xxx
14 screw_nut_across = 10; // xxx
15 screw_nut_th = 5; // xxx
16 screw_head_h = 5; // xxx
18 knob_behind_across = 15; // xxx
29 bridge_slop_factor = 1.5;
40 hinge_stride = (clamp_width + hinge_gap_z) / hinge_lobes;
42 main_r = tube_dia/2 + main_th;
44 hinge_outer_r = hinge_around + hinge_pin/2;
45 hinge_y = tube_dia/2 + hinge_outer_r;
47 screw_max_y_lhs = -main_r -screw_nut_across/2;
48 screw_max_y_rhs = -main_r -knob_behind_across/2;
50 screw_y = min(screw_max_y_lhs,
53 bot_y = screw_y -max( screw_nut_across, knob_behind_across/2 )
58 module TubePlan(){ circle(r = tube_dia/2); }
59 module HingePinPlan(){ translate([0, hinge_y]) circle(r= hinge_pin/2); }
60 module HingeBodyPlan(){ translate([0, hinge_y]) circle(r= hinge_outer_r); }
62 module TubeClampLeftPlan(){
65 polygon([[ 0, hinge_y + hinge_outer_r ],
66 [ -main_r + overlap_l, hinge_y + hinge_outer_r ],
67 [ -main_r + overlap_l, bot_y ],
68 [ -clamp_gap/2, bot_y ],
79 module TubeClampLeft() { ////toplevel
80 linextr(-clamp_width/2, clamp_width/2)
84 module TubeClampRightPlan(){
87 rectfromto([ clamp_gap/2, bot_y ],
88 [ clamp_gap/2 + behind_knob_th, 0 ]);
94 rectfromto([ clamp_gap/2, main_r*5 ],
105 module SomeClamp(hinge_alt=false){
107 linextr(-clamp_width/2, clamp_width/2)
110 linextr_x_yz(-main_r*5, main_r*5)
111 translate([screw_y, 0])
114 for (i=[0 : hinge_lobes-1]) {
117 -clamp_width/2 + i * hinge_stride
118 + (hinge_alt ? hinge_stride/2 : 0)
120 linextr(-hinge_gap_z, hinge_stride/2)
121 square(hinge_outer_r*2 + hinge_gap_xy, center=true);
126 module TubeClampLeft() { ////toplevel
131 translate([0, screw_y, 0]) {
132 linextr_x_yz(-(clamp_gap/2 + screw_nut_th), 0)
133 square([screw_nut_across, screw_nut_across * bridge_slop_factor],
136 linextr_x_yz(-main_r, -main_r + screw_head_h)
137 square([screw_head, screw_head * bridge_slop_factor],
143 module TubeClampRight() { ////toplevel
145 TubeClampRightPlan();
148 module TubeClampDemo() { ////toplevel