]> www.fi.muni.cz Git - things.git/blob - smartube-clip.scad
small control horn for rc plane
[things.git] / smartube-clip.scad
1 infty = 300;
2 eps = 0.01;
3
4 wall = 1.5;
5 t1_diam  = 10;
6 t2_diam  = 12;
7 cyl_h = 30;
8
9 module cyl_clip(d, angle) {
10         difference() {
11                 cylinder(r = d/2 + wall, h = cyl_h);
12                 translate([0, 0, -eps]) cylinder(r = d/2, h = cyl_h + 2*eps);
13                 intersection() {
14                         rotate([0, 0, 180 - angle/2])
15                                 translate([-infty/2, 0, -infty/2]) cube(infty);
16                         rotate([0, 0, angle/2])
17                                 translate([-infty/2, 0, -infty/2]) cube(infty);
18                 }
19         }
20 };
21
22 intersection() {
23         union() {
24                 rotate([-30, 0, 0])
25                 translate([-t1_diam/2-wall/2, 0, -cyl_h/2])
26                         color("blue")cyl_clip(t1_diam, 280);
27                 rotate([-30, 0, 180])
28                 translate([-t2_diam/2-wall/2, 0, -cyl_h/2])
29                         color("red") cyl_clip(t2_diam, 280);
30         };
31
32         translate([-infty/2, -infty/2, -7.5]) cube(infty);
33         translate([-infty/2, -infty/2, 7.5-infty]) cube(infty);
34 };
35