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;
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;
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 front_to_rear_elevation_change =
78 rear_elevation_nominal - front_elevation_nominal;
80 main_sz_rhs_z = max(min_on_rail_sz_z, beside_strap_sz*2 + strap_w);
81 main_sz_lhs_z = min_on_rail_sz_z;
83 main_sz_x_fam = main_sz_y;
85 brk_bottom_y = -brk_recess_actual;
86 adapt_main_top_y = brk_bottom_y - general_gap_y;
89 rack_rail_x = -(rack_width_inner/2 + rack_rail_dia/2);
90 rack_rail_outer_x = -(rack_width_inner/2 + rack_rail_dia);
92 grasp_large_r = (rack_rail_dia + grasp_sz)/2;
93 grasp_small_r = (rack_rail_dia + grasp_thin_sz)/2;
94 grasp_large_x = rack_rail_outer_x + grasp_large_r;
95 grasp_small_x = rack_rail_outer_x + grasp_small_r;
97 block_x = grasp_large_x + grasp_large_r;
98 block_y_min = adapt_main_top_y - main_sz_y;
100 strap_barrel_x = rack_width_inner/2 + strap_barrel_dia/2;
102 rack_shear_ratio = - front_to_rear_elevation_change / rear_to_front_distance;
104 front_to_cross_rail =
105 cross_rail_distance * sqrt(1 - rack_shear_ratio * rack_shear_ratio)
106 - rear_bolt_to_front_bolt
108 - sqrt( pow( cross_rail_distance * rack_shear_ratio, 2 )
109 - pow( front_to_rear_elevation_change, 2 ) )
112 brk_bolt_nut_top_y = -brk_nearbolt_recess_depth
113 - brk_bolt_eff_len + brk_bolt_nut_th + brk_bolt_len_slop;
115 brk_bolt_nut_r = brk_bolt_nut_across_flats/2 / cos(360/12);
117 function elevation_of_bolt_for(z) = rear_elevation_nominal
118 + front_elevation_nominal
119 + (z - brk_block_z/2) * rack_shear_ratio;
121 function rack_rail_y_of_elevation(elevation_nominal) =
122 brk_bottom_y - elevation_nominal - general_gap_y - rack_rail_dia/2;
124 echo(rack_shear_ratio);
126 module GraspElevation(){
128 translate([ grasp_large_x, adapt_main_top_y - grasp_large_r ])
129 circle(grasp_large_r);
131 translate([ grasp_small_x, $rack_rail_y - rack_rail_dia/2 ])
132 circle(grasp_small_r);
134 translate([ rack_rail_x + grasp_large_r/2,
135 $rack_rail_y - rack_rail_dia/2 ])
136 circle(grasp_small_r);
138 translate([ grasp_large_x, $rack_rail_y + rack_rail_dia/2 ])
139 circle(grasp_large_r);
141 translate([ grasp_large_x + grasp_large_r/2,
142 $rack_rail_y + rack_rail_dia/2 ])
143 circle(grasp_large_r);
147 module BlockElevation(){
149 rectfromto([ +block_x, adapt_main_top_y ],
150 [ -block_x, block_y_min ]);
151 rectfromto([ -grasp_large_x, adapt_main_top_y ],
152 [ +grasp_large_x, adapt_main_top_y - 0.1 ]);
155 rectfromto([ +block_x, adapt_main_top_y ],
156 [ -block_x, block_y_min ]);
157 rectfromto([ grasp_large_x, block_y_min ],
158 [ 0, block_y_min + 0.1 ]);
162 module MainExtrude(z){
167 s = rack_shear_ratio * $reverse_sign;
168 multmatrix([ [ 1, 0, 0, 0 ],
175 module GraspFixingElevation(){
182 translate([ -block_x, block_y_min ] + [0,0.1]*1 )
185 translate([ strap_barrel_x, $strap_barrel_y ])
186 circle(strap_barrel_dia/2 + strap_guide_sz);
189 rectfromto([0, $rack_rail_y],
190 [rack_width_inner, 50]);
192 translate([ rack_rail_x, $rack_rail_y ])
193 circle(r = rack_width_inner/2 - rack_rail_x);
194 polygon([ [ -block_x-0.1, 0 ],
195 [ rack_width_inner/2, 0 ],
196 $rail_fixing_fit_corner,
197 $rail_fixing_fit_corner + [-1,-1] * fit_slope_len,
198 [ -grasp_large_x - grasp_large_r*2, block_y_min ],
199 [ -block_x-0.1 -2, block_y_min +2 ]]);
205 module StrapBarrelElevation(){
206 translate([ strap_barrel_x, $strap_barrel_y ])
207 circle(strap_barrel_dia/2);
210 // Bracket support block, goes up inside bracket
211 // Z origin is bolt hole
214 linextr( -brk_block_z/2,
216 rectfromto([ -brk_block_xw/2, adapt_main_top_y - 0.1 ],
217 [ +brk_block_xw/2, 0 ]);
219 linextr_y_xz( -50, 10 ) {
220 translate([ 0, brk_block_z + bolt_z ])
222 [ main_sz_x_fam + support_around*2,
223 support_remnant *2 ]);
228 // Z origin is bolt hole
230 linextr_y_xz( -100, 10 )
231 circle(brk_bolt_dia/2);
233 linextr_y_xz( -brk_nearbolt_recess_depth, 10)
234 circle(brk_nearbolt_recess_dia/2);
236 linextr_y_xz( -100, brk_bolt_nut_top_y ) {
238 for (dz = [0, support_bridge_gap_z])
240 circle( r= brk_bolt_nut_r, $fn = 6 );
245 if ($foreaftmaint_dz) {
252 linextr_x_yz(-main_sz_x_fam/2, +main_sz_x_fam/2)
257 module FamGraspElevation(){
259 ybot = $rack_rail_y - rack_rail_dia/2 + grasp_large_r
260 - fit_slope_len * 0.5;
263 adapt_main_top_y - grasp_large_r
265 for (dx= [/*-1,*/ +1] * rack_rail_dia/2)
266 translate([ -$foreaftmaint_rail_z + dx, y ])
267 circle(r= grasp_large_r);
271 module FamStemElevation(){
273 rectfromto([ -$foreaftmaint_rail_z, adapt_main_top_y ],
276 -$foreaftmaint_rail_z,
278 rack_shear_ratio * $foreaftmaint_rail_z * $reverse_sign,
280 square([0.1, rack_rail_dia * 0.5], center=true);
286 $rack_rail_y = rack_rail_y_of_elevation($elevation_nominal);
288 $strap_barrel_y = $rack_rail_y + rack_rail_dia/2 + strap_barrel_dia/2;
290 $rail_fixing_fit_corner = [
292 $rack_rail_y - rack_rail_dia/2
295 $foreaftmaint_rail_z = brk_block_z/2 + $foreaftmaint_dz - foreaftmaint_y_slop;
297 translate([0,0,brk_block_z/2])
298 mirror([0,0, $reverse_sign > 0 ? 0 : 1])
299 translate([0,0,-brk_block_z/2])
302 MainExtrude(main_sz_lhs_z){
305 RackShear() MainExtrude(main_sz_rhs_z){
306 StrapBarrelElevation();
308 translate([ 0,0, brk_block_z/2]) {
314 MainExtrude(main_sz_core_z){
318 MainExtrude(max(brk_block_z, main_sz_rhs_z)){
319 rectfromto([-8, adapt_main_top_y + 0.1],
321 rectfromto([-block_x -5, adapt_main_top_y],
322 [-grasp_large_x, block_y_min]);
325 RackShear() MainExtrude(main_sz_rhs_z){
326 GraspFixingElevation();
330 translate([0,0, main_sz_rhs_z/2]) linextr(-strap_w/2, +strap_w/2) {
331 translate([ rack_width_inner/2 - strap_th, 0 ])
332 rectfromto([ 0, -50 ], [ 50, 50 ]);
337 if ($foreaftmaint_top_block) {
338 rectfromto([ -foreaftmaint_top_block_zs[0] + bolt_z, 0 ],
339 [ -foreaftmaint_top_block_zs[1] + bolt_z, block_y_min] );
352 adapt_main_top_y - 50,
353 $foreaftmaint_rail_z ])
354 cube(center=true, 100);
358 RackShear() linextr(-10, main_sz_lhs_z+main_sz_rhs_z) {
361 translate([ rack_rail_x, $rack_rail_y ]){
363 for (dx = [-rack_rail_dia, 0])
365 circle(r= rack_rail_dia/2);
373 // Distance from bolt hole, in backwards direction
374 cr = rack_rail_dia/2 + foreaftmaint_r_slop;
375 translate([ 0, $rack_rail_y, $foreaftmaint_rail_z ])
376 linextr_x_yz(+rack_rail_x,
385 for (dd=[[0,0], [-1,-1], [-1,+1]]) {
387 [-1, 0] * (rack_rail_dia - fit_slope_len)
396 translate([ 0,0, brk_block_z/2]) BoltHole();
400 module ForRackForDemo(){
401 elevation = elevation_of_bolt_for(rear_to_cross_rail);
402 rack_rail_y = rack_rail_y_of_elevation(elevation);
405 front_to_rear_elevation_change /
408 translate([0, rack_rail_y, brk_block_z/2 + rack_rail_y*rack_shear_ratio])
412 module RackForDemoRails(){
414 for (m=[0]) mirror([m,0,0]) {
415 linextr(-(50 + cross_rail_distance), 50 + rear_to_cross_rail)
416 translate([rack_rail_x, 0])
417 circle(r= rack_rail_dia/2);
422 module RackForDemoCrosses(){
426 rear_to_cross_rail - cross_rail_distance,
429 linextr_x_yz(rack_rail_x, -rack_rail_x)
430 circle(r= rack_rail_dia/2, $fn=8);
435 module Front(){ ////toplevel
436 // xxx elevation is wrong
437 Principal($reverse_sign = -1,
438 $foreaftmaint_top_block = false,
440 elevation_of_bolt_for(rear_to_cross_rail + rear_bolt_to_front_bolt),
441 $foreaftmaint_dz= front_to_cross_rail);
444 module Rear(){ ////toplevel
445 Principal($reverse_sign = +1,
446 $foreaftmaint_top_block = true,
448 elevation_of_bolt_for(rear_to_cross_rail),
449 $foreaftmaint_dz= rear_to_cross_rail);
457 translate([ 0, -2, -4 ])
458 square(center=true, [ brk_overall_w, 1 ]);
461 translate([ 0, -brk_nearbolt_recess_depth, -4 ])
462 linextr_y_xz(-brk_bolt_eff_len, 0)
463 circle(r = brk_bolt_dia/2);
468 module FrontDemo(){ ////toplevel
471 module RearDemo(){ ////toplevel
474 module RearRackDemo(){ ////toplevel
475 rotate([atan(rack_shear_ratio),0,0]) SomeDemo() {
477 translate([0, 0, -rear_bolt_to_front_bolt])
480 color("blue") RackForDemoCrosses();