2017-08-14 02:15:42 +10:00
|
|
|
// the point of this file is to be a sort of DSL for constructing keycaps.
|
|
|
|
// when you create a method chain you are just changing the parameters
|
|
|
|
// key.scad uses, it doesn't generate anything itself until the end. This
|
2017-10-17 15:50:48 +11:00
|
|
|
// lets it remain easy to use key.scad like before (except without key profiles)
|
2017-08-14 02:15:42 +10:00
|
|
|
// without having to rely on this file. Unfortunately that means setting tons of
|
2017-09-25 14:04:34 +10:00
|
|
|
// special variables, but that's a limitation of SCAD we have to work around
|
2017-08-14 02:15:42 +10:00
|
|
|
|
2020-02-23 13:11:33 +11:00
|
|
|
include <./includes.scad>
|
2017-09-29 02:39:11 +10:00
|
|
|
|
2017-08-12 15:10:48 +10:00
|
|
|
|
2022-10-08 03:48:06 +11:00
|
|
|
// $rounded_key = true;
|
2019-12-17 08:45:03 +11:00
|
|
|
// example key
|
2022-10-08 03:48:06 +11:00
|
|
|
// typewriter_row(5) legend("⇪", size=9) resin() key();
|
2019-12-17 08:45:03 +11:00
|
|
|
|
2022-10-08 03:48:06 +11:00
|
|
|
// // example row
|
|
|
|
// for(y = [0:1:3]) {
|
|
|
|
// for (x = [0:1:4]) {
|
|
|
|
// translate_u(x + y % 2 * 0.5,y) hex_row(x) key();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// $double_sculpted = true;
|
|
|
|
// row_length = len(preonic_mit_layout[0]);
|
|
|
|
// simple_layout(preonic_mit_layout) {
|
|
|
|
// $keycap_rotation = 90;
|
|
|
|
// // $stem_type = "choc";
|
|
|
|
// adjusted_column = [-1, -1/2, 0, 1/2, 0, -1/2, -1/2, 0, 1/2, 0, -1/2, -1];
|
|
|
|
// column_value = double_sculpted_column($column, row_length, "2hands");
|
|
|
|
// translate_u(0, adjusted_column[$column]) hex_row($row, column_value) {
|
|
|
|
// key();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// $hull_shape_type = "skin";
|
|
|
|
dsa_row(1) key();
|
|
|
|
translate_u(1) dsa_row(1) {
|
|
|
|
union() {
|
|
|
|
// $total_depth = 11;
|
|
|
|
$inverted_dish = true;
|
|
|
|
key();
|
|
|
|
}
|
|
|
|
}
|
2019-12-17 08:45:03 +11:00
|
|
|
|
|
|
|
// example layout
|
2022-01-12 06:43:41 +11:00
|
|
|
/* preonic_default("dcs") key(); */
|