3 dxf_off = [ -40, -85 ];
11 torch_clear_below = 10;
22 brace = [ 40, 20, 20 ];
27 slop = 4; // 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
33 miniature = 2; // can adjust this to get commitid size right and rescale *Print
39 include <commitid.scad>
42 [ (torch_big_dia - torch_lit_dia) /
43 (-(torch_min_xcoord_fig_cm - torch_smm_xcoord_fig_cm) * 10 * 2),
44 torch_big_len / (-torch_min_ycoord_fig_cm * 10) ];
46 echo(torch_dxf_scale);
48 above = torch_big_len + torch_clear + torch_clear_below;
52 stem_below = stem_width/2;
54 stem_len = holes[1] - above + stem_below;
56 torch_out = stem_thick + torch_big_dia/2 + torch_out_more;
58 block_width = arm_width*2 + torch_big_dia;
60 block_out = torch_out + torch_big_dia/2/sqrt(2);
66 translate([-torch_lit_dia/2, 0])
67 scale(torch_dxf_scale)
69 translate([-torch_smm_xcoord_fig_cm * 10, 0])
70 import(file="maglite-holder-torch-curve.dxf",
71 convexity=10, center=true);
74 cylinder(r=torch_lit_dia/2, h= torch_tot_len - torch_big_len + 1);
79 scale(slop/torch_lit_dia + 1.0)
83 module ScrewHole(y, rot) {
84 translate([0,0, above -y]){
87 for (d= [-1,+1] * hole_slot/2) {
90 translate([0,0,-stem_thick*2])
91 cylinder(r= hole_dia/2, h= stem_thick*4);
98 module TorchMovement(){
99 translate([0, -torch_out, 0]) {
100 translate([0, 0, -torch_recess])
103 linear_extrude(height= block_out)
104 projection() rotate([-90,0,0]) Torch();
108 module Bracket(){ ////toplevel
109 cid_w = stem_width * .75;
110 hole_near = hole_slot + hole_dia;
114 translate([-stem_width/2, 0, -stem_len])
115 cube([stem_width, stem_thick, stem_len]);
116 translate([0,0, -block_thick]) hull(){
117 translate([-stem_width/2, 0, -brace[2]])
118 cube([stem_width, stem_thick, 1]);
119 translate([-brace[0]/2, 0, 0])
120 cube([brace[0], brace[1], 1]);
123 ScrewHole(holes[0], 90);
124 ScrewHole(holes[1], 0);
125 translate([-cid_w/2, 0, above - holes[0] - hole_near])
127 scale([miniature, miniature, 1])
128 Commitid_BestCount([cid_w, holes[1]-holes[0] - hole_near*2]
133 translate([-block_width/2, 0, -block_thick])
134 cube([block_width, block_out, block_thick]);
139 module BracketPrint(){ ////toplevel
145 module TestTorchPrint(){ ////toplevel
148 translate([0,0, torch_lit_dia / 2 / sqrt(2)])
151 translate([-100, -torch_tot_len*2, 0])
152 cube([200, torch_tot_len*4, 200]);
156 module Demo(){ ////toplevel
158 translate([0, -torch_out, 0])
161 translate([0, -torch_out, above])
162 cylinder(r=torch_big_dia/2, h=1);