2017-08-13 16:15:42 +00: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 04:50:48 +00:00
|
|
|
// lets it remain easy to use key.scad like before (except without key profiles)
|
2017-08-13 16:15:42 +00:00
|
|
|
// without having to rely on this file. Unfortunately that means setting tons of
|
2017-09-25 04:04:34 +00:00
|
|
|
// special variables, but that's a limitation of SCAD we have to work around
|
2017-08-13 16:15:42 +00:00
|
|
|
|
2017-08-12 05:10:48 +00:00
|
|
|
//TODO duplicate def to not make this a special var. maybe not worth it
|
|
|
|
unit = 19.05;
|
|
|
|
|
2017-12-20 05:47:03 +00:00
|
|
|
use <src/key.scad>
|
2017-09-28 16:39:11 +00:00
|
|
|
|
2017-12-20 05:47:03 +00:00
|
|
|
include <src/settings.scad>
|
|
|
|
include <key_sizes.scad>
|
|
|
|
include <key_profiles.scad>
|
|
|
|
include <key_types.scad>
|
|
|
|
include <key_transformations.scad>
|
2017-08-12 05:10:48 +00:00
|
|
|
|
2017-08-13 07:04:53 +00:00
|
|
|
module translate_u(x=0, y=0, z=0){
|
|
|
|
translate([x * unit, y*unit, z*unit]) children();
|
|
|
|
}
|
|
|
|
|
2018-02-04 19:33:12 +00:00
|
|
|
// basic
|
|
|
|
cherry() key();
|
|
|
|
|
|
|
|
translate_u(1) sa_row(2) cherry() key("q");
|
|
|
|
translate_u(2) oem_row(2) alps() key("q", inset=true);
|
|
|
|
translate_u(3) dsa_row() rounded_cherry() key();
|
|
|
|
|
|
|
|
translate_u(1, 1) sa_row(3) lshift() cherry() key(inset=true) {
|
|
|
|
sphere(1);
|
|
|
|
};
|
|
|
|
|
|
|
|
translate_u(3, 2) sa_row(3) bar_support() spacebar() cherry() key("space bar");
|
|
|
|
|
|
|
|
translate_u(3,1) sa_row(3) 2u() cherry() {
|
|
|
|
$key_shape_type = "spherical";
|
|
|
|
$support_type = false;
|
|
|
|
$inverted_dish = true;
|
2018-01-30 17:01:38 +00:00
|
|
|
key();
|
|
|
|
}
|