8 hinge_pin = 1.8 + 0.75;
13 screw_head = 8.7 + 1.2;
14 screw_nut_across = 7.9 + 0.75;
15 screw_nut_th = 3.9 + 0.75;
16 screw_head_h = 3.6 + 0.75;
18 knob_behind_across = 12.2 + 0.75;
38 bank_eps_bbox_x = [149, 598];
39 bank_eps_bbox_y = [274, 1452];
41 bank_x_sz = (24.9 + 0.5);
45 pspt_to_mm = 25.4 / 72;
47 hinge_stride = (clamp_width + hinge_gap_z) / hinge_lobes;
49 main_r = tube_dia/2 + main_th;
51 hinge_outer_r = hinge_around + hinge_pin/2;
52 hinge_y = tube_dia/2 + hinge_outer_r;
54 screw_max_y_lhs = -main_r -screw_nut_across/2;
55 screw_max_y_rhs = -main_r -knob_behind_across/2;
57 screw_y = min(screw_max_y_lhs,
60 bot_y = screw_y -max( screw_nut_across, knob_behind_across/2 )
65 module TubePlan(){ circle(r = tube_dia/2); }
66 module HingePinPlan(){ translate([0, hinge_y]) circle(r= hinge_pin/2); }
67 module HingeBodyPlan(){ translate([0, hinge_y]) circle(r= hinge_outer_r); }
69 module TubeClampLeftPlan(){
72 polygon([[ 0, hinge_y + hinge_outer_r ],
73 [ -main_r + overlap_l, hinge_y + hinge_outer_r ],
74 [ -main_r + overlap_l, bot_y ],
75 [ -clamp_gap/2, bot_y ],
86 module TubeClampLeft() { ////toplevel
87 linextr(-clamp_width/2, clamp_width/2)
91 module TubeClampRightPlan(){
94 rectfromto([ clamp_gap/2, bot_y ],
95 [ clamp_gap/2 + behind_knob_th, 0 ]);
101 rectfromto([ clamp_gap/2, main_r*5 ],
112 module SomeClamp(hinge_alt=false){
114 linextr(-clamp_width/2, clamp_width/2)
117 linextr_x_yz(-main_r*5, main_r*5)
118 translate([screw_y, 0])
121 for (i=[0 : hinge_lobes-1]) {
124 -clamp_width/2 + i * hinge_stride
125 + (hinge_alt ? hinge_stride/2 : 0)
127 linextr(-hinge_gap_z, hinge_stride/2)
128 square(hinge_outer_r*2 + hinge_gap_xy, center=true);
133 module PowerBankSidePlan(){ ////toplevel
135 scale( bank_x_sz / ( (
139 translate(pspt_to_mm *
140 [-0.5 * (bank_eps_bbox_x[0] +
142 -bank_eps_bbox_y[0]])
143 import("powerbank-anker-10000.dxf", convexity=5);
147 module PowerBankHolder(){ ////toplevel
151 module TubeClampLeft() { ////toplevel
156 translate([0, screw_y, 0]) {
157 linextr_x_yz(-(clamp_gap/2 + screw_nut_th), 0)
158 square([screw_nut_across,
159 screw_nut_across / cos(30) + bridge_slop*2],
162 linextr_x_yz(-main_r, -main_r + screw_head_h)
163 square([screw_head, screw_head + bridge_slop*2],
169 module TubeClampRight() { ////toplevel
172 TubeClampRightPlan();
175 module TubeClampDemo() { ////toplevel