]> www.fi.muni.cz Git - things.git/blob - tube-end.scad
generic carbon tube ending
[things.git] / tube-end.scad
1 infty = 100;
2 eps = 0.01;
3
4 tube_d = 6 + 0.7;
5 hole_h = 6;
6
7 wall = 1;
8
9 outer_d1 = tube_d + 2*wall;
10 outer_d2 = tube_d + 2*wall + hole_h * 0.7;
11 top_h = outer_d2/4;
12
13 difference() {
14         hull() {
15                 cylinder(r1 = outer_d1/2, r2 = outer_d2/2, h = hole_h, $fn = 16);
16                 translate([0, 0, hole_h]) scale([1, 1, top_h*2/outer_d2])
17                         sphere(outer_d2/2, $fn = 16);
18         }
19         translate([0, 0, -eps])
20                 cylinder(r = tube_d/2, h = hole_h + eps, $fn = 16);
21 }
22