// -*- C -*- // brk_*: "bracket", the Topeak MTX bracket // rack_*: the Tortec rack // adapt_*: the adapter, ie this file include brk_recess_actual = 5.20; rack_rail_dia = 10.40 + 0.50; rack_width_inner = 115.86 + 1.0; // between insides of rails rear_elevation_nominal = 10.04; // top of rack to bottom of bracket rear_to_front_distance = 230; general_gap_y = 1.0; main_sz_z = 20; // xxx main_sz_y = 20; grasp_sz = 12; // calculated brk_bottom_y = -brk_recess_actual; adapt_main_top_y = brk_bottom_y + general_gap_y; // on LHS, so -ve rack_rail_x = -(rack_width_inner/2 + rack_rail_dia/2); rack_rail_outer_x = -(rack_width_inner/2 + rack_rail_dia); grasp_large_r = (rack_rail_dia + grasp_sz)/2; grasp_large_x = rack_rail_outer_x + grasp_large_r; module GraspElevation(){ hull(){ translate([ grasp_large_x, adapt_main_top_y - grasp_large_r ]) circle(grasp_large_r); translate([ grasp_large_x, $rack_rail_y - rack_rail_dia/2 ]) circle(grasp_large_r); translate([ grasp_large_x, $rack_rail_y + rack_rail_dia/2 ]) circle(grasp_large_r); } } module BlockElevation(){ rectfromto([ -rack_width_inner/2, adapt_main_top_y ], [ +rack_width_inner/2, adapt_main_top_y - main_sz_y ]); } module Principal(){ // calculated $rack_rail_y = brk_bottom_y - $elevation_nominal - general_gap_y - rack_rail_dia/2; difference(){ linextr(0, main_sz_z){ GraspElevation(); BlockElevation(); mirror([1,0]) GraspElevation(); } linextr(-10, main_sz_z+10) { for (mx=[0,1]) { mirror([mx,0]) { translate([ rack_rail_x, $rack_rail_y ]){ hull(){ for (dx = [-rack_rail_dia, 0]) translate([dx, 0]) circle(r= rack_rail_dia/2); } } } } } } } Principal($elevation_nominal=0);