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
31 torch_smm_xcoord_fig_cm = -1.9; // x coord of lhs of narrow part
38 [ (torch_big_dia - torch_lit_dia) /
39 (-(torch_min_xcoord_fig_cm - torch_smm_xcoord_fig_cm) * 10 * 2),
40 torch_big_len / (-torch_min_ycoord_fig_cm * 10) ];
42 echo(torch_dxf_scale);
44 above = torch_big_len + torch_clear + torch_clear_below;
48 stem_below = stem_width/2;
50 stem_len = holes[1] - above + stem_below;
52 torch_out = stem_thick + torch_big_dia/2 + torch_out_more;
54 block_width = arm_width*2 + torch_big_dia;
56 block_out = torch_out + torch_big_dia/2/sqrt(2);
62 translate([-torch_lit_dia/2, 0])
63 scale(torch_dxf_scale)
65 translate([-torch_smm_xcoord_fig_cm * 10, 0])
66 import(file="maglite-holder-torch-curve.dxf",
67 convexity=10, center=true);
70 cylinder(r=torch_lit_dia/2, h= torch_tot_len - torch_big_len + 1);
75 scale(slop/torch_lit_dia + 1.0)
79 module ScrewHole(y, rot) {
80 translate([0,0, above -y]){
83 for (d= [-1,+1] * hole_slot/2) {
86 translate([0,0,-stem_thick*2])
87 cylinder(r= hole_dia/2, h= stem_thick*4);
94 module TorchMovement(){
95 translate([0, -torch_out, 0]) {
96 translate([0, 0, -torch_recess])
99 linear_extrude(height= block_out)
100 projection() rotate([-90,0,0]) Torch();
107 translate([-stem_width/2, 0, -stem_len])
108 cube([stem_width, stem_thick, stem_len]);
109 translate([0,0, -block_thick]) hull(){
110 translate([-stem_width/2, 0, -brace[2]])
111 cube([stem_width, stem_thick, 1]);
112 translate([-brace[0]/2, 0, 0])
113 cube([brace[0], brace[1], 1]);
116 ScrewHole(holes[0], 90);
117 ScrewHole(holes[1], 0);
121 translate([-block_width/2, 0, -block_thick])
122 cube([block_width, block_out, block_thick]);
127 module BracketPrint(){ ////toplevel
132 module TestTorchPrint(){ ////toplevel
134 translate([0,0, torch_lit_dia / 2 / sqrt(2)])
137 translate([-100, -torch_tot_len*2, 0])
138 cube([200, torch_tot_len*4, 200]);
142 module Demo(){ ////toplevel
144 translate([0, -torch_out, 0])
147 translate([0, -torch_out, above])
148 cylinder(r=torch_big_dia/2, h=1);