chiark / gitweb /
topeak-mtx-tortec-expeditionrack-adapter: wip
[reprap-play.git] / topeak-mtx-tortec-expeditionrack-adapter.scad
1 // -*- C -*-
2
3 // brk_*: "bracket", the Topeak MTX bracket
4 // rack_*: the Tortec rack
5 // adapt_*: the adapter, ie this file
6
7 include <utils.scad>
8
9 brk_recess_actual = 5.20;
10
11 rack_rail_dia = 10.40 + 0.50;
12 rack_width_inner = 115.86 + 1.0; // between insides of rails
13
14 rear_elevation_nominal = 10.04; // top of rack to bottom of bracket
15 rear_to_front_distance = 230;
16
17 general_gap_y = 1.0;
18
19 main_sz_z = 20; // xxx
20 main_sz_y = 20;
21 grasp_sz = 12;
22
23 // calculated
24
25 brk_bottom_y = -brk_recess_actual;
26 adapt_main_top_y = brk_bottom_y + general_gap_y;
27
28 // on LHS, so -ve
29 rack_rail_x = -(rack_width_inner + rack_rail_dia/2);
30 rack_rail_outer_x = -(rack_width_inner + rack_rail_dia);
31
32 grasp_large_r = (rack_rail_dia + grasp_sz)/2;
33 grasp_large_x = rack_rail_outer_x + grasp_large_r;
34
35 module Principal(){
36   // calculated
37   $rack_rail_y = brk_bottom_y - $elevation_nominal
38     - general_gap_y  - rack_rail_dia/2;
39
40   difference(){
41     linextr(0, main_sz_z){
42       hull(){
43         translate([ grasp_large_x, adapt_main_top_y - grasp_large_r ])
44           circle(grasp_large_r);
45       
46         translate([ grasp_large_x, $rack_rail_y - rack_rail_dia/2 ])
47           circle(grasp_large_r);
48
49         translate([ grasp_large_x, $rack_rail_y + rack_rail_dia/2 ])
50           circle(grasp_large_r);
51       }
52     }
53
54     linextr(-10, main_sz_z+10) {
55       translate([ rack_rail_x, $rack_rail_y ]){
56         hull(){
57           for (dx = [-rack_rail_dia, 0])
58             translate([dx, 0])
59               circle(r= rack_rail_dia/2);
60         }
61       }    
62     }
63   }
64 }
65
66 Principal($elevation_nominal=0);