@@ -27,7 +27,7 @@ module hole() {
27
27
28
28
module handlebar()
29
29
{
30
- # translate ((50 ) / 2 * y - 18.5 * z)rotate ([90 , 0 , 0 ])cylinder (d = 25.4 , h = 50 );
30
+ translate ((50 ) / 2 * y - 18.5 * z)rotate ([90 , 0 , 0 ])cylinder (d = 25.4 , h = 50 );
31
31
}
32
32
33
33
module cable() {
@@ -41,7 +41,7 @@ module button(detail = true) {
41
41
difference () {
42
42
union () {
43
43
translate (z4 * z)cube (sizef, center = true );
44
- translate (- 4 * z)cube ([7 , cxy + 16 , 8 ], center = true );
44
+ if (detail) translate (- 4 * z)cube ([7 , cxy + 16 , 8 ], center = true );
45
45
}
46
46
47
47
if (detail) {
@@ -51,23 +51,24 @@ module button(detail = true) {
51
51
cable();
52
52
}
53
53
}
54
- difference () {
54
+ if (detail) difference () {
55
55
translate (- 0.1 * z)cube ([7 , cxy + 16 , 0.2 ], center = true );
56
56
hole();
57
57
}
58
58
}
59
59
60
60
button();
61
61
62
- module rubber_ring() {
62
+ module rubber_ring(inner=false ) {
63
63
translate (- 18.5 * z)
64
64
rotate ([90 , 0 , 0 ])
65
65
rotate_extrude()
66
66
translate ([25.4 / 2 + 1.5 + 1 , 0 , 0 ])
67
67
{
68
68
hull () {
69
69
circle(d = 3 );
70
- translate ([5 , 0 , 0 ])circle(d = 3 );}
70
+ translate ([inner?- 5 :5 , 0 , 0 ])circle(d = 3 );
71
+ }
71
72
}
72
73
}
73
74
@@ -87,23 +88,23 @@ module bottom_shape(diam = 5) {
87
88
88
89
// rotate(-x*90)linear_extrude(cxy-5*3)
89
90
module bottom(width = cxy, diam = 5) {
90
- rotate (- x * 90 )linear_extrude(cxy - diam) projection(cut = true ) {
91
+ rotate (- x * 90 )linear_extrude(width - diam) projection(cut = true ) {
91
92
rotate (x * 90 )bottom_shape(diam);
92
93
}
93
94
difference () {
94
95
bottom_shape(diam);
95
- translate (y * 20 )cube ([40 , 40 , 40 ], center = true );
96
+ translate (y * ( 20 + 0.01 ) )cube ([40 , 40 , 40 ], center = true );
96
97
}
97
98
translate (y * (width - diam))difference () {
98
99
bottom_shape(diam);
99
- translate (- y * 20 )cube ([40 , 40 , 40 ], center = true );
100
+ translate (- y * ( 20 + 0.01 ) )cube ([40 , 40 , 40 ], center = true );
100
101
}
101
102
}
102
103
103
104
translate (y * 25 ) bottom();
104
105
module buttoncutter(spacing = .5) {
105
106
translate (- (spacing + 3.5 ) * z)minkowski () {
106
- cube (spacing,center= true );
107
+ cube (spacing, center = true );
107
108
union () {button(detail = false );
108
109
hull () {
109
110
linear_extrude(1 )translate ((- cxy / 2 - 1 ) * (x + y))square([cxy + 2 , cxy + 2 ]);
@@ -114,18 +115,20 @@ module buttoncutter(spacing = .5) {
114
115
}
115
116
116
117
117
- module buttontop(wall= 3) {
118
- translate (- 6 * z)rounded_cherry_stem(6 , 5 , 4 );
119
- translate (- 6 * z)rounded_cherry_stem(6 , 5 , 4 );
118
+ module buttontop(wall = 3) {
119
+ translate (- 6 * z)rounded_cherry_stem(6 , 0.2 , 4 );
120
+ translate (- 6 * z)rounded_cherry_stem(6 , 0.2 , 4 );
120
121
difference () {
121
122
hull () {
122
123
translate (- z)linear_extrude(1 )translate ((- cxy / 2 - 1 ) * (x + y))square([cxy + 2 , cxy + 2 ]);
123
- translate (- 5 * z)linear_extrude(1 )translate ((- (cxy+ 5 + wall )/ 2 ) * (x + y))square([cxy + 5 + wall, cxy + 5 + wall]);
124
- translate (- 8 * z)linear_extrude(1 )translate ((- (cxy+ 5 + wall )/ 2 ) * (x + y))square([cxy + 5 + wall, cxy + 5 + wall]);
124
+ translate (- 5 * z)linear_extrude(1 )translate ((- (cxy + 5 + wall) / 2 ) * (x + y))square([cxy + 5 + wall, cxy +
125
+ 5 + wall]);
126
+ translate (- 11 * z)linear_extrude(1 )translate ((- (cxy + 5 + wall) / 2 ) * (x + y))square([cxy + 5 + wall, cxy +
127
+ 5 + wall]);
125
128
126
129
}
127
130
translate (- z)buttoncutter();
128
-
131
+ # for (i = [ - 1 , 1 ]) translate ((cxy + 8 ) / 2 * y * i + z *- 6 ) rubber_ring( true );
129
132
}
130
133
}
131
134
0 commit comments