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_elevation_nominal = 3;
25 cross_rail_distance = 232.09;
31 strap_barrel_dia = 14;
35 brk_block_z = 14.55 - 0.00;
37 brk_bolt_dia = 5.0 + 0.5;
38 brk_nearbolt_recess_dia = 8.86 + 1.5;
39 brk_nearbolt_recess_depth = 1.09 + 0.25;
41 brk_bolt_eff_len = 11.78; // inside of recess, to end of bolt
42 brk_bolt_len_slop = 0.5;
43 brk_bolt_nut_th = 3.89;
44 brk_bolt_nut_across_flats = 7.86 + 0.50;
46 brk_overall_w = 90.07;
50 // "foreaftmaint" aka "fam" is the hook-like part that stops
51 // the adapter sliding forwards/backwards along the rails
52 foreaftmaint_r_slop = 0.0;
53 foreaftmaint_y_slop = -0.25;
54 foreaftmaint_top_block_zs = [34.0, 39.0]; // rearwards from bolt hole
56 main_sz_y = $strf * 12;
58 grasp_thin_sz = $strf * 0.5;
59 beside_strap_sz = $strf * 8;
60 main_sz_core_z = $strf * 12;
62 // "length" in for-aft direction of interaction with rack rail
63 min_on_rail_sz_z = $strf * 18;
65 // when printer produces support
66 support_around = 1.7; // how far does the support extend around (in XY)
67 support_remnant = 0.75; // how much frass remains attached (Z height)
74 bolt_z = -brk_block_z/2;
76 front_to_rear_elevation_change =
77 rear_elevation_nominal - front_elevation_nominal;
79 main_sz_rhs_z = max(min_on_rail_sz_z, beside_strap_sz*2 + strap_w);
80 main_sz_lhs_z = min_on_rail_sz_z;
82 main_sz_x_fam = main_sz_y;
84 brk_bottom_y = -brk_recess_actual;
85 adapt_main_top_y = brk_bottom_y - general_gap_y;
88 rack_rail_x = -(rack_width_inner/2 + rack_rail_dia/2);
89 rack_rail_outer_x = -(rack_width_inner/2 + rack_rail_dia);
91 grasp_large_r = (rack_rail_dia + grasp_sz)/2;
92 grasp_small_r = (rack_rail_dia + grasp_thin_sz)/2;
93 grasp_large_x = rack_rail_outer_x + grasp_large_r;
94 grasp_small_x = rack_rail_outer_x + grasp_small_r;
96 block_x = grasp_large_x + grasp_large_r;
97 block_y_min = adapt_main_top_y - main_sz_y;
99 strap_barrel_x = rack_width_inner/2 + strap_barrel_dia/2;
101 rack_shear_ratio = - front_to_rear_elevation_change / rear_to_front_distance;
103 front_to_cross_rail =
104 cross_rail_distance * sqrt(1 - rack_shear_ratio * rack_shear_ratio)
105 - rear_bolt_to_front_bolt
107 - sqrt( pow( cross_rail_distance * rack_shear_ratio, 2 )
108 - pow( front_to_rear_elevation_change, 2 ) )
111 brk_bolt_nut_top_y = -brk_nearbolt_recess_depth
112 - brk_bolt_eff_len + brk_bolt_nut_th + brk_bolt_len_slop;
114 brk_bolt_nut_r = brk_bolt_nut_across_flats/2 / cos(360/12);
116 function elevation_of_bolt_for(z) = rear_elevation_nominal
117 + front_elevation_nominal
118 + (z - brk_block_z/2) * rack_shear_ratio;
120 function rack_rail_y_of_elevation(elevation_nominal) =
121 brk_bottom_y - elevation_nominal - general_gap_y - rack_rail_dia/2;
123 echo(rack_shear_ratio);
125 module GraspElevation(){
127 translate([ grasp_large_x, adapt_main_top_y - grasp_large_r ])
128 circle(grasp_large_r);
130 translate([ grasp_small_x, $rack_rail_y - rack_rail_dia/2 ])
131 circle(grasp_small_r);
133 translate([ rack_rail_x + grasp_large_r/2,
134 $rack_rail_y - rack_rail_dia/2 ])
135 circle(grasp_small_r);
137 translate([ grasp_large_x, $rack_rail_y + rack_rail_dia/2 ])
138 circle(grasp_large_r);
140 translate([ grasp_large_x + grasp_large_r/2,
141 $rack_rail_y + rack_rail_dia/2 ])
142 circle(grasp_large_r);
146 module BlockElevation(){
148 rectfromto([ +block_x, adapt_main_top_y ],
149 [ -block_x, block_y_min ]);
150 rectfromto([ -grasp_large_x, adapt_main_top_y ],
151 [ +grasp_large_x, adapt_main_top_y - 0.1 ]);
154 rectfromto([ +block_x, adapt_main_top_y ],
155 [ -block_x, block_y_min ]);
156 rectfromto([ grasp_large_x, block_y_min ],
157 [ 0, block_y_min + 0.1 ]);
161 module MainExtrude(z){
166 s = rack_shear_ratio * $reverse_sign;
167 multmatrix([ [ 1, 0, 0, 0 ],
174 module GraspFixingElevation(){
181 translate([ -block_x, block_y_min ] + [0,0.1]*1 )
184 translate([ strap_barrel_x, $strap_barrel_y ])
185 circle(strap_barrel_dia/2 + strap_guide_sz);
188 rectfromto([0, $rack_rail_y],
189 [rack_width_inner, 50]);
191 translate([ rack_rail_x, $rack_rail_y ])
192 circle(r = rack_width_inner/2 - rack_rail_x);
193 polygon([ [ -block_x-0.1, 0 ],
194 [ rack_width_inner/2, 0 ],
195 $rail_fixing_fit_corner,
196 $rail_fixing_fit_corner + [-1,-1] * fit_slope_len,
197 [ -grasp_large_x - grasp_large_r*2, block_y_min ],
198 [ -block_x-0.1 -2, block_y_min +2 ]]);
204 module StrapBarrelElevation(){
205 translate([ strap_barrel_x, $strap_barrel_y ])
206 circle(strap_barrel_dia/2);
209 // Bracket support block, goes up inside bracket
210 // Z origin is bolt hole
213 linextr( -brk_block_z/2,
215 rectfromto([ -brk_block_xw/2, adapt_main_top_y - 0.1 ],
216 [ +brk_block_xw/2, 0 ]);
218 linextr_y_xz( -50, 10 ) {
219 translate([ 0, brk_block_z + bolt_z ])
221 [ main_sz_x_fam + support_around*2,
222 support_remnant *2 ]);
227 // Z origin is bolt hole
229 linextr_y_xz( -100, 10 )
230 circle(brk_bolt_dia/2);
232 linextr_y_xz( -brk_nearbolt_recess_depth, 10)
233 circle(brk_nearbolt_recess_dia/2);
235 linextr_y_xz( -100, brk_bolt_nut_top_y ) {
236 circle( r= brk_bolt_nut_r, $fn = 6 );
237 translate([ 0, brk_bolt_nut_across_flats/2 ])
238 circle( r=brk_bolt_nut_r/2, $fn = 4);
243 if ($foreaftmaint_dz) {
250 linextr_x_yz(-main_sz_x_fam/2, +main_sz_x_fam/2)
255 module FamGraspElevation(){
257 ybot = $rack_rail_y - rack_rail_dia/2 + grasp_large_r
258 - fit_slope_len * 0.5;
261 adapt_main_top_y - grasp_large_r
263 for (dx= [/*-1,*/ +1] * rack_rail_dia/2)
264 translate([ -$foreaftmaint_rail_z + dx, y ])
265 circle(r= grasp_large_r);
269 module FamStemElevation(){
271 rectfromto([ -$foreaftmaint_rail_z, adapt_main_top_y ],
274 -$foreaftmaint_rail_z,
276 rack_shear_ratio * $foreaftmaint_rail_z * $reverse_sign,
278 square([0.1, rack_rail_dia * 0.5], center=true);
284 $rack_rail_y = rack_rail_y_of_elevation($elevation_nominal);
286 $strap_barrel_y = $rack_rail_y + rack_rail_dia/2 + strap_barrel_dia/2;
288 $rail_fixing_fit_corner = [
290 $rack_rail_y - rack_rail_dia/2
293 $foreaftmaint_rail_z = brk_block_z/2 + $foreaftmaint_dz - foreaftmaint_y_slop;
295 translate([0,0,brk_block_z/2])
296 mirror([0,0, $reverse_sign > 0 ? 0 : 1])
297 translate([0,0,-brk_block_z/2])
300 MainExtrude(main_sz_lhs_z){
303 RackShear() MainExtrude(main_sz_rhs_z){
304 StrapBarrelElevation();
306 translate([ 0,0, brk_block_z/2]) {
312 MainExtrude(main_sz_core_z){
316 MainExtrude(max(brk_block_z, main_sz_rhs_z)){
317 rectfromto([-8, adapt_main_top_y + 0.1],
319 rectfromto([-block_x -5, adapt_main_top_y],
320 [-grasp_large_x, block_y_min]);
323 RackShear() MainExtrude(main_sz_rhs_z){
324 GraspFixingElevation();
328 translate([0,0, main_sz_rhs_z/2]) linextr(-strap_w/2, +strap_w/2) {
329 translate([ rack_width_inner/2 - strap_th, 0 ])
330 rectfromto([ 0, -50 ], [ 50, 50 ]);
335 if ($foreaftmaint_top_block) {
336 rectfromto([ -foreaftmaint_top_block_zs[0] + bolt_z, 0 ],
337 [ -foreaftmaint_top_block_zs[1] + bolt_z, block_y_min] );
350 adapt_main_top_y - 50,
351 $foreaftmaint_rail_z ])
352 cube(center=true, 100);
356 RackShear() linextr(-10, main_sz_lhs_z+main_sz_rhs_z) {
359 translate([ rack_rail_x, $rack_rail_y ]){
361 for (dx = [-rack_rail_dia, 0])
363 circle(r= rack_rail_dia/2);
371 // Distance from bolt hole, in backwards direction
372 cr = rack_rail_dia/2 + foreaftmaint_r_slop;
373 translate([ 0, $rack_rail_y, $foreaftmaint_rail_z ])
374 linextr_x_yz(+rack_rail_x,
383 for (dd=[[0,0], [-1,-1], [-1,+1]]) {
385 [-1, 0] * (rack_rail_dia - fit_slope_len)
394 translate([ 0,0, brk_block_z/2]) BoltHole();
398 module ForRackForDemo(){
399 elevation = elevation_of_bolt_for(rear_to_cross_rail);
400 rack_rail_y = rack_rail_y_of_elevation(elevation);
403 front_to_rear_elevation_change /
406 translate([0, rack_rail_y, brk_block_z/2 + rack_rail_y*rack_shear_ratio])
410 module RackForDemoRails(){
412 for (m=[0]) mirror([m,0,0]) {
413 linextr(-(50 + cross_rail_distance), 50 + rear_to_cross_rail)
414 translate([rack_rail_x, 0])
415 circle(r= rack_rail_dia/2);
420 module RackForDemoCrosses(){
424 rear_to_cross_rail - cross_rail_distance,
427 linextr_x_yz(rack_rail_x, -rack_rail_x)
428 circle(r= rack_rail_dia/2, $fn=8);
433 module Front(){ ////toplevel
434 // xxx elevation is wrong
435 Principal($reverse_sign = -1,
436 $foreaftmaint_top_block = false,
438 elevation_of_bolt_for(rear_to_cross_rail + rear_bolt_to_front_bolt),
439 $foreaftmaint_dz= front_to_cross_rail);
442 module Rear(){ ////toplevel
443 Principal($reverse_sign = +1,
444 $foreaftmaint_top_block = true,
446 elevation_of_bolt_for(rear_to_cross_rail),
447 $foreaftmaint_dz= rear_to_cross_rail);
455 translate([ 0, -2, -4 ])
456 square(center=true, [ brk_overall_w, 1 ]);
459 translate([ 0, -brk_nearbolt_recess_depth, -4 ])
460 linextr_y_xz(-brk_bolt_eff_len, 0)
461 circle(r = brk_bolt_dia/2);
466 module FrontDemo(){ ////toplevel
469 module RearDemo(){ ////toplevel
472 module RearRackDemo(){ ////toplevel
473 rotate([atan(rack_shear_ratio),0,0]) SomeDemo() {
475 translate([0, 0, -rear_bolt_to_front_bolt])
478 color("blue") RackForDemoCrosses();