Skip to content

Commit d16a2c0

Browse files
author
Sean Donnellan
committed
ner final version with rouded top... plus test text
1 parent 105fbcb commit d16a2c0

1 file changed

Lines changed: 21 additions & 10 deletions

File tree

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,34 @@
1-
//Draft button for radio replacement
2-
//Draft structure only not real measurments yet
3-
//Shape should be approx correct
4-
//might round corners of top button of needed
5-
1+
//button for radio tape counter reset replacement
2+
$fn=360;
3+
r = 6 ; //This SHOULD NOT be less than 1/2 of top z
64
buttonTop = [4,4,11] ;
75
buttonBottom = [5,5,6] ;
86
buttonBottomCavity = [3.1,3.1,7] ;
97
buttonBrim = [6,6,1] ;
108
wiggle = .01;
11-
#difference () {
9+
textDepth = 1;
10+
11+
module topButton(){
12+
difference(){
13+
intersection(){
14+
//the button (top)
15+
cube(buttonTop);
16+
//the sphere to be the rounded top (should always be larger (r) than the z of button/2 or button will be
17+
translate([buttonTop.x/2,buttonTop.y/2,-r+buttonTop.z]) sphere(r);
18+
}
19+
translate([buttonTop.x/2,buttonTop.y/2,buttonTop.z-textDepth]) linear_extrude(textDepth+wiggle)text("K",valign="center",halign="center",size=3.5);
20+
}
21+
}
22+
23+
difference () {
1224
union(){
1325
//bottom
1426
cube(buttonBottom);
15-
//Brim
16-
translate([buttonBottom.x/2-buttonTop.x/2,buttonBottom.y/2-buttonTop.y/2,buttonBottom.z]) cube(buttonTop);
1727
//top
28+
translate([buttonBottom.x/2-buttonTop.x/2,buttonBottom.y/2-buttonTop.y/2,buttonBottom.z]) topButton();
29+
//brim
1830
translate([buttonBottom.x/2-buttonBrim.x/2,buttonBottom.y/2-buttonBrim.y/2,buttonBottom.z]) cube(buttonBrim);
1931
}
2032
//cavity
2133
translate([buttonBottom.x/2-buttonBottomCavity.x/2,buttonBottom.y/2-buttonBottomCavity.y/2,-wiggle]) cube(buttonBottomCavity+[0,0,wiggle]);
22-
}
23-
translate([buttonBottom.x/2-buttonBottomCavity.x/2,buttonBottom.y/2-buttonBottomCavity.y/2,-wiggle]) cube(buttonBottomCavity+[0,0,wiggle]);
34+
}

0 commit comments

Comments
 (0)