3 dxf_off = [ -40, -85 ];
11 torch_clear_below = 10;
22 brace = [ 40, 20, 20 ];
27 slop = 2; // total, not each side
29 torch_min_xcoord_fig_cm = -2.7; // coordinates of bottom left of curve
30 torch_min_ycoord_fig_cm = -5.9; // & big part in fig file. mid top is origin
37 [ torch_big_dia / (-torch_min_xcoord_fig_cm * 10 * 2),
38 torch_big_len / (-torch_min_ycoord_fig_cm * 10) ];
40 echo(torch_dxf_scale);
42 above = torch_big_len + torch_clear + torch_clear_below;
46 stem_below = stem_width/2;
48 stem_len = holes[1] - above + stem_below;
50 torch_out = stem_thick + torch_big_dia/2 + torch_out_more;
52 block_width = arm_width*2 + torch_big_dia;
54 block_out = torch_out + torch_big_dia/2/sqrt(2);
60 scale(torch_dxf_scale)
62 import(file="maglite-holder-torch-curve.dxf",
63 convexity=10, center=true);
66 cylinder(r=torch_lit_dia/2, h= torch_tot_len - torch_big_len + 1);
71 scale(slop/torch_lit_dia + 1.0)
75 module ScrewHole(y, rot) {
76 translate([0,0, above -y]){
79 for (d= [-1,+1] * hole_slot/2) {
82 translate([0,0,-stem_thick*2])
83 cylinder(r= hole_dia/2, h= stem_thick*4);
90 module TorchMovement(){
91 // xxx needs torch increasing for slop
92 translate([0, -torch_out, 0]) {
93 translate([0, 0, -torch_recess])
96 linear_extrude(height= block_out)
97 projection() rotate([-90,0,0]) Torch();
104 translate([-stem_width/2, 0, -stem_len])
105 cube([stem_width, stem_thick, stem_len]);
106 translate([0,0, -block_thick]) hull(){
107 translate([-stem_width/2, 0, -brace[2]])
108 cube([stem_width, stem_thick, 1]);
109 translate([-brace[0]/2, 0, 0])
110 cube([brace[0], brace[1], 1]);
113 ScrewHole(holes[0], 90);
114 ScrewHole(holes[1], 0);
118 translate([-block_width/2, 0, -block_thick])
119 cube([block_width, block_out, block_thick]);
126 translate([0, -torch_out, 0])
129 translate([0, -torch_out, above])
130 cylinder(r=torch_big_dia/2, h=1);