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);
50 pspt_to_mm = 25.4 / 72;
52 hinge_stride = (clamp_width + hinge_gap_z) / hinge_lobes;
54 main_r = tube_dia/2 + main_th;
56 hinge_outer_r = hinge_around + hinge_pin/2;
57 hinge_y = tube_dia/2 + hinge_outer_r;
59 screw_max_y_lhs = -main_r -screw_nut_across/2;
60 screw_max_y_rhs = -main_r -knob_behind_across/2;
62 screw_y = min(screw_max_y_lhs,
65 bot_y = screw_y -max( screw_nut_across, knob_behind_across/2 )
68 holder_x_sz = bank_x_sz + bank_recess_dx*2;
69 bank_bot_y = strap_above + strap_th;
74 module TubePlan(){ circle(r = tube_dia/2); }
75 module HingePinPlan(){ translate([0, hinge_y]) circle(r= hinge_pin/2); }
76 module HingeBodyPlan(){ translate([0, hinge_y]) circle(r= hinge_outer_r); }
78 module TubeClampLeftPlan(){
81 polygon([[ 0, hinge_y + hinge_outer_r ],
82 [ -main_r + overlap_l, hinge_y + hinge_outer_r ],
83 [ -main_r + overlap_l, bot_y ],
84 [ -clamp_gap/2, bot_y ],
95 module TubeClampLeft() { ////toplevel
96 linextr(-clamp_width/2, clamp_width/2)
100 module TubeClampRightPlan(){
103 rectfromto([ clamp_gap/2, bot_y ],
104 [ clamp_gap/2 + behind_knob_th, 0 ]);
110 rectfromto([ clamp_gap/2, main_r*5 ],
121 module SomeClamp(hinge_alt=false){
123 linextr(-clamp_width/2, clamp_width/2)
126 linextr_x_yz(-main_r*5, main_r*5)
127 translate([screw_y, 0])
130 for (i=[0 : hinge_lobes-1]) {
133 -clamp_width/2 + i * hinge_stride
134 + (hinge_alt ? hinge_stride/2 : 0)
136 linextr(-hinge_gap_z, hinge_stride/2)
137 square(hinge_outer_r*2 + hinge_gap_xy, center=true);
142 module PowerBankItselfSidePlan(){
143 translate([0, bank_bot_y])
144 scale( bank_x_sz / ( (
148 translate(pspt_to_mm *
149 [-0.5 * (bank_eps_bbox_x[0] +
151 -bank_eps_bbox_y[0]])
152 import("powerbank-anker-10000.dxf", convexity=5);
155 module PowerBankSidePlan(){ ////toplevel
156 render() difference(){
157 rectfromto([ -holder_x_sz/2, 0 ],
158 [ +holder_x_sz/2, bank_recess_y + bank_bot_y ]);
160 PowerBankItselfSidePlan();
164 module PowerBankStrapCut(){ ////toplevel
166 rectfromto([ -holder_x_sz, -0.05 ],
167 [ +holder_x_sz, strap_th + strap_r ]);
170 translate([sx * (holder_x_sz/2 - strap_r + 0.1),
178 module PowerBankHolderTest(){ ////toplevel
180 linextr(-20,20) PowerBankSidePlan();
181 linextr(0, strap_th) PowerBankStrapCut();
185 module TubeClampLeft() { ////toplevel
186 // We want this to print with the recess overhand to the right
187 // where the workpiece cooling fan is
193 translate([0, screw_y, 0]) {
194 linextr_x_yz(-(clamp_gap/2 + screw_nut_th), 0)
195 square([screw_nut_across,
196 screw_nut_across / cos(30) + bridge_slop*2],
199 linextr_x_yz(-main_r, -main_r + screw_head_h)
200 square([screw_head, screw_head + bridge_slop*2],
207 module TubeClampRight() { ////toplevel
211 TubeClampRightPlan();
214 module TubeClampDemo() { ////toplevel