-
Notifications
You must be signed in to change notification settings - Fork 0
/
keyboard-support.scad
48 lines (40 loc) · 1.1 KB
/
keyboard-support.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
ph=102;
pt=1.8;
om=3;
im=3;
hm=2;
pw=200;
plate_size=[pw, ph, pt];
plate_size2=[pw, ph, 0];
outer_margin=[om, om, hm];
inner_margin=[im, im, 0];
module wedge()
{
rotate(v=[0,1,0], a=90)
linear_extrude(height=pw+om*2, center=true)
{
rotate(v=[0,0,1], a=90)
polygon([[-(ph/2 + om), -(pt/2 + hm)], [ph/2 + om, -(pt/2 + hm)],
[ph/2 + om, pt/2 + hm + 13], [-(ph/2 + om), pt/2 + hm + 5]]);
}
}
rotate(v=[0,1,0], a=-90)
difference()
{
difference()
{
difference()
{
scale([1,1,-1]) wedge();
cube(size=plate_size, center=true);
}
union()
{
cube(size=plate_size2 - 2*inner_margin + 2*[0, 0, 99], center=true);
cube(size=plate_size2 - 2*inner_margin + 2*[-10, 99, 99], center=true);
translate([0,0,-(pt/2+hm+10)]) cube(size=plate_size2 - 2*inner_margin + 2*[0, 99, 10], center=true);
translate([0,0,-(pt/2+hm+10)]) cube(size=plate_size2 - 2*inner_margin + 2*[99, 0, 10], center=true);
}
}
translate([100, 0, 0]) cube(size=[200,200,100], center=true);
}