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; // top of rack to bottom of bracket
19 rear_to_front_distance = 230;
25 strap_barrel_dia = 14;
29 brk_block_z = 14.55 - 0.75;
31 brk_bolt_dia = 4.0 + 0.5;
32 brk_nearbolt_recess_dia = 8.86 + 1.5;
33 brk_nearbolt_recess_depth = 1.09 + 0.25;
35 brk_bolt_eff_len = 11.78 - 1.0; // inside of recess, to end of bolt
36 brk_bolt_len_slop = 2.0;;
37 brk_bolt_nut_th = 3.89;
38 brk_bolt_nut_across_flats = 7.86 + 0.50;
40 brk_overall_w = 90.07;
44 foreaftmaint_r_slop = 0.75;
46 main_sz_y = $strf * 20;
47 grasp_sz = $strf * 12;
48 beside_strap_sz = $strf * 8;
55 main_sz_z = beside_strap_sz*2 + strap_w;
57 brk_bottom_y = -brk_recess_actual;
58 adapt_main_top_y = brk_bottom_y + general_gap_y;
61 rack_rail_x = -(rack_width_inner/2 + rack_rail_dia/2);
62 rack_rail_outer_x = -(rack_width_inner/2 + rack_rail_dia);
64 grasp_large_r = (rack_rail_dia + grasp_sz)/2;
65 grasp_large_x = rack_rail_outer_x + grasp_large_r;
67 block_x = grasp_large_x + grasp_large_r/2;
68 block_y_min = adapt_main_top_y - main_sz_y;
70 strap_barrel_x = rack_width_inner/2 + strap_barrel_dia/2;
72 rack_shear_ratio = rear_elevation_nominal / rear_to_front_distance;
74 brk_bolt_nut_top_y = -brk_nearbolt_recess_depth
75 - brk_bolt_eff_len + brk_bolt_nut_th + brk_bolt_len_slop;
77 brk_bolt_nut_r = brk_bolt_nut_across_flats/2 / cos(360/12);
79 module GraspElevation(){
81 translate([ grasp_large_x, adapt_main_top_y - grasp_large_r ])
82 circle(grasp_large_r);
84 translate([ grasp_large_x, $rack_rail_y - rack_rail_dia/2 ])
85 circle(grasp_large_r);
87 translate([ grasp_large_x, $rack_rail_y + rack_rail_dia/2 ])
88 circle(grasp_large_r);
92 module BlockElevation(){
94 rectfromto([ +block_x, adapt_main_top_y ],
95 [ -block_x, block_y_min ]);
96 rectfromto([ -grasp_large_x, adapt_main_top_y ],
97 [ +grasp_large_x, adapt_main_top_y - 0.1 ]);
101 module MainExtrude(){
102 linextr(0, main_sz_z)
106 s = rack_shear_ratio;
107 multmatrix([ [ 1, 0, 0, 0 ],
114 module GraspFixingElevation(){
117 mirror([1,0]) GraspElevation();
118 translate([ strap_barrel_x, $strap_barrel_y ])
119 circle(strap_barrel_dia/2 + strap_guide_sz);
122 rectfromto([0, $rack_rail_y],
123 [rack_width_inner, 50]);
125 translate([ rack_rail_x, $rack_rail_y ])
126 circle(r = rack_width_inner/2 - rack_rail_x);
128 [ rack_width_inner/2, 0 ],
129 $rail_fixing_fit_corner,
130 $rail_fixing_fit_corner + [-1,-1] * fit_slope_len,
131 [ -block_x, block_y_min ],
132 [ 0, block_y_min ]]);
138 module StrapBarrelElevation(){
139 translate([ strap_barrel_x, $strap_barrel_y ])
140 circle(strap_barrel_dia/2);
143 // Bracket support block, goes up inside bracket
144 // Z origin is bolt hole
146 linextr( -brk_block_z/2,
148 rectfromto([ -brk_block_xw/2, adapt_main_top_y - 0.1 ],
149 [ +brk_block_xw/2, 0 ]);
153 // Z origin is bolt hole
155 linextr_y_xz( -100, 10 )
156 circle(brk_bolt_dia/2);
158 linextr_y_xz( -brk_nearbolt_recess_depth, 10)
159 circle(brk_nearbolt_recess_dia/2);
161 linextr_y_xz( -100, brk_bolt_nut_top_y ) {
162 circle( r= brk_bolt_nut_r, $fn = 6 );
163 translate([ 0, brk_bolt_nut_across_flats/2 ])
164 circle( r=brk_bolt_nut_r/2, $fn = 4);
170 $rack_rail_y = brk_bottom_y - $elevation_nominal
171 - general_gap_y - rack_rail_dia/2;
173 $strap_barrel_y = $rack_rail_y + rack_rail_dia/2 + strap_barrel_dia/2;
175 $rail_fixing_fit_corner = [
177 $rack_rail_y - rack_rail_dia/2
180 $foreaftmaint_rail_z = brk_block_z/2 + $foreaftmaint_dz;
181 $foreaftmaint_rail_y = $rack_rail_y
182 + $foreaftmaint_rail_z * rack_shear_ratio;
189 RackShear() MainExtrude(){
190 StrapBarrelElevation();
192 translate([ 0,0, brk_block_z/2]) {
201 RackShear() MainExtrude(){
202 GraspFixingElevation();
206 translate([0,0, main_sz_z/2]) linextr(-strap_w/2, +strap_w/2) {
207 translate([ rack_width_inner/2 - strap_th, 0 ])
208 rectfromto([ 0, -50 ], [ 50, 50 ]);
213 RackShear() linextr(-10, main_sz_z+10) {
216 translate([ rack_rail_x, $rack_rail_y ]){
218 for (dx = [-rack_rail_dia, 0])
220 circle(r= rack_rail_dia/2);
227 // Distance from bolt hole, in backwards direction
228 if ($foreaftmaint_dz) {
229 translate([ 0, $foreaftmaint_rail_y, $foreaftmaint_rail_z ]){
230 linextr_x_yz(+rack_rail_x,
235 circle(r= rack_rail_dia/2 + foreaftmaint_r_slop);
242 translate([ 0,0, brk_block_z/2]) BoltHole();
246 module Front(){ ////toplevel
247 Principal($elevation_nominal=0, $foreaftmaint_dz=0);
250 module Rear(){ ////toplevel
251 Principal($elevation_nominal=rear_elevation_nominal,
252 $foreaftmaint_dz= 9.65);
255 module Demo(){ ////toplevel
261 translate([ 0, -2, -4 ])
262 square(center=true, [ brk_overall_w, 1 ]);