add customizer script, fix height bug

This commit is contained in:
Bob - Home - Windows 2018-02-06 01:26:19 -05:00
parent aa795c4958
commit 48883bd8b1
5 changed files with 1256 additions and 8 deletions

View file

@ -122,7 +122,7 @@ module inside() {
// put something at the top of the key, with no adjustments for dishing
module top_placement(depth_difference) {
translate([$dish_skew_x, $top_skew + $dish_skew_y, $total_depth - depth_difference]){
rotate([-$top_tilt,0,0]){
rotate([-$top_tilt / top_total_key_height(),0,0]){
children();
}
}

View file

@ -6,3 +6,18 @@ include <key_profiles/oem.scad>
include <key_profiles/dsa.scad>
include <key_profiles/sa.scad>
include <key_profiles/g20.scad>
// man, wouldn't it be so cool if functions were first order
module key_profile(key_profile_type, row) {
if (key_profile_type == "dcs") {
dcs_row(row) children();
} else if (key_profile_type == "oem") {
oem_row(row) children();
} else if (key_profile_type == "dsa") {
dsa_row(row) children();
} else if (key_profile_type == "sa") {
sa_row(row) children();
} else if (key_profile_type == "g20") {
g20_row(row) children();
}
}

View file

@ -1,5 +1,12 @@
// kind of a catch-all at this point for any directive that doesn't fit in the other files
//TODO duplicate def to not make this a special var. maybe not worth it
unit = 19.05;
module translate_u(x=0, y=0, z=0){
translate([x * unit, y*unit, z*unit]) children();
}
module brimmed() {
$has_brim = true;
children();