2017-08-16 05:59:19 +00:00
|
|
|
/*use <key.scad>*/
|
2017-08-16 19:49:01 +00:00
|
|
|
// NEED to include, not use this, even with the default variables set. don't know why
|
2017-08-16 05:59:19 +00:00
|
|
|
include <keys.scad>
|
|
|
|
|
2017-08-16 19:49:01 +00:00
|
|
|
60_percent = [
|
|
|
|
[1,1,1,1,1,1,1,1,1,1,1,1,1,2],
|
|
|
|
[1.5,1,1,1,1,1,1,1,1,1,1,1,1,1.5],
|
|
|
|
[1.75,1,1,1,1,1,1,1,1,1,1,1,2.25],
|
|
|
|
[2.25,1,1,1,1,1,1,1,1,1,1,2.75],
|
|
|
|
[1.25,1.25,1.25,6.25,1.25,1.25,1.25,1.25]
|
|
|
|
];
|
2017-08-16 05:59:19 +00:00
|
|
|
|
2017-08-16 19:49:01 +00:00
|
|
|
function sum(list, x=0) =
|
|
|
|
len(list) <= 1 ?
|
|
|
|
x + list[0] :
|
|
|
|
sum([for (x = [1: len(list) - 1]) list[x]], x+list[0]);
|
2017-08-16 05:59:19 +00:00
|
|
|
|
2017-10-17 04:50:48 +00:00
|
|
|
for (row = [0:len(60_percent)-1]){
|
|
|
|
for(column = [0:len(60_percent[row])-1]) {
|
2017-08-16 19:49:01 +00:00
|
|
|
columnDist = sum([for (x = [0 : column]) 60_percent[row][x]]);
|
|
|
|
a = 60_percent[row][column];
|
2018-02-13 02:36:36 +00:00
|
|
|
translate_u(columnDist - (a/2), -row) g20_row(3) u(a) cherry() { // (row+4) % 5 + 1
|
|
|
|
if (a == 6.25) {
|
2017-10-17 04:50:48 +00:00
|
|
|
spacebar() key();
|
2018-02-13 02:36:36 +00:00
|
|
|
} else if (a == 2.25) {
|
|
|
|
lshift() key();
|
|
|
|
} else if (a == 2) {
|
|
|
|
backspace() key();
|
|
|
|
} else if (a == 2.75) {
|
|
|
|
rshift() key();
|
|
|
|
} else {
|
|
|
|
key();
|
2017-08-17 06:09:17 +00:00
|
|
|
}
|
|
|
|
}
|
2017-08-16 05:59:19 +00:00
|
|
|
}
|
|
|
|
}
|