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.50;
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 rear bolt hold
20 rear_to_front_distance = 230;
21 rear_to_cross_rail = 39.65; // bolt centre to rail centre, rail to rear
27 strap_barrel_dia = 14;
31 brk_block_z = 14.55 - 0.75;
33 brk_bolt_dia = 4.0 + 0.5;
34 brk_nearbolt_recess_dia = 8.86 + 1.5;
35 brk_nearbolt_recess_depth = 1.09 + 0.25;
37 brk_bolt_eff_len = 11.78 - 1.0; // inside of recess, to end of bolt
38 brk_bolt_len_slop = 2.0;;
39 brk_bolt_nut_th = 3.89;
40 brk_bolt_nut_across_flats = 7.86 + 0.50;
42 brk_overall_w = 90.07;
46 foreaftmaint_r_slop = 0.75;
48 main_sz_y = $strf * 18;
50 grasp_thin_sz = $strf * 0.5;
51 beside_strap_sz = $strf * 8;
58 main_sz_z = beside_strap_sz*2 + strap_w;
59 main_sz_x_fam = main_sz_y;
61 brk_bottom_y = -brk_recess_actual;
62 adapt_main_top_y = brk_bottom_y + general_gap_y;
65 rack_rail_x = -(rack_width_inner/2 + rack_rail_dia/2);
66 rack_rail_outer_x = -(rack_width_inner/2 + rack_rail_dia);
68 grasp_large_r = (rack_rail_dia + grasp_sz)/2;
69 grasp_small_r = (rack_rail_dia + grasp_thin_sz)/2;
70 grasp_large_x = rack_rail_outer_x + grasp_large_r;
71 grasp_small_x = rack_rail_outer_x + grasp_small_r;
73 block_x = grasp_large_x + grasp_large_r;
74 block_y_min = adapt_main_top_y - main_sz_y;
76 strap_barrel_x = rack_width_inner/2 + strap_barrel_dia/2;
78 rack_shear_ratio = rear_elevation_nominal / rear_to_front_distance;
80 brk_bolt_nut_top_y = -brk_nearbolt_recess_depth
81 - brk_bolt_eff_len + brk_bolt_nut_th + brk_bolt_len_slop;
83 brk_bolt_nut_r = brk_bolt_nut_across_flats/2 / cos(360/12);
85 module GraspElevation(){
87 translate([ grasp_large_x, adapt_main_top_y - grasp_large_r ])
88 circle(grasp_large_r);
90 translate([ grasp_small_x, $rack_rail_y - rack_rail_dia/2 ])
91 circle(grasp_small_r);
93 translate([ rack_rail_x + grasp_large_r/2,
94 $rack_rail_y - rack_rail_dia/2 ])
95 circle(grasp_small_r);
97 translate([ grasp_large_x, $rack_rail_y + rack_rail_dia/2 ])
98 circle(grasp_large_r);
100 translate([ grasp_large_x + grasp_large_r/2,
101 $rack_rail_y + rack_rail_dia/2 ])
102 circle(grasp_large_r);
106 module BlockElevation(){
108 rectfromto([ +block_x, adapt_main_top_y ],
109 [ -block_x, block_y_min ]);
110 rectfromto([ -grasp_large_x, adapt_main_top_y ],
111 [ +grasp_large_x, adapt_main_top_y - 0.1 ]);
114 rectfromto([ +block_x, adapt_main_top_y ],
115 [ -block_x, block_y_min ]);
116 rectfromto([ grasp_large_x, block_y_min ],
117 [ 0, block_y_min + 0.1 ]);
121 module MainExtrude(){
122 linextr(0, main_sz_z)
126 s = rack_shear_ratio;
127 multmatrix([ [ 1, 0, 0, 0 ],
134 module GraspFixingElevation(){
137 mirror([1,0]) GraspElevation();
138 translate([ strap_barrel_x, $strap_barrel_y ])
139 circle(strap_barrel_dia/2 + strap_guide_sz);
142 rectfromto([0, $rack_rail_y],
143 [rack_width_inner, 50]);
145 translate([ rack_rail_x, $rack_rail_y ])
146 circle(r = rack_width_inner/2 - rack_rail_x);
148 [ rack_width_inner/2, 0 ],
149 $rail_fixing_fit_corner,
150 $rail_fixing_fit_corner + [-1,-1] * fit_slope_len,
151 [ -grasp_large_x - grasp_large_r*2, block_y_min ],
152 [ 0, block_y_min ]]);
158 module StrapBarrelElevation(){
159 translate([ strap_barrel_x, $strap_barrel_y ])
160 circle(strap_barrel_dia/2);
163 // Bracket support block, goes up inside bracket
164 // Z origin is bolt hole
166 linextr( -brk_block_z/2,
168 rectfromto([ -brk_block_xw/2, adapt_main_top_y - 0.1 ],
169 [ +brk_block_xw/2, 0 ]);
173 // Z origin is bolt hole
175 linextr_y_xz( -100, 10 )
176 circle(brk_bolt_dia/2);
178 linextr_y_xz( -brk_nearbolt_recess_depth, 10)
179 circle(brk_nearbolt_recess_dia/2);
181 linextr_y_xz( -100, brk_bolt_nut_top_y ) {
182 circle( r= brk_bolt_nut_r, $fn = 6 );
183 translate([ 0, brk_bolt_nut_across_flats/2 ])
184 circle( r=brk_bolt_nut_r/2, $fn = 4);
188 module AsForeAftMaint(){
189 if ($foreaftmaint_dz) {
196 $rack_rail_y = brk_bottom_y - $elevation_nominal
197 - general_gap_y - rack_rail_dia/2;
199 $strap_barrel_y = $rack_rail_y + rack_rail_dia/2 + strap_barrel_dia/2;
201 $rail_fixing_fit_corner = [
203 $rack_rail_y - rack_rail_dia/2
206 $foreaftmaint_rail_z = brk_block_z/2 + $foreaftmaint_dz;
207 $foreaftmaint_rail_y = $rack_rail_y
208 + $foreaftmaint_rail_z * rack_shear_ratio;
215 RackShear() MainExtrude(){
216 StrapBarrelElevation();
218 translate([ 0,0, brk_block_z/2]) {
227 RackShear() MainExtrude(){
228 GraspFixingElevation();
232 translate([0,0, main_sz_z/2]) linextr(-strap_w/2, +strap_w/2) {
233 translate([ rack_width_inner/2 - strap_th, 0 ])
234 rectfromto([ 0, -50 ], [ 50, 50 ]);
239 linextr_x_yz(-main_sz_x_fam/2,
244 rectfromto([ -$foreaftmaint_rail_z, adapt_main_top_y ],
249 - rack_rail_dia/2 + grasp_large_r,
250 adapt_main_top_y - grasp_large_r
252 for (dx= [-1,+1] * rack_rail_dia/2)
253 translate([ -$foreaftmaint_rail_z + dx, y ])
254 circle(r= grasp_large_r);
257 translate([0, adapt_main_top_y])
258 rectfromto([-500, 0], [500, 500]);
264 RackShear() linextr(-10, main_sz_z+10) {
267 translate([ rack_rail_x, $rack_rail_y ]){
269 for (dx = [-rack_rail_dia, 0])
271 circle(r= rack_rail_dia/2);
278 // Distance from bolt hole, in backwards direction
280 translate([ 0, $foreaftmaint_rail_y, $foreaftmaint_rail_z ])
281 linextr_x_yz(+rack_rail_x,
286 circle(r= rack_rail_dia/2 + foreaftmaint_r_slop);
292 translate([ 0,0, brk_block_z/2]) BoltHole();
296 module Front(){ ////toplevel
297 // xxx elevation is wrong
298 Principal($elevation_nominal=0, $foreaftmaint_dz=0);
301 module Rear(){ ////toplevel
302 Principal($elevation_nominal=rear_elevation_nominal,
303 $foreaftmaint_dz= rear_to_cross_rail);
306 module Demo(){ ////toplevel
312 translate([ 0, -2, -4 ])
313 square(center=true, [ brk_overall_w, 1 ]);