13 Commits

Author SHA1 Message Date
Bob
47f7807231 Merge pull request #146 from rsheldiii/v1/protruding-stems
V1: don't let stems protrude out the sides
2022-02-21 12:40:06 -05:00
Bob
0fc43fa0d7 use inside() to avoid stems protruding out the sides 2022-02-21 12:38:53 -05:00
Bob
fbcf9b2c63 Merge pull request #47 from asdacap/master
Ensure stem does not come out of the key
2022-02-21 12:36:55 -05:00
Bob
edfc02e27b Merge pull request #132 from rsheldiii/v1/g20-spacebar-fix
V1: Fix g20 spacebar having closed bottom
2022-02-19 20:31:43 -05:00
Bob
65bb577473 fix g20 spacebar having closed bottom 2022-02-19 20:30:15 -05:00
Bob
bf4ee0426a Merge pull request #131 from rsheldiii/v1/side-sculpting-scope-fix
V1: Fix lexical scope bug in sculpted_square
2022-02-19 20:14:40 -05:00
Bob
42361f5c25 fix lexical scope bug in sculpted_square 2022-02-19 20:13:13 -05:00
Bob
7edecd7d67 Merge pull request #130 from rsheldiii/v1/stem-slop-fix
V1 stem slop fix
2022-02-19 20:05:04 -05:00
Bob
160c47150d backport stem slop fix 2022-02-19 20:03:54 -05:00
Bob
a1ec4c3cac Merge pull request #129 from rsheldiii/v1/tines-support-fix
V1/tines support fix
2022-02-19 19:49:56 -05:00
Bob
28680924b4 remove bad include - its messing up my post commit hook 2022-02-19 19:48:16 -05:00
Bob
8ad81d3b61 stop tines from protruding out oem keycaps 2022-02-19 19:47:17 -05:00
Muhammad Amirul Ashraf
d62afcd878 Ensure stem does not come out of the key 2020-05-31 09:48:38 +08:00
7 changed files with 1951 additions and 257 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -399,20 +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")) {
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.
@@ -420,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);
}
}
}
}

View File

@@ -92,26 +92,26 @@ module blank() {
children();
}
module cherry(slop) {
$stem_slop = slop ? slop : $stem_slop;
module cherry(slop = undef) {
$stem_slop = slop != undef ? slop : $stem_slop;
$stem_type = "cherry";
children();
}
module alps(slop) {
$stem_slop = slop ? slop : $stem_slop;
module alps(slop = undef) {
$stem_slop = slop != undef ? slop : $stem_slop;
$stem_type = "alps";
children();
}
module rounded_cherry(slop) {
$stem_slop = slop ? slop : $stem_slop;
module rounded_cherry(slop = undef) {
$stem_slop = slop != undef ? slop : $stem_slop;
$stem_type = "rounded_cherry";
children();
}
module box_cherry(slop) {
$stem_slop = slop ? slop : $stem_slop;
module box_cherry(slop = undef) {
$stem_slop = slop != undef ? slop : $stem_slop;
$stem_type = "box_cherry";
children();
}

View File

@@ -1,8 +1,8 @@
include <functions.scad>
module spacebar() {
$inverted_dish = true;
$dish_type = "sideways cylindrical";
$inverted_dish = $dish_type != "disable";
$dish_type = $dish_type != "disable" ? "sideways cylindrical" : "disable";
6_25u() stabilized(mm=50) children();
}

View File

@@ -1,18 +1,18 @@
// rounded square shape with additional sculpting functions to better approximate
// When sculpting sides, how much in should the tops come
$side_sculpting_factor = 4.5;
side_sculpting_factor = 4.5;
// When sculpting corners, how much extra radius should be added
$corner_sculpting_factor = 1;
corner_sculpting_factor = 1;
// When doing more side sculpting corners, how much extra radius should be added
$more_side_sculpting_factor = 0.4;
more_side_sculpting_factor = 0.4;
// side sculpting functions
// bows the sides out on stuff like SA and DSA keycaps
function side_sculpting(progress) = (1 - progress) * $side_sculpting_factor;
function side_sculpting(progress) = (1 - progress) * side_sculpting_factor;
// makes the rounded corners of the keycap grow larger as they move upwards
function corner_sculpting(progress) = pow(progress, 2) * $corner_sculpting_factor;
function corner_sculpting(progress) = pow(progress, 2) * corner_sculpting_factor;
module sculpted_square_shape(size, delta, progress) {
width = size[0];
@@ -37,7 +37,7 @@ module sculpted_square_shape(size, delta, progress) {
offset(r = extra_corner_radius_this_slice, $fa=360/$shape_facets) {
offset(r = -extra_corner_radius_this_slice) {
side_rounded_square(square_size, r = $more_side_sculpting_factor * progress);
side_rounded_square(square_size, r = more_side_sculpting_factor * progress);
}
}
}
@@ -92,7 +92,7 @@ function skin_sculpted_square_shape(size, delta, progress, thickness_difference)
width - extra_width_this_slice - thickness_difference,
height - extra_height_this_slice - thickness_difference
]
) new_side_rounded_square(square_size, $more_side_sculpting_factor * progress, extra_corner_radius_this_slice);
) new_side_rounded_square(square_size, more_side_sculpting_factor * progress, extra_corner_radius_this_slice);
module side_rounded_square(size, r) {

View File

@@ -4,14 +4,14 @@ include <../stems/cherry.scad>
module centered_tines(stem_support_height) {
if ($key_length < 2) {
translate([0,0,$stem_support_height / 2]) {
cube([total_key_width(), 0.5, $stem_support_height], center = true);
cube([total_key_width() -$wall_thickness/2, 0.5, $stem_support_height], center = true);
}
}
translate([0,0,$stem_support_height / 2]) {
cube([
1,
total_key_height(),
total_key_height() -$wall_thickness/2,
$stem_support_height
],
center = true);

View File

@@ -4,7 +4,6 @@ include <stems/box_cherry.scad>
include <stems/alps.scad>
include <stems/filled.scad>
include <stems/cherry_stabilizer.scad>
include <stems/custom.scad>
//whole stem, alps or cherry, trimmed to fit