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 = 0; // this parameter adjusts rear too somehow?
25 cross_rail_distance = 232.09;
28 support_bridge_gap_z = 1.0;
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;
43 bolt_nut_around_y_extra = 3;
45 brk_bolt_eff_len = 11.78; // inside of recess, to end of bolt
46 brk_bolt_len_slop = 0.5;
47 brk_bolt_nut_th = 3.89;
48 brk_bolt_nut_across_flats = 7.86 + 0.50;
50 brk_overall_w = 90.07;
54 // "foreaftmaint" aka "fam" is the hook-like part that stops
55 // the adapter sliding forwards/backwards along the rails
56 foreaftmaint_r_slop = 0.0;
57 foreaftmaint_y_slop = -0.25;
58 foreaftmaint_top_block_zs = [34.0, 39.0]; // rearwards from bolt hole
60 main_sz_y = $strf * 12;
62 grasp_thin_sz = $strf * 0.5;
63 beside_strap_sz = $strf * 8;
64 main_sz_core_z = $strf * 12;
66 // "length" in for-aft direction of interaction with rack rail
67 min_on_rail_sz_z = $strf * 18;
69 // when printer produces support
70 support_around = 1.7; // how far does the support extend around (in XY)
71 support_remnant = 0.75; // how much frass remains attached (Z height)
78 bolt_z = -brk_block_z/2;
80 front_to_rear_elevation_change =
81 rear_elevation_nominal - front_elevation_nominal;
83 main_sz_rhs_z = max(min_on_rail_sz_z, beside_strap_sz*2 + strap_w);
84 main_sz_lhs_z = min_on_rail_sz_z;
86 main_sz_x_fam = main_sz_y;
88 brk_bottom_y = -brk_recess_actual;
89 adapt_main_top_y = brk_bottom_y - general_gap_y;
92 rack_rail_x = -(rack_width_inner/2 + rack_rail_dia/2);
93 rack_rail_outer_x = -(rack_width_inner/2 + rack_rail_dia);
95 grasp_large_r = (rack_rail_dia + grasp_sz)/2;
96 grasp_small_r = (rack_rail_dia + grasp_thin_sz)/2;
97 grasp_large_x = rack_rail_outer_x + grasp_large_r;
98 grasp_small_x = rack_rail_outer_x + grasp_small_r;
100 block_x = grasp_large_x + grasp_large_r;
101 block_y_min = adapt_main_top_y - main_sz_y;
103 strap_barrel_x = rack_width_inner/2 + strap_barrel_dia/2;
105 rack_shear_ratio = - front_to_rear_elevation_change / rear_to_front_distance;
107 front_to_cross_rail =
108 cross_rail_distance * sqrt(1 - rack_shear_ratio * rack_shear_ratio)
109 - rear_bolt_to_front_bolt
111 - sqrt( pow( cross_rail_distance * rack_shear_ratio, 2 )
112 - pow( front_to_rear_elevation_change, 2 ) )
115 brk_bolt_nut_top_y = -brk_nearbolt_recess_depth
116 - brk_bolt_eff_len + brk_bolt_nut_th + brk_bolt_len_slop;
118 brk_bolt_nut_r = brk_bolt_nut_across_flats/2 / cos(360/12);
120 function elevation_of_bolt_for(z) = rear_elevation_nominal
121 + front_elevation_nominal
122 + (z - brk_block_z/2) * rack_shear_ratio;
124 function rack_rail_y_of_elevation(elevation_nominal) =
125 brk_bottom_y - elevation_nominal - general_gap_y - rack_rail_dia/2;
127 echo(rack_shear_ratio);
129 module GraspElevation(){
131 translate([ grasp_large_x, adapt_main_top_y - grasp_large_r ])
132 circle(grasp_large_r);
134 translate([ grasp_small_x, $rack_rail_y - rack_rail_dia/2 ])
135 circle(grasp_small_r);
137 translate([ rack_rail_x + grasp_large_r/2,
138 $rack_rail_y - rack_rail_dia/2 ])
139 circle(grasp_small_r);
141 translate([ grasp_large_x, $rack_rail_y + rack_rail_dia/2 ])
142 circle(grasp_large_r);
144 translate([ grasp_large_x + grasp_large_r/2,
145 $rack_rail_y + rack_rail_dia/2 ])
146 circle(grasp_large_r);
150 module BlockElevation(){
152 rectfromto([ +block_x, adapt_main_top_y ],
153 [ -block_x, block_y_min ]);
154 rectfromto([ -grasp_large_x, adapt_main_top_y ],
155 [ +grasp_large_x, adapt_main_top_y - 0.1 ]);
158 rectfromto([ +block_x, adapt_main_top_y ],
159 [ -block_x, block_y_min ]);
160 rectfromto([ grasp_large_x, block_y_min ],
161 [ 0, block_y_min + 0.1 ]);
165 module MainExtrude(z){
170 s = rack_shear_ratio * $reverse_sign;
171 multmatrix([ [ 1, 0, 0, 0 ],
178 module GraspFixingElevation(){
185 translate([ -block_x, block_y_min ] + [0,0.1]*1 )
188 translate([ strap_barrel_x, $strap_barrel_y ])
189 circle(strap_barrel_dia/2 + strap_guide_sz);
192 rectfromto([0, $rack_rail_y],
193 [rack_width_inner, 50]);
195 translate([ rack_rail_x, $rack_rail_y ])
196 circle(r = rack_width_inner/2 - rack_rail_x);
197 polygon([ [ -block_x-0.1, 0 ],
198 [ rack_width_inner/2, 0 ],
199 $rail_fixing_fit_corner,
200 $rail_fixing_fit_corner + [-1,-1] * fit_slope_len,
201 [ -grasp_large_x - grasp_large_r*2, block_y_min ],
202 [ -block_x-0.1 -2, block_y_min +2 ]]);
208 module StrapBarrelElevation(){
209 translate([ strap_barrel_x, $strap_barrel_y ])
210 circle(strap_barrel_dia/2);
213 // Bracket support block, goes up inside bracket
214 // Z origin is bolt hole
217 linextr( -brk_block_z/2,
219 rectfromto([ -brk_block_xw/2, adapt_main_top_y - 0.1 ],
220 [ +brk_block_xw/2, 0 ]);
222 linextr_y_xz( -50, 10 ) {
223 translate([ 0, brk_block_z + bolt_z ])
225 [ main_sz_x_fam + support_around*2,
226 support_remnant *2 ]);
231 // Z origin is bolt hole
233 linextr_y_xz( -100, 10 )
234 circle(brk_bolt_dia/2);
236 linextr_y_xz( -brk_nearbolt_recess_depth, 10)
237 circle(brk_nearbolt_recess_dia/2);
239 linextr_y_xz( -100, brk_bolt_nut_top_y ) {
241 for (dz = [0, support_bridge_gap_z])
243 circle( r= brk_bolt_nut_r, $fn = 6 );
248 if ($foreaftmaint_dz) {
255 linextr_x_yz(-main_sz_x_fam/2, +main_sz_x_fam/2)
260 module FamGraspElevation(){
263 ybot = $rack_rail_y - rack_rail_dia/2 + grasp_large_r
264 - fit_slope_len * 0.5;
267 adapt_main_top_y - grasp_large_r
269 for (dx= [/*-1,*/ +1] * rack_rail_dia/2)
270 translate([ -$foreaftmaint_rail_z + dx, y ])
271 circle(r= grasp_large_r);
273 if ($foreaftmaint_cutoff) {
274 translate([ -$foreaftmaint_rail_z, 0 ])
275 rectfromto([-100, -100],
281 module FamStemElevation(){
283 rectfromto([ -$foreaftmaint_rail_z
284 , adapt_main_top_y ],
287 -$foreaftmaint_rail_z,
289 rack_shear_ratio * $foreaftmaint_rail_z * $reverse_sign,
291 square([0.1, rack_rail_dia * 0.5], center=true);
297 $rack_rail_y = rack_rail_y_of_elevation($elevation_nominal);
299 $strap_barrel_y = $rack_rail_y + rack_rail_dia/2 + strap_barrel_dia/2;
301 $rail_fixing_fit_corner = [
303 $rack_rail_y - rack_rail_dia/2
306 $foreaftmaint_rail_z = brk_block_z/2 + $foreaftmaint_dz - foreaftmaint_y_slop;
308 translate([0,0,brk_block_z/2])
309 mirror([0,0, $reverse_sign > 0 ? 0 : 1])
310 translate([0,0,-brk_block_z/2])
313 MainExtrude(main_sz_lhs_z){
316 RackShear() MainExtrude(main_sz_rhs_z){
317 StrapBarrelElevation();
319 translate([ 0,0, brk_block_z/2]) {
325 MainExtrude(main_sz_core_z){
329 MainExtrude(max(brk_block_z, main_sz_rhs_z)){
330 rectfromto([-8, adapt_main_top_y + 0.1],
332 rectfromto([-block_x -5, adapt_main_top_y],
333 [-grasp_large_x, block_y_min]);
336 RackShear() MainExtrude(main_sz_rhs_z){
337 GraspFixingElevation();
341 translate([0,0, main_sz_rhs_z/2]) linextr(-strap_w/2, +strap_w/2) {
342 translate([ rack_width_inner/2 - strap_th, 0 ])
343 rectfromto([ 0, -50 ], [ 50, 50 ]);
348 if ($foreaftmaint_top_block) {
349 rectfromto([ -foreaftmaint_top_block_zs[0] + bolt_z, 0 ],
350 [ -foreaftmaint_top_block_zs[1] + bolt_z, block_y_min] );
363 adapt_main_top_y - 50,
364 $foreaftmaint_rail_z ])
365 cube(center=true, 100);
368 linextr_y_xz( block_y_min - bolt_nut_around_y_extra , adapt_main_top_y )
370 translate([ 0, brk_block_z/2 ])
371 circle(r = bolt_nut_around + brk_bolt_nut_r );
372 rectfromto([-100, 0], [+100,+100]);
376 RackShear() linextr(-10, main_sz_lhs_z+main_sz_rhs_z) {
379 translate([ rack_rail_x, $rack_rail_y ]){
381 for (dx = [-rack_rail_dia, 0])
383 circle(r= rack_rail_dia/2);
391 // Distance from bolt hole, in backwards direction
392 cr = rack_rail_dia/2 + foreaftmaint_r_slop;
393 translate([ 0, $rack_rail_y, $foreaftmaint_rail_z ])
394 linextr_x_yz(+rack_rail_x,
403 for (dd=[[0,0], [-1,-1], [-1,+1]]) {
405 [-1, 0] * (rack_rail_dia - fit_slope_len)
414 translate([ 0,0, brk_block_z/2]) BoltHole();
418 module ForRackForDemo(){
419 elevation = elevation_of_bolt_for(rear_to_cross_rail);
420 rack_rail_y = rack_rail_y_of_elevation(elevation);
423 front_to_rear_elevation_change /
426 translate([0, rack_rail_y, brk_block_z/2 + rack_rail_y*rack_shear_ratio])
430 module RackForDemoRails(){
432 for (m=[0]) mirror([m,0,0]) {
433 linextr(-(50 + cross_rail_distance), 50 + rear_to_cross_rail)
434 translate([rack_rail_x, 0])
435 circle(r= rack_rail_dia/2);
440 module RackForDemoCrosses(){
444 rear_to_cross_rail - cross_rail_distance,
447 linextr_x_yz(rack_rail_x, -rack_rail_x)
448 circle(r= rack_rail_dia/2, $fn=8);
453 module Front(){ ////toplevel
455 Principal($reverse_sign = -1,
456 $foreaftmaint_top_block = false,
457 $foreaftmaint_cutoff = true,
459 elevation_of_bolt_for(rear_to_cross_rail + rear_bolt_to_front_bolt),
460 $foreaftmaint_dz= front_to_cross_rail);
463 module Rear(){ ////toplevel
464 Principal($reverse_sign = +1,
465 $foreaftmaint_top_block = true,
466 $foreaftmaint_cutoff = false,
468 elevation_of_bolt_for(rear_to_cross_rail),
469 $foreaftmaint_dz= rear_to_cross_rail);
477 translate([ 0, -2, -4 ])
478 square(center=true, [ brk_overall_w, 1 ]);
481 translate([ 0, -brk_nearbolt_recess_depth, -4 ])
482 linextr_y_xz(-brk_bolt_eff_len, 0)
483 circle(r = brk_bolt_dia/2);
488 module FrontDemo(){ ////toplevel
489 SomeDemo() rotate([180,0,0]) Front();
491 module RearDemo(){ ////toplevel
494 module RearRackDemo(){ ////toplevel
495 rotate([atan(rack_shear_ratio),0,0]) SomeDemo() {
497 translate([0, 0, -rear_bolt_to_front_bolt])
498 rotate([180,0,0]) Front();
500 color("blue") RackForDemoCrosses();