3 dxf_off = [ -40, -85 ];
11 torch_clear_below = 10;
22 brace = [ 40, 20, 20 ];
27 movement_extra_angle = 5;
29 slop = 4; // total, not each side
31 torch_min_xcoord_fig_cm = -2.7; // coordinates of bottom left of curve
32 torch_min_ycoord_fig_cm = -5.9; // & big part in fig file. mid top is origin
33 torch_smm_xcoord_fig_cm = -1.9; // x coord of lhs of narrow part
35 miniature = 1; // can adjust this to get commitid size right and rescale *Print
41 include <commitid.scad>
44 [ (torch_big_dia - torch_lit_dia) /
45 (-(torch_min_xcoord_fig_cm - torch_smm_xcoord_fig_cm) * 10 * 2),
46 torch_big_len / (-torch_min_ycoord_fig_cm * 10) ];
48 echo(torch_dxf_scale);
50 above = torch_big_len + torch_clear + torch_clear_below;
54 stem_below = stem_width/2;
56 stem_len = holes[1] - above + stem_below;
58 torch_out = stem_thick + torch_big_dia/2 + torch_out_more;
60 block_width = arm_width*2 + torch_big_dia;
62 block_out = torch_out + torch_big_dia/2/sqrt(2);
68 translate([-torch_lit_dia/2, 0])
69 scale(torch_dxf_scale)
71 translate([-torch_smm_xcoord_fig_cm * 10, 0])
72 import(file="maglite-holder-torch-curve.dxf",
73 convexity=10, center=true);
76 cylinder(r=torch_lit_dia/2, h= torch_tot_len - torch_big_len + 1);
81 scale(slop/torch_lit_dia + 1.0)
85 module ScrewHole(y, rot) {
86 translate([0,0, above -y]){
89 for (d= [-1,+1] * hole_slot/2) {
92 translate([0,0,-stem_thick*2])
93 cylinder(r= hole_dia/2, h= stem_thick*4);
100 module TorchMovement(){
101 translate([0, -torch_out, 0]) {
102 translate([0, 0, -torch_recess])
105 rotate([0,0, as*movement_extra_angle])
107 linear_extrude(height= block_out)
108 projection() rotate([-90,0,0]) Torch();
113 module Bracket(){ ////toplevel
114 cid_w = stem_width * .75;
115 hole_near = hole_slot + hole_dia;
119 translate([-stem_width/2, 0, -stem_len])
120 cube([stem_width, stem_thick, stem_len]);
121 translate([0,0, -block_thick]) hull(){
122 translate([-stem_width/2, 0, -brace[2]])
123 cube([stem_width, stem_thick, 1]);
124 translate([-brace[0]/2, 0, 0])
125 cube([brace[0], brace[1], 1]);
128 ScrewHole(holes[0], 90);
129 ScrewHole(holes[1], 0);
130 translate([-cid_w/2, 0, above - holes[0] - hole_near])
132 scale([miniature, miniature, 1])
133 Commitid_BestCount([cid_w, holes[1]-holes[0] - hole_near*2]
138 translate([-block_width/2, 0, -block_thick])
139 cube([block_width, block_out, block_thick]);
144 module BracketPrint(){ ////toplevel
150 module TestTorchPrint(){ ////toplevel
153 translate([0,0, torch_lit_dia / 2 / sqrt(2)])
156 translate([-100, -torch_tot_len*2, 0])
157 cube([200, torch_tot_len*4, 200]);
161 module Demo(){ ////toplevel
163 translate([0, -torch_out, 0])
166 translate([0, -torch_out, above])
167 cylinder(r=torch_big_dia/2, h=1);