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
29 strap_barrel_dia = 14;
33 brk_block_z = 14.55 - 0.00;
35 brk_bolt_dia = 5.0 + 0.5;
36 brk_nearbolt_recess_dia = 8.86 + 1.5;
37 brk_nearbolt_recess_depth = 1.09 + 0.25;
39 brk_bolt_eff_len = 11.78; // inside of recess, to end of bolt
40 brk_bolt_len_slop = 0.5;
41 brk_bolt_nut_th = 3.89;
42 brk_bolt_nut_across_flats = 7.86 + 0.50;
44 brk_overall_w = 90.07;
48 // "foreaftmaint" aka "fam" is the hook-like part that stops
49 // the adapter sliding forwards/backwards along the rails
50 foreaftmaint_r_slop = 0.0;
51 foreaftmaint_y_slop = -0.25;
52 foreaftmaint_top_block_zs = [34.0, 39.0]; // rearwards from bolt hole
54 main_sz_y = $strf * 12;
56 grasp_thin_sz = $strf * 0.5;
57 beside_strap_sz = $strf * 8;
58 main_sz_core_z = $strf * 12;
60 // "length" in for-aft direction of interaction with rack rail
61 min_on_rail_sz_z = $strf * 18;
63 // when printer produces support
64 support_around = 1.7; // how far does the support extend around (in XY)
65 support_remnant = 0.75; // how much frass remains attached (Z height)
72 bolt_z = -brk_block_z/2;
74 main_sz_rhs_z = max(min_on_rail_sz_z, beside_strap_sz*2 + strap_w);
75 main_sz_lhs_z = min_on_rail_sz_z;
77 main_sz_x_fam = main_sz_y;
79 brk_bottom_y = -brk_recess_actual;
80 adapt_main_top_y = brk_bottom_y - general_gap_y;
83 rack_rail_x = -(rack_width_inner/2 + rack_rail_dia/2);
84 rack_rail_outer_x = -(rack_width_inner/2 + rack_rail_dia);
86 grasp_large_r = (rack_rail_dia + grasp_sz)/2;
87 grasp_small_r = (rack_rail_dia + grasp_thin_sz)/2;
88 grasp_large_x = rack_rail_outer_x + grasp_large_r;
89 grasp_small_x = rack_rail_outer_x + grasp_small_r;
91 block_x = grasp_large_x + grasp_large_r;
92 block_y_min = adapt_main_top_y - main_sz_y;
94 strap_barrel_x = rack_width_inner/2 + strap_barrel_dia/2;
96 rack_shear_ratio = -rear_elevation_nominal / rear_to_front_distance;
98 brk_bolt_nut_top_y = -brk_nearbolt_recess_depth
99 - brk_bolt_eff_len + brk_bolt_nut_th + brk_bolt_len_slop;
101 brk_bolt_nut_r = brk_bolt_nut_across_flats/2 / cos(360/12);
103 function elevation_of_bolt_for(z) = rear_elevation_nominal
104 + (z - brk_block_z/2) * rack_shear_ratio;
106 function rack_rail_y_of_elevation(elevation_nominal) =
107 brk_bottom_y - elevation_nominal - general_gap_y - rack_rail_dia/2;
109 echo(rack_shear_ratio);
111 module GraspElevation(){
113 translate([ grasp_large_x, adapt_main_top_y - grasp_large_r ])
114 circle(grasp_large_r);
116 translate([ grasp_small_x, $rack_rail_y - rack_rail_dia/2 ])
117 circle(grasp_small_r);
119 translate([ rack_rail_x + grasp_large_r/2,
120 $rack_rail_y - rack_rail_dia/2 ])
121 circle(grasp_small_r);
123 translate([ grasp_large_x, $rack_rail_y + rack_rail_dia/2 ])
124 circle(grasp_large_r);
126 translate([ grasp_large_x + grasp_large_r/2,
127 $rack_rail_y + rack_rail_dia/2 ])
128 circle(grasp_large_r);
132 module BlockElevation(){
134 rectfromto([ +block_x, adapt_main_top_y ],
135 [ -block_x, block_y_min ]);
136 rectfromto([ -grasp_large_x, adapt_main_top_y ],
137 [ +grasp_large_x, adapt_main_top_y - 0.1 ]);
140 rectfromto([ +block_x, adapt_main_top_y ],
141 [ -block_x, block_y_min ]);
142 rectfromto([ grasp_large_x, block_y_min ],
143 [ 0, block_y_min + 0.1 ]);
147 module MainExtrude(z){
152 s = rack_shear_ratio;
153 multmatrix([ [ 1, 0, 0, 0 ],
160 module GraspFixingElevation(){
167 translate([ -block_x, block_y_min ] + [0,0.1]*1 )
170 translate([ strap_barrel_x, $strap_barrel_y ])
171 circle(strap_barrel_dia/2 + strap_guide_sz);
174 rectfromto([0, $rack_rail_y],
175 [rack_width_inner, 50]);
177 translate([ rack_rail_x, $rack_rail_y ])
178 circle(r = rack_width_inner/2 - rack_rail_x);
179 polygon([ [ -block_x-0.1, 0 ],
180 [ rack_width_inner/2, 0 ],
181 $rail_fixing_fit_corner,
182 $rail_fixing_fit_corner + [-1,-1] * fit_slope_len,
183 [ -grasp_large_x - grasp_large_r*2, block_y_min ],
184 [ -block_x-0.1 -2, block_y_min +2 ]]);
190 module StrapBarrelElevation(){
191 translate([ strap_barrel_x, $strap_barrel_y ])
192 circle(strap_barrel_dia/2);
195 // Bracket support block, goes up inside bracket
196 // Z origin is bolt hole
199 linextr( -brk_block_z/2,
201 rectfromto([ -brk_block_xw/2, adapt_main_top_y - 0.1 ],
202 [ +brk_block_xw/2, 0 ]);
204 linextr_y_xz( -50, 10 ) {
205 translate([ 0, brk_block_z + bolt_z ])
207 [ main_sz_x_fam + support_around*2,
208 support_remnant *2 ]);
213 // Z origin is bolt hole
215 linextr_y_xz( -100, 10 )
216 circle(brk_bolt_dia/2);
218 linextr_y_xz( -brk_nearbolt_recess_depth, 10)
219 circle(brk_nearbolt_recess_dia/2);
221 linextr_y_xz( -100, brk_bolt_nut_top_y ) {
222 circle( r= brk_bolt_nut_r, $fn = 6 );
223 translate([ 0, brk_bolt_nut_across_flats/2 ])
224 circle( r=brk_bolt_nut_r/2, $fn = 4);
229 if ($foreaftmaint_dz) {
236 linextr_x_yz(-main_sz_x_fam/2, +main_sz_x_fam/2)
241 module FamGraspElevation(){
244 ybot = $rack_rail_y - rack_rail_dia/2 + grasp_large_r
245 - fit_slope_len * 0.5;
248 adapt_main_top_y - grasp_large_r
250 for (dx= [-1,+1] * rack_rail_dia/2)
251 translate([ -$foreaftmaint_rail_z + dx, y ])
252 circle(r= grasp_large_r);
254 translate([0, adapt_main_top_y])
255 rectfromto([-500, 0], [500, 500]);
261 $rack_rail_y = rack_rail_y_of_elevation($elevation_nominal);
263 $strap_barrel_y = $rack_rail_y + rack_rail_dia/2 + strap_barrel_dia/2;
265 $rail_fixing_fit_corner = [
267 $rack_rail_y - rack_rail_dia/2
270 $foreaftmaint_rail_z = brk_block_z/2 + $foreaftmaint_dz - foreaftmaint_y_slop;
274 MainExtrude(main_sz_lhs_z){
277 RackShear() MainExtrude(main_sz_rhs_z){
278 StrapBarrelElevation();
280 translate([ 0,0, brk_block_z/2]) {
286 MainExtrude(main_sz_core_z){
290 MainExtrude(max(brk_block_z, main_sz_rhs_z)){
291 rectfromto([-8, adapt_main_top_y + 0.1],
293 rectfromto([-block_x -5, adapt_main_top_y],
294 [-grasp_large_x, block_y_min]);
297 RackShear() MainExtrude(main_sz_rhs_z){
298 GraspFixingElevation();
302 translate([0,0, main_sz_rhs_z/2]) linextr(-strap_w/2, +strap_w/2) {
303 translate([ rack_width_inner/2 - strap_th, 0 ])
304 rectfromto([ 0, -50 ], [ 50, 50 ]);
309 rectfromto([ -$foreaftmaint_rail_z, adapt_main_top_y ],
311 rectfromto([ -foreaftmaint_top_block_zs[0] + bolt_z, 0 ],
312 [ -foreaftmaint_top_block_zs[1] + bolt_z, block_y_min] );
320 RackShear() linextr(-10, main_sz_lhs_z+main_sz_rhs_z) {
323 translate([ rack_rail_x, $rack_rail_y ]){
325 for (dx = [-rack_rail_dia, 0])
327 circle(r= rack_rail_dia/2);
335 // Distance from bolt hole, in backwards direction
336 cr = rack_rail_dia/2 + foreaftmaint_r_slop;
337 translate([ 0, $rack_rail_y, $foreaftmaint_rail_z ])
338 linextr_x_yz(+rack_rail_x,
347 for (dd=[[0,0], [-1,-1], [-1,+1]]) {
349 [-1, 0] * (rack_rail_dia - fit_slope_len)
358 translate([ 0,0, brk_block_z/2]) BoltHole();
362 module RackForDemo(){ ////toplevel
363 elevation = elevation_of_bolt_for(rear_to_cross_rail);
364 rack_rail_y = rack_rail_y_of_elevation(elevation);
366 rotate([-atan(rack_shear_ratio), 0,0])
367 translate([0, rack_rail_y, brk_block_z/2 + rack_rail_y*rack_shear_ratio]) {
368 for (m=[0]) mirror([m,0,0]) {
369 linextr(-50, 50 + rear_to_cross_rail)
370 translate([rack_rail_x, 0])
371 circle(r= rack_rail_dia/2);
373 translate([0,0, rear_to_cross_rail])
374 linextr_x_yz(rack_rail_x, -rack_rail_x)
375 circle(r= rack_rail_dia/2);
379 module Front(){ ////toplevel
380 // xxx elevation is wrong
381 Principal($elevation_nominal=
382 elevation_of_bolt_for(rear_to_cross_rail + rear_bolt_to_front_bolt),
383 $foreaftmaint_dz= front_to_cross_rail);
386 module Rear(){ ////toplevel
387 Principal($elevation_nominal=
388 elevation_of_bolt_for(rear_to_cross_rail),
389 $foreaftmaint_dz= rear_to_cross_rail);
397 translate([ 0, -2, -4 ])
398 square(center=true, [ brk_overall_w, 1 ]);
401 translate([ 0, -brk_nearbolt_recess_depth, -4 ])
402 linextr_y_xz(-brk_bolt_eff_len, 0)
403 circle(r = brk_bolt_dia/2);
408 module FrontDemo(){ ////toplevel
411 module RearDemo(){ ////toplevel
414 module RearRackDemo(){ ////toplevel
415 rotate([atan(rack_shear_ratio),0,0]) SomeDemo() {