Skip to content

Commit ab7e21d

Browse files
committed
button shell test
1 parent a9328a8 commit ab7e21d

File tree

2 files changed

+87
-0
lines changed

2 files changed

+87
-0
lines changed

buttonTest.scad

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
2+
module Button(gapWidth=1, gapHeight=0.4, armWidth=9){
3+
$fn=100;
4+
rampeWidth = (2-gapHeight)/tan(60);
5+
cylinder(2,4,4);
6+
translate([0,-3,0]) cube([armWidth,6,gapHeight]);
7+
translate([armWidth,-3,gapHeight]) mirror([1,0,0]) rampe(2-gapHeight);
8+
translate([armWidth-2*rampeWidth-gapWidth,-3,gapHeight]) rampe(2-gapHeight);
9+
translate([0,-3,0]) cube([armWidth-2*rampeWidth-gapWidth,6,2]);
10+
}
11+
12+
module ButtonCutOut(armWidth=9){
13+
$fn=100;
14+
cylinder(2.2,5,5);
15+
translate([0,-4,0]) cube([armWidth,8,2.2]);
16+
}
17+
18+
module rampe(height=2){
19+
a = height/tan(60);
20+
c = height/sin(60);
21+
d = a*cos(30);
22+
difference(){
23+
cube([a,6,height]);
24+
translate([a,0,0]) rotate([0,330,0]) cube([d,6,c]);
25+
}
26+
}
27+
28+
$fn = 100;
29+
difference(){
30+
cube([96,76,2]);
31+
translate([3,3,1]) cylinder(2,1,1);
32+
//first row
33+
translate([14,14,-0.1]) ButtonCutOut();
34+
translate([14,30,-0.1]) ButtonCutOut();
35+
translate([14,46,-0.1]) ButtonCutOut();
36+
translate([14,62,-0.1]) ButtonCutOut();
37+
38+
//second row
39+
translate([35,14,-0.1]) ButtonCutOut();
40+
translate([35,30,-0.1]) ButtonCutOut();
41+
translate([35,46,-0.1]) ButtonCutOut();
42+
translate([35,62,-0.1]) ButtonCutOut();
43+
44+
//third row
45+
translate([56,14,-0.1]) ButtonCutOut();
46+
translate([56,30,-0.1]) ButtonCutOut();
47+
translate([56,46,-0.1]) ButtonCutOut();
48+
translate([56,62,-0.1]) ButtonCutOut();
49+
50+
//fourth row
51+
translate([77,14,-0.1]) ButtonCutOut();
52+
translate([77,30,-0.1]) ButtonCutOut();
53+
translate([77,46,-0.1]) ButtonCutOut();
54+
translate([77,62,-0.1]) ButtonCutOut();
55+
}
56+
57+
//first row gapWidth=0.5
58+
translate([14,14,0]) Button(gapWidth=0.5, gapHeight=0.4);
59+
translate([14,30,0]) Button(gapWidth=0.5, gapHeight=0.6);
60+
translate([14,46,0]) Button(gapWidth=0.5, gapHeight=0.8);
61+
translate([14,62,0]) Button(gapWidth=0.5, gapHeight=1);
62+
63+
//second row gapWidth=1
64+
translate([35,14,0]) Button(gapWidth=1, gapHeight=0.4);
65+
translate([35,30,0]) Button(gapWidth=1, gapHeight=0.6);
66+
translate([35,46,0]) Button(gapWidth=1, gapHeight=0.8);
67+
translate([35,62,0]) Button(gapWidth=1, gapHeight=1);
68+
69+
//third row gapWidth=2
70+
translate([56,14,0]) Button(gapWidth=2, gapHeight=0.4);
71+
translate([56,30,0]) Button(gapWidth=2, gapHeight=0.6);
72+
translate([56,46,0]) Button(gapWidth=2, gapHeight=0.8);
73+
translate([56,62,0]) Button(gapWidth=2, gapHeight=1);
74+
75+
//fourth row gapWidth=3
76+
translate([77,14,0]) Button(gapWidth=3, gapHeight=0.4);
77+
translate([77,30,0]) Button(gapWidth=3, gapHeight=0.6);
78+
translate([77,46,0]) Button(gapWidth=3, gapHeight=0.8);
79+
translate([77,62,0]) Button(gapWidth=3, gapHeight=1);

shell.scad

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/*TODO
2+
- Schauen wie lang die Schrauben sind damit passende Löcher gemacht werden
3+
- Buttoncutouts hinzufügen mit Buttonerhöhung
4+
- connectorcutout hinzufügen
5+
- Displaycutout und wand hinzufügen
6+
- Halterungen für PCBs erstellen
7+
*/
8+
19
//connector-board
210
module connectorBoard(height=6){
311
$fn=100;

0 commit comments

Comments
 (0)