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
106 - rear_to_cross_rail;
108 brk_bolt_nut_top_y = -brk_nearbolt_recess_depth
109 - brk_bolt_eff_len + brk_bolt_nut_th + brk_bolt_len_slop;
111 brk_bolt_nut_r = brk_bolt_nut_across_flats/2 / cos(360/12);
113 function elevation_of_bolt_for(z) = rear_elevation_nominal
114 + front_elevation_nominal
115 + (z - brk_block_z/2) * rack_shear_ratio;
117 function rack_rail_y_of_elevation(elevation_nominal) =
118 brk_bottom_y - elevation_nominal - general_gap_y - rack_rail_dia/2;
120 echo(rack_shear_ratio);
122 module GraspElevation(){
124 translate([ grasp_large_x, adapt_main_top_y - grasp_large_r ])
125 circle(grasp_large_r);
127 translate([ grasp_small_x, $rack_rail_y - rack_rail_dia/2 ])
128 circle(grasp_small_r);
130 translate([ rack_rail_x + grasp_large_r/2,
131 $rack_rail_y - rack_rail_dia/2 ])
132 circle(grasp_small_r);
134 translate([ grasp_large_x, $rack_rail_y + rack_rail_dia/2 ])
135 circle(grasp_large_r);
137 translate([ grasp_large_x + grasp_large_r/2,
138 $rack_rail_y + rack_rail_dia/2 ])
139 circle(grasp_large_r);
143 module BlockElevation(){
145 rectfromto([ +block_x, adapt_main_top_y ],
146 [ -block_x, block_y_min ]);
147 rectfromto([ -grasp_large_x, adapt_main_top_y ],
148 [ +grasp_large_x, adapt_main_top_y - 0.1 ]);
151 rectfromto([ +block_x, adapt_main_top_y ],
152 [ -block_x, block_y_min ]);
153 rectfromto([ grasp_large_x, block_y_min ],
154 [ 0, block_y_min + 0.1 ]);
158 module MainExtrude(z){
163 s = rack_shear_ratio * $reverse_sign;
164 multmatrix([ [ 1, 0, 0, 0 ],
171 module GraspFixingElevation(){
178 translate([ -block_x, block_y_min ] + [0,0.1]*1 )
181 translate([ strap_barrel_x, $strap_barrel_y ])
182 circle(strap_barrel_dia/2 + strap_guide_sz);
185 rectfromto([0, $rack_rail_y],
186 [rack_width_inner, 50]);
188 translate([ rack_rail_x, $rack_rail_y ])
189 circle(r = rack_width_inner/2 - rack_rail_x);
190 polygon([ [ -block_x-0.1, 0 ],
191 [ rack_width_inner/2, 0 ],
192 $rail_fixing_fit_corner,
193 $rail_fixing_fit_corner + [-1,-1] * fit_slope_len,
194 [ -grasp_large_x - grasp_large_r*2, block_y_min ],
195 [ -block_x-0.1 -2, block_y_min +2 ]]);
201 module StrapBarrelElevation(){
202 translate([ strap_barrel_x, $strap_barrel_y ])
203 circle(strap_barrel_dia/2);
206 // Bracket support block, goes up inside bracket
207 // Z origin is bolt hole
210 linextr( -brk_block_z/2,
212 rectfromto([ -brk_block_xw/2, adapt_main_top_y - 0.1 ],
213 [ +brk_block_xw/2, 0 ]);
215 linextr_y_xz( -50, 10 ) {
216 translate([ 0, brk_block_z + bolt_z ])
218 [ main_sz_x_fam + support_around*2,
219 support_remnant *2 ]);
224 // Z origin is bolt hole
226 linextr_y_xz( -100, 10 )
227 circle(brk_bolt_dia/2);
229 linextr_y_xz( -brk_nearbolt_recess_depth, 10)
230 circle(brk_nearbolt_recess_dia/2);
232 linextr_y_xz( -100, brk_bolt_nut_top_y ) {
233 circle( r= brk_bolt_nut_r, $fn = 6 );
234 translate([ 0, brk_bolt_nut_across_flats/2 ])
235 circle( r=brk_bolt_nut_r/2, $fn = 4);
240 if ($foreaftmaint_dz) {
247 linextr_x_yz(-main_sz_x_fam/2, +main_sz_x_fam/2)
252 module FamGraspElevation(){
254 ybot = $rack_rail_y - rack_rail_dia/2 + grasp_large_r
255 - fit_slope_len * 0.5;
258 adapt_main_top_y - grasp_large_r
260 for (dx= [/*-1,*/ +1] * rack_rail_dia/2)
261 translate([ -$foreaftmaint_rail_z + dx, y ])
262 circle(r= grasp_large_r);
266 module FamStemElevation(){
268 rectfromto([ -$foreaftmaint_rail_z, adapt_main_top_y ],
271 -$foreaftmaint_rail_z,
273 rack_shear_ratio * $foreaftmaint_rail_z * $reverse_sign,
275 square([0.1, rack_rail_dia * 0.5], center=true);
281 $rack_rail_y = rack_rail_y_of_elevation($elevation_nominal);
283 $strap_barrel_y = $rack_rail_y + rack_rail_dia/2 + strap_barrel_dia/2;
285 $rail_fixing_fit_corner = [
287 $rack_rail_y - rack_rail_dia/2
290 $foreaftmaint_rail_z = brk_block_z/2 + $foreaftmaint_dz - foreaftmaint_y_slop;
292 translate([0,0,brk_block_z/2])
293 mirror([0,0, $reverse_sign > 0 ? 0 : 1])
294 translate([0,0,-brk_block_z/2])
297 MainExtrude(main_sz_lhs_z){
300 RackShear() MainExtrude(main_sz_rhs_z){
301 StrapBarrelElevation();
303 translate([ 0,0, brk_block_z/2]) {
309 MainExtrude(main_sz_core_z){
313 MainExtrude(max(brk_block_z, main_sz_rhs_z)){
314 rectfromto([-8, adapt_main_top_y + 0.1],
316 rectfromto([-block_x -5, adapt_main_top_y],
317 [-grasp_large_x, block_y_min]);
320 RackShear() MainExtrude(main_sz_rhs_z){
321 GraspFixingElevation();
325 translate([0,0, main_sz_rhs_z/2]) linextr(-strap_w/2, +strap_w/2) {
326 translate([ rack_width_inner/2 - strap_th, 0 ])
327 rectfromto([ 0, -50 ], [ 50, 50 ]);
332 rectfromto([ -foreaftmaint_top_block_zs[0] + bolt_z, 0 ],
333 [ -foreaftmaint_top_block_zs[1] + bolt_z, block_y_min] );
345 adapt_main_top_y - 50,
346 $foreaftmaint_rail_z ])
347 cube(center=true, 100);
351 RackShear() linextr(-10, main_sz_lhs_z+main_sz_rhs_z) {
354 translate([ rack_rail_x, $rack_rail_y ]){
356 for (dx = [-rack_rail_dia, 0])
358 circle(r= rack_rail_dia/2);
366 // Distance from bolt hole, in backwards direction
367 cr = rack_rail_dia/2 + foreaftmaint_r_slop;
368 translate([ 0, $rack_rail_y, $foreaftmaint_rail_z ])
369 linextr_x_yz(+rack_rail_x,
378 for (dd=[[0,0], [-1,-1], [-1,+1]]) {
380 [-1, 0] * (rack_rail_dia - fit_slope_len)
389 translate([ 0,0, brk_block_z/2]) BoltHole();
393 module ForRackForDemo(){
394 elevation = elevation_of_bolt_for(rear_to_cross_rail);
395 rack_rail_y = rack_rail_y_of_elevation(elevation);
398 front_to_rear_elevation_change /
401 translate([0, rack_rail_y, brk_block_z/2 + rack_rail_y*rack_shear_ratio])
405 module RackForDemoRails(){
407 for (m=[0]) mirror([m,0,0]) {
408 linextr(-(50 + cross_rail_distance), 50 + rear_to_cross_rail)
409 translate([rack_rail_x, 0])
410 circle(r= rack_rail_dia/2);
415 module RackForDemoCrosses(){
419 rear_to_cross_rail - cross_rail_distance,
422 linextr_x_yz(rack_rail_x, -rack_rail_x)
423 circle(r= rack_rail_dia/2, $fn=6);
428 module Front(){ ////toplevel
429 // xxx elevation is wrong
430 Principal($reverse_sign = -1,
432 elevation_of_bolt_for(rear_to_cross_rail + rear_bolt_to_front_bolt),
433 $foreaftmaint_dz= front_to_cross_rail);
436 module Rear(){ ////toplevel
437 Principal($reverse_sign = +1,
439 elevation_of_bolt_for(rear_to_cross_rail),
440 $foreaftmaint_dz= rear_to_cross_rail);
448 translate([ 0, -2, -4 ])
449 square(center=true, [ brk_overall_w, 1 ]);
452 translate([ 0, -brk_nearbolt_recess_depth, -4 ])
453 linextr_y_xz(-brk_bolt_eff_len, 0)
454 circle(r = brk_bolt_dia/2);
459 module FrontDemo(){ ////toplevel
462 module RearDemo(){ ////toplevel
465 module RearRackDemo(){ ////toplevel
466 rotate([atan(rack_shear_ratio),0,0]) SomeDemo() {
468 translate([0, 0, -rear_bolt_to_front_bolt])
471 color("blue") RackForDemoCrosses();