mirror of
https://github.com/rsheldiii/KeyV2.git
synced 2026-01-14 14:27:55 -05:00
Compare commits
13 Commits
3d_surface
...
v1.x.x
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47f7807231 | ||
|
|
0fc43fa0d7 | ||
|
|
fbcf9b2c63 | ||
|
|
edfc02e27b | ||
|
|
65bb577473 | ||
|
|
bf4ee0426a | ||
|
|
42361f5c25 | ||
|
|
7edecd7d67 | ||
|
|
160c47150d | ||
|
|
a1ec4c3cac | ||
|
|
28680924b4 | ||
|
|
8ad81d3b61 | ||
|
|
d62afcd878 |
2146
customizer.scad
2146
customizer.scad
File diff suppressed because it is too large
Load Diff
23
src/key.scad
23
src/key.scad
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user