]> www.fi.muni.cz Git - things.git/blob - handlebar-tube-plug.scad
switch holder.scad
[things.git] / handlebar-tube-plug.scad
1 infty = 100;
2 eps = 0.01;
3
4 base_h = 3;
5 base_d = 39;
6
7 tube_d1 = 27.5;
8 tube_h1 = 8;
9
10 tube_d2 = 23.5;
11 tube_h2 = 12;
12
13 tube_wall = 2;
14
15 // rotate([90, 0, 0])
16 difference() {
17         union() {
18                 difference() {
19                         cylinder(r = base_d/2, h = base_h, $fn = 128);
20                         translate([0, 0, base_h/2])
21                                 cylinder(r1 = base_d/2-2, r2 = base_d/2-1,
22                                         h = base_h/2+eps, $fn = 128);
23                 }
24                 translate([0, 0, base_h/2-eps])
25                         cylinder(r1 = tube_d1/2+1, r2 = tube_d1/2,
26                                 h = base_h/2+eps, $fn = 128);
27                 cylinder(r = tube_d1/2, h = base_h + tube_h1, $fn = 6);
28                 cylinder(r = tube_d2/2, h = base_h + tube_h1 + tube_h2, $fn = 6);
29         }
30         translate([0, 0, base_h])
31                 cylinder(r = tube_d2/2-tube_wall, h = tube_h1 + tube_h2 + eps, $fn = 6);
32         // for debugging
33         // translate([-infty/2, 3, -eps]) cube(infty);
34         // translate([-infty/2, -3-infty, -eps]) cube(infty);
35 }
36         
37