-
Notifications
You must be signed in to change notification settings - Fork 189
/
sa_ergo.scad
53 lines (45 loc) · 2.13 KB
/
sa_ergo.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
49
50
51
52
53
include <../includes.scad>
/*
In this example, we harness full sculpting and simple_layout to make a set of SA
keys that look a lot like the key wells on a dactyl, dactyl manuform, or kinesis
SA keys render faster with skin_extrude_shape = true, but then they don't get
the nice flaring on the sides... yet.
*/
// to turn on full sculpting
$double_sculpted = true;
// to make the font fit
$font_size = 4;
// change this to make the full sculpting more or less aggressive. 200 is default
$double_sculpt_radius = 200;
// This is the exact column stagger from the dactyl transposed onto the
// rows of the preonic default layout. the second array is for modifying the
// values up or down - making all the 0's -1's would make each key 1mm lower
// for instance. I'd suggest going as low as you can without cutting off any stems
extra_column_height = [5.64, 5.64, 0, -3, 0, 0, 0, 0, 0, -3, 0, 5.64, 5.64] + [0,0,0,0,0,0,0,0,0,0,0,0,0];
// required for double_sculpted_column
row_length = len(preonic_default_layout[0]);
simple_layout(preonic_default_layout) {
// this union is here because, for some reason, you cannot modify special variables
// that are modified in the scope directly above.
union() {
// row declarations treat column 0 as perfectly center, so if we just used
// $column we'd have a ridiculously looking left-leaning keyboard.
// this function transforms the actual column value into a "2hands" column
// value, aka for a board with 2 "keywells", one for each hand
column_value = double_sculpted_column($column, row_length, "2hands");
/* echo("column value", column_value); */
sa_row($row+1, column_value){
// uh oh, now I need two of them...
union() {
// uncomment when prototyping for faster prototypes!
/* $dish_type = "disable"; */
/* $stem_support_type = "disable"; */
// here's where the magic happens and we actually add the extra column height
$total_depth = $total_depth + extra_column_height[$column];
key();
// this generates separate legends for the keys
/* legend(preonic_default_legends[$row][$column]) legends(); */
}
}
}
}