Merge pull request #146 from rsheldiii/v1/protruding-stems

V1: don't let stems protrude out the sides
This commit is contained in:
Bob 2022-02-21 12:40:06 -05:00 committed by GitHub
commit 47f7807231
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 29 deletions

View file

@ -5991,20 +5991,9 @@ module key(inset = false) {
if ($clearance_check) %clearance_check();
}
// both stem and support are optional
if ($stem_type != "disable" || ($stabilizers != [] && $stabilizer_type != "disable")) {
dished($keytop_thickness, $inverted_dish) {
translate([0, 0, $stem_inset]) {
if ($stabilizer_type != "disable") stems_for($stabilizers, $stabilizer_type);
if ($stem_type != "disable") stems_for($stem_positions, $stem_type);
}
}
}
if ($support_type != "disable"){
inside() {
translate([0, 0, $stem_inset]) {
inside() {
translate([0, 0, $stem_inset]) {
if ($support_type != "disable"){
if ($stabilizer_type != "disable") support_for($stabilizers, $stabilizer_type);
// always render stem support even if there isn't a stem.
@ -6012,6 +6001,12 @@ module key(inset = false) {
// so if you want a hollow keycap you'll have to turn support off entirely
support_for($stem_positions, $stem_type);
}
if ($stem_type != "disable" || ($stabilizers != [] && $stabilizer_type != "disable")) {
if ($stabilizer_type != "disable") stems_for($stabilizers, $stabilizer_type);
if ($stem_type != "disable") stems_for($stem_positions, $stem_type);
}
}
}
}

View file

@ -399,21 +399,9 @@ module key(inset = false) {
if ($clearance_check) %clearance_check();
}
// both stem and support are optional
if ($stem_type != "disable" || ($stabilizers != [] && $stabilizer_type != "disable")) {
inside()
dished($keytop_thickness, $inverted_dish) {
translate([0, 0, $stem_inset]) {
if ($stabilizer_type != "disable") stems_for($stabilizers, $stabilizer_type);
if ($stem_type != "disable") stems_for($stem_positions, $stem_type);
}
}
}
if ($support_type != "disable"){
inside() {
translate([0, 0, $stem_inset]) {
inside() {
translate([0, 0, $stem_inset]) {
if ($support_type != "disable"){
if ($stabilizer_type != "disable") support_for($stabilizers, $stabilizer_type);
// always render stem support even if there isn't a stem.
@ -421,6 +409,12 @@ module key(inset = false) {
// so if you want a hollow keycap you'll have to turn support off entirely
support_for($stem_positions, $stem_type);
}
if ($stem_type != "disable" || ($stabilizers != [] && $stabilizer_type != "disable")) {
if ($stabilizer_type != "disable") stems_for($stabilizers, $stabilizer_type);
if ($stem_type != "disable") stems_for($stem_positions, $stem_type);
}
}
}
}