mirror of
https://github.com/rsheldiii/KeyV2.git
synced 2024-11-29 16:13:06 +00:00
add customizer script, fix height bug
This commit is contained in:
parent
aa795c4958
commit
48883bd8b1
1233
customizer.scad
Normal file
1233
customizer.scad
Normal file
File diff suppressed because it is too large
Load Diff
@ -5,9 +5,6 @@
|
|||||||
// without having to rely on this file. Unfortunately that means setting tons of
|
// without having to rely on this file. Unfortunately that means setting tons of
|
||||||
// special variables, but that's a limitation of SCAD we have to work around
|
// special variables, but that's a limitation of SCAD we have to work around
|
||||||
|
|
||||||
//TODO duplicate def to not make this a special var. maybe not worth it
|
|
||||||
unit = 19.05;
|
|
||||||
|
|
||||||
use <src/key.scad>
|
use <src/key.scad>
|
||||||
|
|
||||||
include <src/settings.scad>
|
include <src/settings.scad>
|
||||||
@ -16,10 +13,6 @@ include <src/key_profiles.scad>
|
|||||||
include <src/key_types.scad>
|
include <src/key_types.scad>
|
||||||
include <src/key_transformations.scad>
|
include <src/key_transformations.scad>
|
||||||
|
|
||||||
module translate_u(x=0, y=0, z=0){
|
|
||||||
translate([x * unit, y*unit, z*unit]) children();
|
|
||||||
}
|
|
||||||
|
|
||||||
// basic
|
// basic
|
||||||
cherry() key();
|
cherry() key();
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ module inside() {
|
|||||||
// put something at the top of the key, with no adjustments for dishing
|
// put something at the top of the key, with no adjustments for dishing
|
||||||
module top_placement(depth_difference) {
|
module top_placement(depth_difference) {
|
||||||
translate([$dish_skew_x, $top_skew + $dish_skew_y, $total_depth - 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();
|
children();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,3 +6,18 @@ include <key_profiles/oem.scad>
|
|||||||
include <key_profiles/dsa.scad>
|
include <key_profiles/dsa.scad>
|
||||||
include <key_profiles/sa.scad>
|
include <key_profiles/sa.scad>
|
||||||
include <key_profiles/g20.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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
// kind of a catch-all at this point for any directive that doesn't fit in the other files
|
// 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() {
|
module brimmed() {
|
||||||
$has_brim = true;
|
$has_brim = true;
|
||||||
children();
|
children();
|
||||||
|
Loading…
Reference in New Issue
Block a user