3 // brk_*: "bracket", the Topeak MTX bracket
4 // rack_*: the Tortec rack
5 // adapt_*: the adapter, ie this file
9 // strength factor, set to 1 for real prints
13 brk_recess_actual = 5.20;
15 rack_rail_dia = 10.40 + 0.30;
16 rack_width_inner = 115.86 - 1.0; // between insides of rails
18 rear_elevation_nominal = 10.04;
19 // ^ top of rack to bottom of bracket, at rack cross rail (fam)
20 rear_to_front_distance = 230; // rack cross rail (fam) to very front end
21 rear_to_cross_rail = 43.05; // bolt centre to rail centre, rail to rear
22 rear_bolt_to_front_bolt = 155.4;
23 front_to_cross_rail = 43.05; // XXX // bolt centre to rail centre, rail to front
24 front_elevation_nominal = 3;
26 cross_rail_distance = 232.09;
32 strap_barrel_dia = 14;
36 brk_block_z = 14.55 - 0.00;
38 brk_bolt_dia = 5.0 + 0.5;
39 brk_nearbolt_recess_dia = 8.86 + 1.5;
40 brk_nearbolt_recess_depth = 1.09 + 0.25;
42 brk_bolt_eff_len = 11.78; // inside of recess, to end of bolt
43 brk_bolt_len_slop = 0.5;
44 brk_bolt_nut_th = 3.89;
45 brk_bolt_nut_across_flats = 7.86 + 0.50;
47 brk_overall_w = 90.07;
51 // "foreaftmaint" aka "fam" is the hook-like part that stops
52 // the adapter sliding forwards/backwards along the rails
53 foreaftmaint_r_slop = 0.0;
54 foreaftmaint_y_slop = -0.25;
55 foreaftmaint_top_block_zs = [34.0, 39.0]; // rearwards from bolt hole
57 main_sz_y = $strf * 12;
59 grasp_thin_sz = $strf * 0.5;
60 beside_strap_sz = $strf * 8;
61 main_sz_core_z = $strf * 12;
63 // "length" in for-aft direction of interaction with rack rail
64 min_on_rail_sz_z = $strf * 18;
66 // when printer produces support
67 support_around = 1.7; // how far does the support extend around (in XY)
68 support_remnant = 0.75; // how much frass remains attached (Z height)
75 bolt_z = -brk_block_z/2;
77 main_sz_rhs_z = max(min_on_rail_sz_z, beside_strap_sz*2 + strap_w);
78 main_sz_lhs_z = min_on_rail_sz_z;
80 main_sz_x_fam = main_sz_y;
82 brk_bottom_y = -brk_recess_actual;
83 adapt_main_top_y = brk_bottom_y - general_gap_y;
86 rack_rail_x = -(rack_width_inner/2 + rack_rail_dia/2);
87 rack_rail_outer_x = -(rack_width_inner/2 + rack_rail_dia);
89 grasp_large_r = (rack_rail_dia + grasp_sz)/2;
90 grasp_small_r = (rack_rail_dia + grasp_thin_sz)/2;
91 grasp_large_x = rack_rail_outer_x + grasp_large_r;
92 grasp_small_x = rack_rail_outer_x + grasp_small_r;
94 block_x = grasp_large_x + grasp_large_r;
95 block_y_min = adapt_main_top_y - main_sz_y;
97 strap_barrel_x = rack_width_inner/2 + strap_barrel_dia/2;
99 rack_shear_ratio = -rear_elevation_nominal / rear_to_front_distance;
101 brk_bolt_nut_top_y = -brk_nearbolt_recess_depth
102 - brk_bolt_eff_len + brk_bolt_nut_th + brk_bolt_len_slop;
104 brk_bolt_nut_r = brk_bolt_nut_across_flats/2 / cos(360/12);
106 function elevation_of_bolt_for(z) = rear_elevation_nominal
107 + front_elevation_nominal
108 + (z - brk_block_z/2) * rack_shear_ratio;
110 function rack_rail_y_of_elevation(elevation_nominal) =
111 brk_bottom_y - elevation_nominal - general_gap_y - rack_rail_dia/2;
113 echo(rack_shear_ratio);
115 module GraspElevation(){
117 translate([ grasp_large_x, adapt_main_top_y - grasp_large_r ])
118 circle(grasp_large_r);
120 translate([ grasp_small_x, $rack_rail_y - rack_rail_dia/2 ])
121 circle(grasp_small_r);
123 translate([ rack_rail_x + grasp_large_r/2,
124 $rack_rail_y - rack_rail_dia/2 ])
125 circle(grasp_small_r);
127 translate([ grasp_large_x, $rack_rail_y + rack_rail_dia/2 ])
128 circle(grasp_large_r);
130 translate([ grasp_large_x + grasp_large_r/2,
131 $rack_rail_y + rack_rail_dia/2 ])
132 circle(grasp_large_r);
136 module BlockElevation(){
138 rectfromto([ +block_x, adapt_main_top_y ],
139 [ -block_x, block_y_min ]);
140 rectfromto([ -grasp_large_x, adapt_main_top_y ],
141 [ +grasp_large_x, adapt_main_top_y - 0.1 ]);
144 rectfromto([ +block_x, adapt_main_top_y ],
145 [ -block_x, block_y_min ]);
146 rectfromto([ grasp_large_x, block_y_min ],
147 [ 0, block_y_min + 0.1 ]);
151 module MainExtrude(z){
156 s = rack_shear_ratio * $reverse_sign;
157 multmatrix([ [ 1, 0, 0, 0 ],
164 module GraspFixingElevation(){
171 translate([ -block_x, block_y_min ] + [0,0.1]*1 )
174 translate([ strap_barrel_x, $strap_barrel_y ])
175 circle(strap_barrel_dia/2 + strap_guide_sz);
178 rectfromto([0, $rack_rail_y],
179 [rack_width_inner, 50]);
181 translate([ rack_rail_x, $rack_rail_y ])
182 circle(r = rack_width_inner/2 - rack_rail_x);
183 polygon([ [ -block_x-0.1, 0 ],
184 [ rack_width_inner/2, 0 ],
185 $rail_fixing_fit_corner,
186 $rail_fixing_fit_corner + [-1,-1] * fit_slope_len,
187 [ -grasp_large_x - grasp_large_r*2, block_y_min ],
188 [ -block_x-0.1 -2, block_y_min +2 ]]);
194 module StrapBarrelElevation(){
195 translate([ strap_barrel_x, $strap_barrel_y ])
196 circle(strap_barrel_dia/2);
199 // Bracket support block, goes up inside bracket
200 // Z origin is bolt hole
203 linextr( -brk_block_z/2,
205 rectfromto([ -brk_block_xw/2, adapt_main_top_y - 0.1 ],
206 [ +brk_block_xw/2, 0 ]);
208 linextr_y_xz( -50, 10 ) {
209 translate([ 0, brk_block_z + bolt_z ])
211 [ main_sz_x_fam + support_around*2,
212 support_remnant *2 ]);
217 // Z origin is bolt hole
219 linextr_y_xz( -100, 10 )
220 circle(brk_bolt_dia/2);
222 linextr_y_xz( -brk_nearbolt_recess_depth, 10)
223 circle(brk_nearbolt_recess_dia/2);
225 linextr_y_xz( -100, brk_bolt_nut_top_y ) {
226 circle( r= brk_bolt_nut_r, $fn = 6 );
227 translate([ 0, brk_bolt_nut_across_flats/2 ])
228 circle( r=brk_bolt_nut_r/2, $fn = 4);
233 if ($foreaftmaint_dz) {
240 linextr_x_yz(-main_sz_x_fam/2, +main_sz_x_fam/2)
245 module FamGraspElevation(){
247 ybot = $rack_rail_y - rack_rail_dia/2 + grasp_large_r
248 - fit_slope_len * 0.5;
251 adapt_main_top_y - grasp_large_r
253 for (dx= [/*-1,*/ +1] * rack_rail_dia/2)
254 translate([ -$foreaftmaint_rail_z + dx, y ])
255 circle(r= grasp_large_r);
259 module FamStemElevation(){
261 rectfromto([ -$foreaftmaint_rail_z, adapt_main_top_y ],
264 -$foreaftmaint_rail_z,
266 rack_shear_ratio * $foreaftmaint_rail_z * $reverse_sign,
268 square([0.1, rack_rail_dia * 0.5], center=true);
274 $rack_rail_y = rack_rail_y_of_elevation($elevation_nominal);
276 $strap_barrel_y = $rack_rail_y + rack_rail_dia/2 + strap_barrel_dia/2;
278 $rail_fixing_fit_corner = [
280 $rack_rail_y - rack_rail_dia/2
283 $foreaftmaint_rail_z = brk_block_z/2 + $foreaftmaint_dz - foreaftmaint_y_slop;
285 translate([0,0,brk_block_z/2])
286 mirror([0,0, $reverse_sign > 0 ? 0 : 1])
287 translate([0,0,-brk_block_z/2])
290 MainExtrude(main_sz_lhs_z){
293 RackShear() MainExtrude(main_sz_rhs_z){
294 StrapBarrelElevation();
296 translate([ 0,0, brk_block_z/2]) {
302 MainExtrude(main_sz_core_z){
306 MainExtrude(max(brk_block_z, main_sz_rhs_z)){
307 rectfromto([-8, adapt_main_top_y + 0.1],
309 rectfromto([-block_x -5, adapt_main_top_y],
310 [-grasp_large_x, block_y_min]);
313 RackShear() MainExtrude(main_sz_rhs_z){
314 GraspFixingElevation();
318 translate([0,0, main_sz_rhs_z/2]) linextr(-strap_w/2, +strap_w/2) {
319 translate([ rack_width_inner/2 - strap_th, 0 ])
320 rectfromto([ 0, -50 ], [ 50, 50 ]);
325 rectfromto([ -foreaftmaint_top_block_zs[0] + bolt_z, 0 ],
326 [ -foreaftmaint_top_block_zs[1] + bolt_z, block_y_min] );
338 adapt_main_top_y - 50,
339 $foreaftmaint_rail_z ])
340 cube(center=true, 100);
344 RackShear() linextr(-10, main_sz_lhs_z+main_sz_rhs_z) {
347 translate([ rack_rail_x, $rack_rail_y ]){
349 for (dx = [-rack_rail_dia, 0])
351 circle(r= rack_rail_dia/2);
359 // Distance from bolt hole, in backwards direction
360 cr = rack_rail_dia/2 + foreaftmaint_r_slop;
361 translate([ 0, $rack_rail_y, $foreaftmaint_rail_z ])
362 linextr_x_yz(+rack_rail_x,
371 for (dd=[[0,0], [-1,-1], [-1,+1]]) {
373 [-1, 0] * (rack_rail_dia - fit_slope_len)
382 translate([ 0,0, brk_block_z/2]) BoltHole();
386 module RackForDemo(){ ////toplevel
387 elevation = elevation_of_bolt_for(rear_to_cross_rail);
388 rack_rail_y = rack_rail_y_of_elevation(elevation);
390 rotate([-atan(rack_shear_ratio), 0,0])
391 translate([0, rack_rail_y, brk_block_z/2 + rack_rail_y*rack_shear_ratio]) {
392 for (m=[0]) mirror([m,0,0]) {
393 linextr(-(50 + cross_rail_distance), 50 + rear_to_cross_rail)
394 translate([rack_rail_x, 0])
395 circle(r= rack_rail_dia/2);
398 translate([0,0, rear_to_cross_rail])
399 linextr_x_yz(rack_rail_x, -rack_rail_x)
400 circle(r= rack_rail_dia/2);
402 translate([0,0, rear_to_cross_rail - cross_rail_distance])
403 linextr_x_yz(rack_rail_x, -rack_rail_x)
404 circle(r= rack_rail_dia/2);
408 module Front(){ ////toplevel
409 // xxx elevation is wrong
410 Principal($reverse_sign = -1,
412 elevation_of_bolt_for(rear_to_cross_rail + rear_bolt_to_front_bolt),
413 $foreaftmaint_dz= front_to_cross_rail);
416 module Rear(){ ////toplevel
417 Principal($reverse_sign = +1,
419 elevation_of_bolt_for(rear_to_cross_rail),
420 $foreaftmaint_dz= rear_to_cross_rail);
428 translate([ 0, -2, -4 ])
429 square(center=true, [ brk_overall_w, 1 ]);
432 translate([ 0, -brk_nearbolt_recess_depth, -4 ])
433 linextr_y_xz(-brk_bolt_eff_len, 0)
434 circle(r = brk_bolt_dia/2);
439 module FrontDemo(){ ////toplevel
442 module RearDemo(){ ////toplevel
445 module RearRackDemo(){ ////toplevel
446 rotate([atan(rack_shear_ratio),0,0]) SomeDemo() {
448 translate([0, 0, -rear_bolt_to_front_bolt])