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;
28 strap_barrel_dia = 14;
32 brk_block_z = 14.55 - 0.00;
34 brk_bolt_dia = 5.0 + 0.5;
35 brk_nearbolt_recess_dia = 8.86 + 1.5;
36 brk_nearbolt_recess_depth = 1.09 + 0.25;
38 brk_bolt_eff_len = 11.78; // inside of recess, to end of bolt
39 brk_bolt_len_slop = 0.5;
40 brk_bolt_nut_th = 3.89;
41 brk_bolt_nut_across_flats = 7.86 + 0.50;
43 brk_overall_w = 90.07;
47 // "foreaftmaint" aka "fam" is the hook-like part that stops
48 // the adapter sliding forwards/backwards along the rails
49 foreaftmaint_r_slop = 0.0;
50 foreaftmaint_y_slop = -0.25;
51 foreaftmaint_top_block_zs = [34.0, 39.0]; // rearwards from bolt hole
53 main_sz_y = $strf * 12;
55 grasp_thin_sz = $strf * 0.5;
56 beside_strap_sz = $strf * 8;
57 main_sz_core_z = $strf * 12;
59 // "length" in for-aft direction of interaction with rack rail
60 min_on_rail_sz_z = $strf * 18;
62 // when printer produces support
63 support_around = 1.7; // how far does the support extend around (in XY)
64 support_remnant = 0.75; // how much frass remains attached (Z height)
71 bolt_z = -brk_block_z/2;
73 main_sz_rhs_z = max(min_on_rail_sz_z, beside_strap_sz*2 + strap_w);
74 main_sz_lhs_z = min_on_rail_sz_z;
76 main_sz_x_fam = main_sz_y;
78 brk_bottom_y = -brk_recess_actual;
79 adapt_main_top_y = brk_bottom_y - general_gap_y;
82 rack_rail_x = -(rack_width_inner/2 + rack_rail_dia/2);
83 rack_rail_outer_x = -(rack_width_inner/2 + rack_rail_dia);
85 grasp_large_r = (rack_rail_dia + grasp_sz)/2;
86 grasp_small_r = (rack_rail_dia + grasp_thin_sz)/2;
87 grasp_large_x = rack_rail_outer_x + grasp_large_r;
88 grasp_small_x = rack_rail_outer_x + grasp_small_r;
90 block_x = grasp_large_x + grasp_large_r;
91 block_y_min = adapt_main_top_y - main_sz_y;
93 strap_barrel_x = rack_width_inner/2 + strap_barrel_dia/2;
95 rack_shear_ratio = -rear_elevation_nominal / rear_to_front_distance;
97 brk_bolt_nut_top_y = -brk_nearbolt_recess_depth
98 - brk_bolt_eff_len + brk_bolt_nut_th + brk_bolt_len_slop;
100 brk_bolt_nut_r = brk_bolt_nut_across_flats/2 / cos(360/12);
102 function elevation_of_bolt_for(z) = rear_elevation_nominal
103 + (z - brk_block_z/2) * rack_shear_ratio;
105 function rack_rail_y_of_elevation(elevation_nominal) =
106 brk_bottom_y - elevation_nominal - general_gap_y - rack_rail_dia/2;
108 echo(rack_shear_ratio);
110 module GraspElevation(){
112 translate([ grasp_large_x, adapt_main_top_y - grasp_large_r ])
113 circle(grasp_large_r);
115 translate([ grasp_small_x, $rack_rail_y - rack_rail_dia/2 ])
116 circle(grasp_small_r);
118 translate([ rack_rail_x + grasp_large_r/2,
119 $rack_rail_y - rack_rail_dia/2 ])
120 circle(grasp_small_r);
122 translate([ grasp_large_x, $rack_rail_y + rack_rail_dia/2 ])
123 circle(grasp_large_r);
125 translate([ grasp_large_x + grasp_large_r/2,
126 $rack_rail_y + rack_rail_dia/2 ])
127 circle(grasp_large_r);
131 module BlockElevation(){
133 rectfromto([ +block_x, adapt_main_top_y ],
134 [ -block_x, block_y_min ]);
135 rectfromto([ -grasp_large_x, adapt_main_top_y ],
136 [ +grasp_large_x, adapt_main_top_y - 0.1 ]);
139 rectfromto([ +block_x, adapt_main_top_y ],
140 [ -block_x, block_y_min ]);
141 rectfromto([ grasp_large_x, block_y_min ],
142 [ 0, block_y_min + 0.1 ]);
146 module MainExtrude(z){
151 s = rack_shear_ratio;
152 multmatrix([ [ 1, 0, 0, 0 ],
159 module GraspFixingElevation(){
166 translate([ -block_x, block_y_min ] + [0,0.1]*1 )
169 translate([ strap_barrel_x, $strap_barrel_y ])
170 circle(strap_barrel_dia/2 + strap_guide_sz);
173 rectfromto([0, $rack_rail_y],
174 [rack_width_inner, 50]);
176 translate([ rack_rail_x, $rack_rail_y ])
177 circle(r = rack_width_inner/2 - rack_rail_x);
178 polygon([ [ -block_x-0.1, 0 ],
179 [ rack_width_inner/2, 0 ],
180 $rail_fixing_fit_corner,
181 $rail_fixing_fit_corner + [-1,-1] * fit_slope_len,
182 [ -grasp_large_x - grasp_large_r*2, block_y_min ],
183 [ -block_x-0.1 -2, block_y_min +2 ]]);
189 module StrapBarrelElevation(){
190 translate([ strap_barrel_x, $strap_barrel_y ])
191 circle(strap_barrel_dia/2);
194 // Bracket support block, goes up inside bracket
195 // Z origin is bolt hole
198 linextr( -brk_block_z/2,
200 rectfromto([ -brk_block_xw/2, adapt_main_top_y - 0.1 ],
201 [ +brk_block_xw/2, 0 ]);
203 linextr_y_xz( -50, 10 ) {
204 translate([ 0, brk_block_z + bolt_z ])
206 [ main_sz_x_fam + support_around*2,
207 support_remnant *2 ]);
212 // Z origin is bolt hole
214 linextr_y_xz( -100, 10 )
215 circle(brk_bolt_dia/2);
217 linextr_y_xz( -brk_nearbolt_recess_depth, 10)
218 circle(brk_nearbolt_recess_dia/2);
220 linextr_y_xz( -100, brk_bolt_nut_top_y ) {
221 circle( r= brk_bolt_nut_r, $fn = 6 );
222 translate([ 0, brk_bolt_nut_across_flats/2 ])
223 circle( r=brk_bolt_nut_r/2, $fn = 4);
228 if ($foreaftmaint_dz) {
235 linextr_x_yz(-main_sz_x_fam/2, +main_sz_x_fam/2)
240 module FamGraspElevation(){
243 ybot = $rack_rail_y - rack_rail_dia/2 + grasp_large_r
244 - fit_slope_len * 0.5;
247 adapt_main_top_y - grasp_large_r
249 for (dx= [-1,+1] * rack_rail_dia/2)
250 translate([ -$foreaftmaint_rail_z + dx, y ])
251 circle(r= grasp_large_r);
253 translate([0, adapt_main_top_y])
254 rectfromto([-500, 0], [500, 500]);
260 $rack_rail_y = rack_rail_y_of_elevation($elevation_nominal);
262 $strap_barrel_y = $rack_rail_y + rack_rail_dia/2 + strap_barrel_dia/2;
264 $rail_fixing_fit_corner = [
266 $rack_rail_y - rack_rail_dia/2
269 $foreaftmaint_rail_z = brk_block_z/2 + $foreaftmaint_dz - foreaftmaint_y_slop;
273 MainExtrude(main_sz_lhs_z){
276 RackShear() MainExtrude(main_sz_rhs_z){
277 StrapBarrelElevation();
279 translate([ 0,0, brk_block_z/2]) {
285 MainExtrude(main_sz_core_z){
289 MainExtrude(max(brk_block_z, main_sz_rhs_z)){
290 rectfromto([-8, adapt_main_top_y + 0.1],
292 rectfromto([-block_x -5, adapt_main_top_y],
293 [-grasp_large_x, block_y_min]);
296 RackShear() MainExtrude(main_sz_rhs_z){
297 GraspFixingElevation();
301 translate([0,0, main_sz_rhs_z/2]) linextr(-strap_w/2, +strap_w/2) {
302 translate([ rack_width_inner/2 - strap_th, 0 ])
303 rectfromto([ 0, -50 ], [ 50, 50 ]);
308 rectfromto([ -$foreaftmaint_rail_z, adapt_main_top_y ],
310 rectfromto([ -foreaftmaint_top_block_zs[0] + bolt_z, 0 ],
311 [ -foreaftmaint_top_block_zs[1] + bolt_z, block_y_min] );
319 RackShear() linextr(-10, main_sz_lhs_z+main_sz_rhs_z) {
322 translate([ rack_rail_x, $rack_rail_y ]){
324 for (dx = [-rack_rail_dia, 0])
326 circle(r= rack_rail_dia/2);
334 // Distance from bolt hole, in backwards direction
335 cr = rack_rail_dia/2 + foreaftmaint_r_slop;
336 translate([ 0, $rack_rail_y, $foreaftmaint_rail_z ])
337 linextr_x_yz(+rack_rail_x,
346 for (dd=[[0,0], [-1,-1], [-1,+1]]) {
348 [-1, 0] * (rack_rail_dia - fit_slope_len)
357 translate([ 0,0, brk_block_z/2]) BoltHole();
361 module RackForDemo(){ ////toplevel
362 elevation = elevation_of_bolt_for(rear_to_cross_rail);
363 rack_rail_y = rack_rail_y_of_elevation(elevation);
365 rotate([-atan(rack_shear_ratio), 0,0])
366 translate([0, rack_rail_y, brk_block_z/2 + rack_rail_y*rack_shear_ratio]) {
367 for (m=[0]) mirror([m,0,0]) {
368 linextr(-50, 50 + rear_to_cross_rail)
369 translate([rack_rail_x, 0])
370 circle(r= rack_rail_dia/2);
372 translate([0,0, rear_to_cross_rail])
373 linextr_x_yz(rack_rail_x, -rack_rail_x)
374 circle(r= rack_rail_dia/2);
378 module Front(){ ////toplevel
379 // xxx elevation is wrong
380 Principal($elevation_nominal=
381 elevation_of_bolt_for(rear_to_cross_rail + rear_bolt_to_front_bolt),
382 $foreaftmaint_dz= 0);
385 module Rear(){ ////toplevel
386 Principal($elevation_nominal=
387 elevation_of_bolt_for(rear_to_cross_rail),
388 $foreaftmaint_dz= rear_to_cross_rail);
396 translate([ 0, -2, -4 ])
397 square(center=true, [ brk_overall_w, 1 ]);
400 translate([ 0, -brk_nearbolt_recess_depth, -4 ])
401 linextr_y_xz(-brk_bolt_eff_len, 0)
402 circle(r = brk_bolt_dia/2);
407 module FrontDemo(){ ////toplevel
410 module RearDemo(){ ////toplevel
413 module RearRackDemo(){ ////toplevel
414 rotate([atan(rack_shear_ratio),0,0]) SomeDemo() {