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_y_sz = 102.25 + 0.50;
42 bank_x_sz = (26.0 + 0.5);
48 retainer_walls = [18, 30];
50 bank_profile_scale_bodge = 1.0;
52 bank_input_ctr = [ 12.5, 11.5 ]; // from nearest corner
53 bank_input_sz = [ 8.5, 10.5 ];
55 mounted_pos_y_offset = 20;
59 straps_y = [ -bank_y_sz * 0.25,
64 bank_recess_dx = minor_wall_min;
66 pspt_to_mm = 25.4 / 72;
68 hinge_stride = (clamp_width + hinge_gap_z) / hinge_lobes;
70 main_r = tube_dia/2 + main_th;
72 hinge_outer_r = hinge_around + hinge_pin/2;
73 hinge_y = tube_dia/2 + hinge_outer_r;
75 screw_max_y_lhs = -main_r -screw_nut_across/2;
76 screw_max_y_rhs = -main_r -knob_behind_across/2;
78 screw_y = min(screw_max_y_lhs,
81 bot_y = screw_y -max( screw_nut_across, knob_behind_across/2 )
84 holder_x_sz = bank_x_sz + bank_recess_dx*2;
85 bank_bot_y = strap_above + strap_th;
90 module TubePlan(){ circle(r = tube_dia/2); }
91 module HingePinPlan(){ translate([0, hinge_y]) circle(r= hinge_pin/2); }
92 module HingeBodyPlan(){ translate([0, hinge_y]) circle(r= hinge_outer_r); }
94 module TubeClampLeftPlan(){
97 polygon([[ 0, hinge_y + hinge_outer_r ],
98 [ -(main_r + overlap_l), hinge_y + hinge_outer_r ],
99 [ -(main_r + overlap_l), bot_y ],
100 [ -clamp_gap/2, bot_y ],
101 [ -clamp_gap/2, 0, ],
111 module TubeClampLeft() { ////toplevel
112 linextr(-clamp_width/2, clamp_width/2)
116 module TubeClampRightPlan(){
119 rectfromto([ clamp_gap/2, bot_y ],
120 [ clamp_gap/2 + behind_knob_th, 0 ]);
126 rectfromto([ clamp_gap/2, main_r*5 ],
138 linextr_x_yz(-main_r*5, main_r*5)
139 translate([screw_y, 0])
142 translate([0, screw_y, 0]) {
143 linextr_x_yz(-(clamp_gap/2 + screw_nut_th), 0)
144 square([screw_nut_across,
145 screw_nut_across / cos(30) + bridge_slop*2],
148 linextr_x_yz(-200, -main_r + screw_head_h)
149 square([screw_head, screw_head + bridge_slop*2],
154 module SomeClamp(hinge_alt=false){
156 linextr(-clamp_width/2, clamp_width/2)
161 for (i=[0 : hinge_lobes-1]) {
164 -clamp_width/2 + i * hinge_stride
165 + (hinge_alt ? hinge_stride/2 : 0)
167 linextr(-hinge_gap_z, hinge_stride/2)
168 square(hinge_outer_r*2 + hinge_gap_xy, center=true);
173 module PowerBankItselfSidePlan(){
174 translate([0, bank_bot_y])
175 scale( bank_profile_scale_bodge *
180 translate(pspt_to_mm *
181 [-0.5 * (bank_eps_bbox_x[0] +
183 -bank_eps_bbox_y[0]])
184 import("powerbank-anker-10000.dxf", convexity=5);
187 module PowerBankItself(){ ////toplevel
189 linextr_y_xz(-bank_y_sz/2,
191 PowerBankItselfSidePlan();
194 module PowerBankSidePlan(){ ////toplevel
195 render() difference(){
196 rectfromto([ -holder_x_sz/2, 0 ],
197 [ +holder_x_sz/2, bank_recess_y + bank_bot_y ]);
199 PowerBankItselfSidePlan();
203 module PowerBankStrapCut(){ ////toplevel
205 rectfromto([ -holder_x_sz, -0.05 ],
206 [ +holder_x_sz, strap_th + strap_r ]);
209 translate([sx * (holder_x_sz/2 - strap_r + 0.1),
217 module PowerBankHolderTest(){ ////toplevel
219 linextr(-1,5) PowerBankSidePlan();
220 linextr(0, strap_th) PowerBankStrapCut();
224 module EndRetainer(depth){ ////toplevel
225 translate([0, -bank_y_sz/2, 0]) {
226 linextr_y_xz(-endwall_th, 0)
227 rectfromto([ 0, -holder_x_sz/2 ],
228 [ -depth, +holder_x_sz/2 ]);
232 linextr(-holder_x_sz/2, -bank_x_sz/2){
234 rectfromto([ 0, -endwall_th ],
245 module PowerBankHolder(){ ////toplevel
249 linextr_y_xz(-(bank_y_sz/2 + 0.1),
250 +(bank_y_sz/2 + 0.1))
253 EndRetainer(retainer_walls[0]);
254 mirror([0,1,0]) EndRetainer(retainer_walls[1]);
257 for (strap_y = straps_y)
258 translate([0, strap_y, 0])
265 translate([ bank_bot_y, -bank_y_sz/2, -bank_x_sz/2 ])
268 translate(bank_input_ctr)
269 square(center=true, bank_input_sz);
273 module TubeClampLeft() { ////toplevel
274 // We want this to print with the recess overhand to the right
275 // where the workpiece cooling fan is
286 module Main(){ ////toplevel
288 translate([main_r, -mounted_pos_y_offset, 0])
292 module TubeClampRight() { ////toplevel
296 TubeClampRightPlan();
299 module TubeClampDemo() { ////toplevel