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 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" aka "fam" is the hook-like part that stops
47 // the adapter sliding forwards/backwards along the rails
48 foreaftmaint_r_slop = 0.75;
50 main_sz_y = $strf * 18;
52 grasp_thin_sz = $strf * 0.5;
53 beside_strap_sz = $strf * 8;
60 main_sz_z = beside_strap_sz*2 + strap_w;
61 main_sz_x_fam = main_sz_y;
63 brk_bottom_y = -brk_recess_actual;
64 adapt_main_top_y = brk_bottom_y - general_gap_y;
67 rack_rail_x = -(rack_width_inner/2 + rack_rail_dia/2);
68 rack_rail_outer_x = -(rack_width_inner/2 + rack_rail_dia);
70 grasp_large_r = (rack_rail_dia + grasp_sz)/2;
71 grasp_small_r = (rack_rail_dia + grasp_thin_sz)/2;
72 grasp_large_x = rack_rail_outer_x + grasp_large_r;
73 grasp_small_x = rack_rail_outer_x + grasp_small_r;
75 block_x = grasp_large_x + grasp_large_r;
76 block_y_min = adapt_main_top_y - main_sz_y;
78 strap_barrel_x = rack_width_inner/2 + strap_barrel_dia/2;
80 rack_shear_ratio = -rear_elevation_nominal / rear_to_front_distance;
82 brk_bolt_nut_top_y = -brk_nearbolt_recess_depth
83 - brk_bolt_eff_len + brk_bolt_nut_th + brk_bolt_len_slop;
85 brk_bolt_nut_r = brk_bolt_nut_across_flats/2 / cos(360/12);
87 module GraspElevation(){
89 translate([ grasp_large_x, adapt_main_top_y - grasp_large_r ])
90 circle(grasp_large_r);
92 translate([ grasp_small_x, $rack_rail_y - rack_rail_dia/2 ])
93 circle(grasp_small_r);
95 translate([ rack_rail_x + grasp_large_r/2,
96 $rack_rail_y - rack_rail_dia/2 ])
97 circle(grasp_small_r);
99 translate([ grasp_large_x, $rack_rail_y + rack_rail_dia/2 ])
100 circle(grasp_large_r);
102 translate([ grasp_large_x + grasp_large_r/2,
103 $rack_rail_y + rack_rail_dia/2 ])
104 circle(grasp_large_r);
108 module BlockElevation(){
110 rectfromto([ +block_x, adapt_main_top_y ],
111 [ -block_x, block_y_min ]);
112 rectfromto([ -grasp_large_x, adapt_main_top_y ],
113 [ +grasp_large_x, adapt_main_top_y - 0.1 ]);
116 rectfromto([ +block_x, adapt_main_top_y ],
117 [ -block_x, block_y_min ]);
118 rectfromto([ grasp_large_x, block_y_min ],
119 [ 0, block_y_min + 0.1 ]);
123 module MainExtrude(){
124 linextr(0, main_sz_z)
128 s = rack_shear_ratio;
129 multmatrix([ [ 1, 0, 0, 0 ],
136 module GraspFixingElevation(){
143 translate([ -block_x, block_y_min ] + [0,0.1]*1 )
146 translate([ strap_barrel_x, $strap_barrel_y ])
147 circle(strap_barrel_dia/2 + strap_guide_sz);
150 rectfromto([0, $rack_rail_y],
151 [rack_width_inner, 50]);
153 translate([ rack_rail_x, $rack_rail_y ])
154 circle(r = rack_width_inner/2 - rack_rail_x);
155 polygon([ [ -block_x-0.1, 0 ],
156 [ rack_width_inner/2, 0 ],
157 $rail_fixing_fit_corner,
158 $rail_fixing_fit_corner + [-1,-1] * fit_slope_len,
159 [ -grasp_large_x - grasp_large_r*2, block_y_min ],
160 [ -block_x-0.1, block_y_min ]]);
166 module StrapBarrelElevation(){
167 translate([ strap_barrel_x, $strap_barrel_y ])
168 circle(strap_barrel_dia/2);
171 // Bracket support block, goes up inside bracket
172 // Z origin is bolt hole
174 linextr( -brk_block_z/2,
176 rectfromto([ -brk_block_xw/2, adapt_main_top_y - 0.1 ],
177 [ +brk_block_xw/2, 0 ]);
181 // Z origin is bolt hole
183 linextr_y_xz( -100, 10 )
184 circle(brk_bolt_dia/2);
186 linextr_y_xz( -brk_nearbolt_recess_depth, 10)
187 circle(brk_nearbolt_recess_dia/2);
189 linextr_y_xz( -100, brk_bolt_nut_top_y ) {
190 circle( r= brk_bolt_nut_r, $fn = 6 );
191 translate([ 0, brk_bolt_nut_across_flats/2 ])
192 circle( r=brk_bolt_nut_r/2, $fn = 4);
196 module AsForeAftMaint(){
197 if ($foreaftmaint_dz) {
204 $rack_rail_y = brk_bottom_y - $elevation_nominal
205 - general_gap_y - rack_rail_dia/2;
207 $strap_barrel_y = $rack_rail_y + rack_rail_dia/2 + strap_barrel_dia/2;
209 $rail_fixing_fit_corner = [
211 $rack_rail_y - rack_rail_dia/2
214 $foreaftmaint_rail_z = brk_block_z/2 + $foreaftmaint_dz;
215 $foreaftmaint_rail_y = $rack_rail_y
216 + $foreaftmaint_rail_z * rack_shear_ratio;
223 RackShear() MainExtrude(){
224 StrapBarrelElevation();
226 translate([ 0,0, brk_block_z/2]) {
235 RackShear() MainExtrude(){
236 GraspFixingElevation();
240 translate([0,0, main_sz_z/2]) linextr(-strap_w/2, +strap_w/2) {
241 translate([ rack_width_inner/2 - strap_th, 0 ])
242 rectfromto([ 0, -50 ], [ 50, 50 ]);
246 RackShear() AsForeAftMaint(){
247 linextr_x_yz(-main_sz_x_fam/2,
252 rectfromto([ -$foreaftmaint_rail_z, adapt_main_top_y ],
255 ybot = $foreaftmaint_rail_y - rack_rail_dia/2 + grasp_large_r
256 - fit_slope_len * 0.5;
259 adapt_main_top_y - grasp_large_r
261 for (dx= [-1,+1] * rack_rail_dia/2)
262 translate([ -$foreaftmaint_rail_z + dx, y ])
263 circle(r= grasp_large_r);
266 translate([0, adapt_main_top_y])
267 rectfromto([-500, 0], [500, 500]);
273 RackShear() linextr(-10, main_sz_z+10) {
276 translate([ rack_rail_x, $rack_rail_y ]){
278 for (dx = [-rack_rail_dia, 0])
280 circle(r= rack_rail_dia/2);
287 // Distance from bolt hole, in backwards direction
288 RackShear() AsForeAftMaint(){
289 cr = rack_rail_dia/2 + foreaftmaint_r_slop;
290 translate([ 0, $foreaftmaint_rail_y, $foreaftmaint_rail_z ])
291 linextr_x_yz(+rack_rail_x,
300 for (dd=[[0,0], [-1,-1], [-1,+1]]) {
302 [-1, 0] * (rack_rail_dia - fit_slope_len)
311 translate([ 0,0, brk_block_z/2]) BoltHole();
315 module Front(){ ////toplevel
316 // xxx elevation is wrong
317 Principal($elevation_nominal=0, $foreaftmaint_dz=0);
320 module Rear(){ ////toplevel
321 Principal($elevation_nominal=rear_elevation_nominal,
322 $foreaftmaint_dz= rear_to_cross_rail);
330 translate([ 0, -2, -4 ])
331 square(center=true, [ brk_overall_w, 1 ]);
336 module FrontDemo(){ ////toplevel
339 module RearDemo(){ ////toplevel