aboutsummaryrefslogtreecommitdiff
path: root/parts/tetrahedron_connector.scad
blob: eb345d255887fde1b7cc80b8e9ed50e87dcc1aa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
radius = 8.25;
inner_radius = 13.5;
wall = 6;
top_wall = 6;
len = 40;
cut = 10;

module external(radius, wall, len, top_wall) {
    w = len/2+radius+(radius+wall)*sin(60) ;
    h = (radius + wall) / 2;
    difference() {
        translate([-len/2-radius,0,0]) rotate([0,30,0]) cylinder(r = radius + wall, h = len + top_wall); 
        translate ([-w,-w,-h]) cube([w*2, w*2, h*2]);
    }
}

module tube(radius, wall, len) {
    translate([-len/2-radius,0,0]) rotate([0,30,0]) translate([0,0,-wall/2]) cylinder(r = radius, h = len);
}

difference() {
    union() {
        hull() {
            external(radius, wall, len, top_wall);
            rotate([0,0,120]) external(radius, wall, len, top_wall);
            rotate([0,0,-120]) external(radius, wall, len, top_wall);
        }
        difference() {
            translate([0,0,-(radius + wall) / 2]) hull() {
                external(radius, wall*3, len, top_wall);
                rotate([0,0,120]) external(radius, wall*3, len, top_wall);
                rotate([0,0,-120]) external(radius, wall*3, len, top_wall);
            }
            translate([0,0,len/2]) rotate([0,10,0]) cylinder(r=(len+wall), h=cut);
        }
    }
    tube(radius, wall, len);
    rotate([0,0,120]) tube(radius, wall, len);
    rotate([0,0,-120]) tube(radius, wall, len);
}