mirror of
https://github.com/rsheldiii/KeyV2.git
synced 2026-01-14 22:37:56 -05:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
397a3b84fc | ||
|
|
2c85ea5c07 | ||
|
|
6e5955ed8c | ||
|
|
065787ee99 |
9
TODO.md
Normal file
9
TODO.md
Normal file
@@ -0,0 +1,9 @@
|
||||
TODO:
|
||||
* Make flat stem support default
|
||||
* make flat inner shape default
|
||||
* support repositioning to print on the back surface of the keycap
|
||||
* implement regular polygon for skin extrusions
|
||||
* switch to skin-shaped extrusions by default
|
||||
* kailh choc has a non-square key unit; should I get that working for layouts etc?
|
||||
* move everything over to layouts requiring a child key
|
||||
* add an "errors" or "warnings" or "suggestions" echo section in key.scad, right when the key is being made, so the errors don't get lost / repeated
|
||||
@@ -928,9 +928,10 @@ module iso_enter() {
|
||||
// this equals (unit_length(1.5) - unit_length(1.25)) / 2
|
||||
/* $dish_overdraw_width = 2.38125; */
|
||||
|
||||
|
||||
stabilized(vertical=true) {
|
||||
children();
|
||||
render() {
|
||||
stabilized(vertical=true) {
|
||||
children();
|
||||
}
|
||||
}
|
||||
}
|
||||
// kind of a catch-all at this point for any directive that doesn't fit in the other files
|
||||
@@ -2108,18 +2109,18 @@ function skin_iso_enter_shape(size, delta, progress, thickness_difference) =
|
||||
// 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];
|
||||
@@ -2144,7 +2145,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2199,7 +2200,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) {
|
||||
|
||||
@@ -55,8 +55,9 @@ module iso_enter() {
|
||||
// this equals (unit_length(1.5) - unit_length(1.25)) / 2
|
||||
/* $dish_overdraw_width = 2.38125; */
|
||||
|
||||
|
||||
stabilized(vertical=true) {
|
||||
children();
|
||||
render() {
|
||||
stabilized(vertical=true) {
|
||||
children();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user