mirror of
https://github.com/rsheldiii/KeyV2.git
synced 2026-01-14 22:37:56 -05:00
Compare commits
25 Commits
force-iso-
...
v2/autoleg
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e955331e8d | ||
|
|
1a10d1e5bc | ||
|
|
41381ed376 | ||
|
|
08f17a4e1f | ||
|
|
4766e3eca6 | ||
|
|
19cdb2d9ae | ||
|
|
75cfa2a856 | ||
|
|
feb9ec6a71 | ||
|
|
4ba88df064 | ||
|
|
315bc83039 | ||
|
|
077de5ac87 | ||
|
|
aad8ddc558 | ||
|
|
5ccd4b7f8d | ||
|
|
e35d5d354a | ||
|
|
47f17efcf1 | ||
|
|
d3001e7da0 | ||
|
|
378af54056 | ||
|
|
38bfbfa61c | ||
|
|
7ee9e61412 | ||
|
|
f63de1caf2 | ||
|
|
c6bae9460c | ||
|
|
3fb34bc663 | ||
|
|
c81889b298 | ||
|
|
0a246489ec | ||
|
|
654874fb5f |
16
README.md
16
README.md
@@ -25,7 +25,19 @@ If you are technically inclined at all, this is definitely the best way to run t
|
||||
|
||||
First, you'll need OpenSCAD: http://www.openscad.org/downloads.html. I highly recommend installing the development snapshot, as they generally support more features and are relatively stable. Development snapshots are listed in their own section on the downloads page.
|
||||
|
||||
After you have openSCAD installed, you need to download the code and run it. running `git clone https://github.com/rsheldiii/KeyV2.git` if you have git, or downloading [this zip](https://github.com/rsheldiii/KeyV2/archive/master.zip) and extracting the directory should do it. Then all you need to do is open `keys.scad` with openSCAD and you are set! It is possible to edit this project with an external editor by checking off Design => 'Automatic Reload and Preview' in OpenSCAD.
|
||||
After you have openSCAD installed, you need to download the code and run it. running `git clone https://github.com/rsheldiii/openSCAD-projects.git` if you have git, or downloading [this zip](https://github.com/rsheldiii/openSCAD-projects/archive/master.zip) and extracting the directory should do it.
|
||||
|
||||
To make your own key, all you need to do is open `keys.scad` with openSCAD and modify this line:
|
||||
|
||||
```
|
||||
dcs_row(5) legend("⇪", size=9) key();
|
||||
```
|
||||
|
||||
To be whatever you want. For example, this is for a ctrl key on an OEM keyboard:
|
||||
|
||||
```u(1.25) oem_row(3) legend("ctrl", size=4.5) key();```
|
||||
|
||||
It is possible to edit this project with an external editor by checking off Design => 'Automatic Reload and Preview' in OpenSCAD.
|
||||
|
||||
All examples below assume you are running the library on your computer with OpenSCAD.
|
||||
|
||||
@@ -78,7 +90,7 @@ These modifier functions may not cover every use case; in that case, you may hav
|
||||
|
||||
new to the library and still in a beta state, layouts allows you to generate an entire layout for a keyboard!
|
||||
|
||||
It is recommended to use tined stem support and set `$extra_long_stem_support = true` if you plan on printing these keycaps.
|
||||
It is recommended to print layouts with a brim that extends to the next key.
|
||||
|
||||
```
|
||||
60_percent_default("dcs") key();
|
||||
|
||||
165
customizer.scad
165
customizer.scad
@@ -94,10 +94,6 @@ $stem_inset = 0;
|
||||
// How many degrees to rotate the stems. useful for sideways keycaps, maybe
|
||||
$stem_rotation = 0;
|
||||
|
||||
// enable to have stem support extend past the keycap bottom, to (hopefully) the next
|
||||
// keycap. only works on tines right now
|
||||
$extra_long_stem_support = false;
|
||||
|
||||
/* [Shape] */
|
||||
|
||||
// Key shape type, determines the shape of the key. default is 'rounded square'
|
||||
@@ -166,12 +162,14 @@ $double_sculpted = false;
|
||||
//valign = "top" or "center" or "bottom"
|
||||
// Currently does not work with thingiverse customizer, and actually breaks it
|
||||
$legends = [];
|
||||
$autolegends = [];
|
||||
|
||||
//list of front legends to place on a key format: [text, halign, valign, size]
|
||||
//halign = "left" or "center" or "right"
|
||||
//valign = "top" or "center" or "bottom"
|
||||
// Currently does not work with thingiverse customizer, and actually breaks it
|
||||
$front_legends = [];
|
||||
$front_autolegends = [];
|
||||
|
||||
// print legends on the front of the key instead of the top
|
||||
$front_print_legends = false;
|
||||
@@ -179,6 +177,9 @@ $front_print_legends = false;
|
||||
// how recessed inset legends / artisans are from the top of the key
|
||||
$inset_legend_depth = 0.2;
|
||||
|
||||
// legends are not allowed to print within this many mm of the edge of the key
|
||||
$legend_margin = 0.8;
|
||||
|
||||
// Dimensions of alps stem
|
||||
$alps_stem = [4.45, 2.25];
|
||||
|
||||
@@ -835,7 +836,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
|
||||
|
||||
function side_tilt(column) = asin($unit * column / $double_sculpt_radius);
|
||||
// tan of 0 is 0, division by 0 is nan, so we have to guard
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - (unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - ($unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
|
||||
// (I think) extra length of the side of the keycap due to the keytop being tilted.
|
||||
// necessary for calculating flat sided keycaps
|
||||
@@ -1109,6 +1110,18 @@ module front_legend(text, position=[0,0], size=undef) {
|
||||
children();
|
||||
}
|
||||
|
||||
module autolegend(texts) {
|
||||
// $autolegends = [for(L=[$legends, [[text, position, font_size]]], a=L) a];
|
||||
$autolegends = texts;
|
||||
children();
|
||||
}
|
||||
|
||||
module front_autolegend(texts) {
|
||||
font_size = size == undef ? $font_size : size;
|
||||
$front_autolegends = [for(L=[$front_legends, [[text, position, font_size]]], a=L) a];
|
||||
children();
|
||||
}
|
||||
|
||||
module bump(depth=undef) {
|
||||
$key_bump = true;
|
||||
$key_bump_depth = depth == undef ? $key_bump_depth : depth;
|
||||
@@ -1236,7 +1249,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
|
||||
|
||||
function side_tilt(column) = asin($unit * column / $double_sculpt_radius);
|
||||
// tan of 0 is 0, division by 0 is nan, so we have to guard
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - (unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - ($unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
|
||||
// (I think) extra length of the side of the keycap due to the keytop being tilted.
|
||||
// necessary for calculating flat sided keycaps
|
||||
@@ -1315,7 +1328,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
|
||||
|
||||
function side_tilt(column) = asin($unit * column / $double_sculpt_radius);
|
||||
// tan of 0 is 0, division by 0 is nan, so we have to guard
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - (unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - ($unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
|
||||
// (I think) extra length of the side of the keycap due to the keytop being tilted.
|
||||
// necessary for calculating flat sided keycaps
|
||||
@@ -2077,12 +2090,12 @@ module ISO_enter_shape(size, delta, progress){
|
||||
}
|
||||
|
||||
function iso_enter_vertices(size, delta, progress, thickness_difference) = [
|
||||
[ 0-delta.x/2 * progress - thickness_difference/2, 0 - delta.y / 2 * progress - thickness_difference/2], // top right
|
||||
[ 0-delta.x/2 * progress - thickness_difference/2, -size[1] + delta.y / 2 * progress + thickness_difference/2], // bottom right
|
||||
[-size[0] * width_ratio + delta.x/2 * progress + thickness_difference/2, -size[1] + delta.y / 2 * progress + thickness_difference/2], // bottom left
|
||||
[-size[0] * width_ratio + delta.x/2 * progress + thickness_difference/2,-size[1] * height_ratio + delta.y / 2 * progress + thickness_difference/2], // inner middle point
|
||||
[ -size[0] + delta.x/2 * progress + thickness_difference/2,-size[1] * height_ratio + delta.y / 2 * progress + thickness_difference/2], // outer middle point
|
||||
[ -size[0] + delta.x/2 * progress + thickness_difference/2, 0 - delta.y / 2 * progress - thickness_difference/2] // top left
|
||||
[ 0-delta.x/2 * progress - thickness_difference/8, 0 - delta.y / 2 * progress - thickness_difference/8], // top right
|
||||
[ 0-delta.x/2 * progress - thickness_difference/8, -size[1] + delta.y / 2 * progress + thickness_difference/8], // bottom right
|
||||
[-size[0] * width_ratio + delta.x/2 * progress + thickness_difference/8, -size[1] + delta.y / 2 * progress + thickness_difference/8], // bottom left
|
||||
[-size[0] * width_ratio + delta.x/2 * progress + thickness_difference/8,-size[1] * height_ratio + delta.y / 2 * progress + thickness_difference/2], // inner middle point
|
||||
[ -size[0] + delta.x/2 * progress + thickness_difference/8,-size[1] * height_ratio + delta.y / 2 * progress + thickness_difference/2], // outer middle point
|
||||
[ -size[0] + delta.x/2 * progress + thickness_difference/8, 0 - delta.y / 2 * progress - thickness_difference/8] // top left
|
||||
] + [
|
||||
[(size[0] * width_ratio)/2, size[1]/2 ],
|
||||
[(size[0] * width_ratio)/2, size[1]/2 ],
|
||||
@@ -2258,7 +2271,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
|
||||
|
||||
function side_tilt(column) = asin($unit * column / $double_sculpt_radius);
|
||||
// tan of 0 is 0, division by 0 is nan, so we have to guard
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - (unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - ($unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
|
||||
// (I think) extra length of the side of the keycap due to the keytop being tilted.
|
||||
// necessary for calculating flat sided keycaps
|
||||
@@ -3082,7 +3095,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
|
||||
|
||||
function side_tilt(column) = asin($unit * column / $double_sculpt_radius);
|
||||
// tan of 0 is 0, division by 0 is nan, so we have to guard
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - (unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - ($unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
|
||||
// (I think) extra length of the side of the keycap due to the keytop being tilted.
|
||||
// necessary for calculating flat sided keycaps
|
||||
@@ -3272,7 +3285,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
|
||||
|
||||
function side_tilt(column) = asin($unit * column / $double_sculpt_radius);
|
||||
// tan of 0 is 0, division by 0 is nan, so we have to guard
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - (unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - ($unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
|
||||
// (I think) extra length of the side of the keycap due to the keytop being tilted.
|
||||
// necessary for calculating flat sided keycaps
|
||||
@@ -3383,7 +3396,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
|
||||
|
||||
function side_tilt(column) = asin($unit * column / $double_sculpt_radius);
|
||||
// tan of 0 is 0, division by 0 is nan, so we have to guard
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - (unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - ($unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
|
||||
// (I think) extra length of the side of the keycap due to the keytop being tilted.
|
||||
// necessary for calculating flat sided keycaps
|
||||
@@ -3458,7 +3471,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
|
||||
|
||||
function side_tilt(column) = asin($unit * column / $double_sculpt_radius);
|
||||
// tan of 0 is 0, division by 0 is nan, so we have to guard
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - (unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - ($unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
|
||||
// (I think) extra length of the side of the keycap due to the keytop being tilted.
|
||||
// necessary for calculating flat sided keycaps
|
||||
@@ -3538,7 +3551,7 @@ module rounded_cherry_stem(depth, slop, throw) {
|
||||
|
||||
// inside cross
|
||||
// translation purely for aesthetic purposes, to get rid of that awful lattice
|
||||
inside_cherry_cross(slop);
|
||||
inside_cherry_cross($stem_inner_slop);
|
||||
}
|
||||
}
|
||||
// a safe theoretical distance between two vertices such that they don't collapse. hard to use
|
||||
@@ -3579,7 +3592,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
|
||||
|
||||
function side_tilt(column) = asin($unit * column / $double_sculpt_radius);
|
||||
// tan of 0 is 0, division by 0 is nan, so we have to guard
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - (unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - ($unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
|
||||
// (I think) extra length of the side of the keycap due to the keytop being tilted.
|
||||
// necessary for calculating flat sided keycaps
|
||||
@@ -3654,7 +3667,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
|
||||
|
||||
function side_tilt(column) = asin($unit * column / $double_sculpt_radius);
|
||||
// tan of 0 is 0, division by 0 is nan, so we have to guard
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - (unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - ($unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
|
||||
// (I think) extra length of the side of the keycap due to the keytop being tilted.
|
||||
// necessary for calculating flat sided keycaps
|
||||
@@ -3738,7 +3751,7 @@ module box_cherry_stem(depth, slop, throw) {
|
||||
}
|
||||
|
||||
// inside cross
|
||||
inside_cherry_cross(slop);
|
||||
inside_cherry_cross($stem_inner_slop);
|
||||
}
|
||||
}
|
||||
module alps_stem(depth, slop, throw){
|
||||
@@ -3793,7 +3806,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
|
||||
|
||||
function side_tilt(column) = asin($unit * column / $double_sculpt_radius);
|
||||
// tan of 0 is 0, division by 0 is nan, so we have to guard
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - (unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - ($unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
|
||||
// (I think) extra length of the side of the keycap due to the keytop being tilted.
|
||||
// necessary for calculating flat sided keycaps
|
||||
@@ -3938,7 +3951,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
|
||||
|
||||
function side_tilt(column) = asin($unit * column / $double_sculpt_radius);
|
||||
// tan of 0 is 0, division by 0 is nan, so we have to guard
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - (unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - ($unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
|
||||
// (I think) extra length of the side of the keycap due to the keytop being tilted.
|
||||
// necessary for calculating flat sided keycaps
|
||||
@@ -4013,7 +4026,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
|
||||
|
||||
function side_tilt(column) = asin($unit * column / $double_sculpt_radius);
|
||||
// tan of 0 is 0, division by 0 is nan, so we have to guard
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - (unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - ($unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
|
||||
// (I think) extra length of the side of the keycap due to the keytop being tilted.
|
||||
// necessary for calculating flat sided keycaps
|
||||
@@ -4102,12 +4115,12 @@ module brim_support(stem_type, stem_support_height, slop) {
|
||||
}
|
||||
}
|
||||
|
||||
inside_cherry_cross(slop);
|
||||
inside_cherry_cross($stem_inner_slop);
|
||||
}
|
||||
} else if (stem_type == "rounded_cherry") {
|
||||
difference() {
|
||||
cylinder(d=$rounded_cherry_stem_d * 2, h=stem_support_height);
|
||||
inside_cherry_cross(slop);
|
||||
inside_cherry_cross($stem_inner_slop);
|
||||
}
|
||||
} else if (stem_type == "box_cherry") {
|
||||
difference() {
|
||||
@@ -4117,7 +4130,7 @@ module brim_support(stem_type, stem_support_height, slop) {
|
||||
}
|
||||
}
|
||||
|
||||
inside_cherry_cross(slop);
|
||||
inside_cherry_cross($stem_inner_slop);
|
||||
}
|
||||
} else if (stem_type == "cherry_stabilizer") {
|
||||
difference() {
|
||||
@@ -4127,7 +4140,7 @@ module brim_support(stem_type, stem_support_height, slop) {
|
||||
}
|
||||
}
|
||||
|
||||
inside_cherry_cross(slop);
|
||||
inside_cherry_cross($stem_inner_slop);
|
||||
}
|
||||
} else if(stem_type == "choc") {
|
||||
translate([-5.7/2,0,0]) linear_extrude(height=stem_support_height) {
|
||||
@@ -4181,7 +4194,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
|
||||
|
||||
function side_tilt(column) = asin($unit * column / $double_sculpt_radius);
|
||||
// tan of 0 is 0, division by 0 is nan, so we have to guard
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - (unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - ($unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
|
||||
// (I think) extra length of the side of the keycap due to the keytop being tilted.
|
||||
// necessary for calculating flat sided keycaps
|
||||
@@ -4256,7 +4269,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
|
||||
|
||||
function side_tilt(column) = asin($unit * column / $double_sculpt_radius);
|
||||
// tan of 0 is 0, division by 0 is nan, so we have to guard
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - (unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - ($unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
|
||||
// (I think) extra length of the side of the keycap due to the keytop being tilted.
|
||||
// necessary for calculating flat sided keycaps
|
||||
@@ -4330,17 +4343,20 @@ module cherry_stem(depth, slop, throw) {
|
||||
}
|
||||
}
|
||||
|
||||
/* NOTE: every reference to total_key_width and total_key_height
|
||||
* is multiplied by two in order to account for offset stems
|
||||
*/
|
||||
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()*2, 0.5, $stem_support_height], center = true);
|
||||
}
|
||||
}
|
||||
|
||||
translate([0,0,$stem_support_height / 2]) {
|
||||
cube([
|
||||
1,
|
||||
total_key_height(),
|
||||
total_key_height()*2,
|
||||
$stem_support_height
|
||||
],
|
||||
center = true);
|
||||
@@ -4348,16 +4364,13 @@ module centered_tines(stem_support_height) {
|
||||
}
|
||||
|
||||
module tines_support(stem_type, stem_support_height, slop) {
|
||||
extra_height = $extra_long_stem_support ? ($unit - total_key_height()) + 0.1 : -$wall_thickness/4; // fudge
|
||||
extra_width = $extra_long_stem_support ? ($unit - total_key_width()) + 0.1 : -$wall_thickness/4;
|
||||
|
||||
if (stem_type == "cherry" || stem_type == "costar_stabilizer") {
|
||||
difference () {
|
||||
union() {
|
||||
if ($key_length < 2) {
|
||||
translate([0,0,$stem_support_height / 2]) {
|
||||
cube([
|
||||
total_key_width() + extra_width*2,
|
||||
total_key_width()*2,
|
||||
0.5,
|
||||
$stem_support_height
|
||||
], center = true);
|
||||
@@ -4369,14 +4382,14 @@ module tines_support(stem_type, stem_support_height, slop) {
|
||||
translate([x,0,$stem_support_height / 2]) {
|
||||
cube([
|
||||
0.5,
|
||||
total_key_height() + extra_height*2, // this is to extend past
|
||||
total_key_height()*2, // this is to extend past
|
||||
$stem_support_height
|
||||
], center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inside_cherry_cross(slop);
|
||||
inside_cherry_cross($stem_inner_slop);
|
||||
}
|
||||
} else if (stem_type == "cherry_stabilizer") {
|
||||
difference () {
|
||||
@@ -4384,7 +4397,7 @@ module tines_support(stem_type, stem_support_height, slop) {
|
||||
translate([x,0,$stem_support_height / 2]) {
|
||||
cube([
|
||||
1,
|
||||
total_key_height($wall_thickness),
|
||||
total_key_height()*2,
|
||||
$stem_support_height
|
||||
], center = true);
|
||||
}
|
||||
@@ -4396,20 +4409,20 @@ module tines_support(stem_type, stem_support_height, slop) {
|
||||
difference () {
|
||||
centered_tines(stem_support_height);
|
||||
|
||||
inside_cherry_cross(slop);
|
||||
inside_cherry_cross($stem_inner_slop);
|
||||
}
|
||||
} else if (stem_type == "rounded_cherry") {
|
||||
difference () {
|
||||
centered_tines(stem_support_height);
|
||||
|
||||
inside_cherry_cross(slop);
|
||||
inside_cherry_cross($stem_inner_slop);
|
||||
}
|
||||
} else if (stem_type == "alps"){
|
||||
centered_tines(stem_support_height);
|
||||
} else if (stem_type == "choc"){
|
||||
if ($key_length < 2) translate([0,0,$stem_support_height / 2]) cube([total_key_width($wall_thickness)+$wall_thickness/4, 0.42, $stem_support_height], center = true);
|
||||
/* translate([-5.7/2,0,$stem_support_height / 2]) cube([0.5, total_key_height($wall_thickness), $stem_support_height], center = true); */
|
||||
/* translate([5.7/2,0,$stem_support_height / 2]) cube([0.5, total_key_height($wall_thickness), $stem_support_height], center = true); */
|
||||
if ($key_length < 2) translate([0,0,$stem_support_height / 2]) cube([total_key_width(), 0.42, $stem_support_height], center = true);
|
||||
/* translate([-5.7/2,0,$stem_support_height / 2]) cube([0.5, total_key_height(), $stem_support_height], center = true); */
|
||||
/* translate([5.7/2,0,$stem_support_height / 2]) cube([0.5, total_key_height(), $stem_support_height], center = true); */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4662,7 +4675,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
|
||||
|
||||
function side_tilt(column) = asin($unit * column / $double_sculpt_radius);
|
||||
// tan of 0 is 0, division by 0 is nan, so we have to guard
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - (unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - ($unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
|
||||
// (I think) extra length of the side of the keycap due to the keytop being tilted.
|
||||
// necessary for calculating flat sided keycaps
|
||||
@@ -4852,7 +4865,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
|
||||
|
||||
function side_tilt(column) = asin($unit * column / $double_sculpt_radius);
|
||||
// tan of 0 is 0, division by 0 is nan, so we have to guard
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - (unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - ($unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
|
||||
// (I think) extra length of the side of the keycap due to the keytop being tilted.
|
||||
// necessary for calculating flat sided keycaps
|
||||
@@ -5038,6 +5051,45 @@ module legends(depth=0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
module autolegends(depth=0) {
|
||||
if (len($front_autolegends) > 0) {
|
||||
front_of_key() {
|
||||
for (i=[0:len($front_legends)-1]) {
|
||||
rotate([90,0,0]) keytext($front_legends[i][0], $front_legends[i][1], $front_legends[i][2], depth);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (len($autolegends) > 0) {
|
||||
// legends are printed in a square grid - 1, 4, 9 legends, etc
|
||||
grid_size = len($autolegends)^0.5;
|
||||
echo("grid_size", grid_size);
|
||||
max_width = (top_total_key_width() - $legend_margin * (grid_size + 1)) / grid_size;
|
||||
max_height = (top_total_key_height() - $legend_margin * (grid_size + 1)) / grid_size;
|
||||
|
||||
top_of_key() {
|
||||
for (column=[0:grid_size-1]) {
|
||||
for (row=[0:grid_size-1]) {
|
||||
top_left_corner = [-top_total_key_width()/2, top_total_key_height()/2];
|
||||
centering_offset = [max_width / 2, -max_height / 2];
|
||||
position_offset = [(max_width + $legend_margin) * column, (-max_height-$legend_margin) * row];
|
||||
margin_offset = [$legend_margin, -$legend_margin];
|
||||
|
||||
translate(top_left_corner + centering_offset + position_offset + margin_offset) {
|
||||
translate([0,0,-depth]) {
|
||||
color($tertiary_color) linear_extrude(height=$dish_depth + depth){
|
||||
// resize([0, max_height, 0]) {
|
||||
resize([max_width, 0], auto=true) {
|
||||
text(text=$autolegends[row * grid_size + column], font=$font, halign="center", valign="center");
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// use skin() instead of successive hulls. much more correct, and looks faster
|
||||
// too, in most cases. successive hull relies on overlapping faces which are
|
||||
// not good. But, skin works on vertex sets instead of shapes, which makes it
|
||||
@@ -6246,7 +6298,10 @@ module additive_features(inset) {
|
||||
if($key_bump) keybump($key_bump_depth, $key_bump_edge);
|
||||
if(!inset && $children > 0) color($secondary_color) children();
|
||||
}
|
||||
if($outset_legends) legends(0);
|
||||
if($outset_legends) {
|
||||
legends(0);
|
||||
autolegends(0);
|
||||
}
|
||||
// render the clearance check if it's enabled, but don't have it intersect with anything
|
||||
if ($clearance_check) %clearance_check();
|
||||
}
|
||||
@@ -6256,7 +6311,10 @@ module subtractive_features(inset) {
|
||||
top_of_key() {
|
||||
if (inset && $children > 0) color($secondary_color) children();
|
||||
}
|
||||
if(!$outset_legends) legends($inset_legend_depth);
|
||||
if(!$outset_legends) {
|
||||
legends($inset_legend_depth);
|
||||
autolegends($inset_legend_depth);
|
||||
}
|
||||
// subtract the clearance check if it's enabled, letting the user see the
|
||||
// parts of the keycap that will hit the cherry switch
|
||||
// this is a little confusing as it eats the stem too
|
||||
@@ -6404,10 +6462,6 @@ $stem_inset = 0;
|
||||
// How many degrees to rotate the stems. useful for sideways keycaps, maybe
|
||||
$stem_rotation = 0;
|
||||
|
||||
// enable to have stem support extend past the keycap bottom, to (hopefully) the next
|
||||
// keycap. only works on tines right now
|
||||
$extra_long_stem_support = false;
|
||||
|
||||
/* [Shape] */
|
||||
|
||||
// Key shape type, determines the shape of the key. default is 'rounded square'
|
||||
@@ -6476,12 +6530,14 @@ $double_sculpted = false;
|
||||
//valign = "top" or "center" or "bottom"
|
||||
// Currently does not work with thingiverse customizer, and actually breaks it
|
||||
$legends = [];
|
||||
$autolegends = [];
|
||||
|
||||
//list of front legends to place on a key format: [text, halign, valign, size]
|
||||
//halign = "left" or "center" or "right"
|
||||
//valign = "top" or "center" or "bottom"
|
||||
// Currently does not work with thingiverse customizer, and actually breaks it
|
||||
$front_legends = [];
|
||||
$front_autolegends = [];
|
||||
|
||||
// print legends on the front of the key instead of the top
|
||||
$front_print_legends = false;
|
||||
@@ -6489,6 +6545,9 @@ $front_print_legends = false;
|
||||
// how recessed inset legends / artisans are from the top of the key
|
||||
$inset_legend_depth = 0.2;
|
||||
|
||||
// legends are not allowed to print within this many mm of the edge of the key
|
||||
$legend_margin = 0.8;
|
||||
|
||||
// Dimensions of alps stem
|
||||
$alps_stem = [4.45, 2.25];
|
||||
|
||||
|
||||
@@ -9,12 +9,15 @@ include <./includes.scad>
|
||||
|
||||
|
||||
// example key
|
||||
dcs_row(5) legend("⇪", size=9) key();
|
||||
|
||||
$stem_inner_slop = 0;
|
||||
dcs_row(5) autolegend(["q", "w", "a", "z", "e", "r", "t", "", "hoobastank"]) {
|
||||
$stem_positions = [[2,2]];
|
||||
key();
|
||||
}
|
||||
// example row
|
||||
/* for (x = [0:1:4]) {
|
||||
translate_u(0,-x) dcs_row(x) key();
|
||||
} */
|
||||
|
||||
// example layout
|
||||
/* preonic_default("dcs"); */
|
||||
/* preonic_default("dcs") key(); */
|
||||
|
||||
@@ -3,3 +3,4 @@
|
||||
include <features/key_bump.scad>
|
||||
include <features/clearance_check.scad>
|
||||
include <features/legends.scad>
|
||||
include <features/autolegends.scad>
|
||||
|
||||
39
src/features/autolegends.scad
Normal file
39
src/features/autolegends.scad
Normal file
@@ -0,0 +1,39 @@
|
||||
module autolegends(depth=0) {
|
||||
if (len($front_autolegends) > 0) {
|
||||
front_of_key() {
|
||||
for (i=[0:len($front_legends)-1]) {
|
||||
rotate([90,0,0]) keytext($front_legends[i][0], $front_legends[i][1], $front_legends[i][2], depth);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (len($autolegends) > 0) {
|
||||
// legends are printed in a square grid - 1, 4, 9 legends, etc
|
||||
grid_size = len($autolegends)^0.5;
|
||||
echo("grid_size", grid_size);
|
||||
max_width = (top_total_key_width() - $legend_margin * (grid_size + 1)) / grid_size;
|
||||
max_height = (top_total_key_height() - $legend_margin * (grid_size + 1)) / grid_size;
|
||||
|
||||
top_of_key() {
|
||||
for (column=[0:grid_size-1]) {
|
||||
for (row=[0:grid_size-1]) {
|
||||
top_left_corner = [-top_total_key_width()/2, top_total_key_height()/2];
|
||||
centering_offset = [max_width / 2, -max_height / 2];
|
||||
position_offset = [(max_width + $legend_margin) * column, (-max_height-$legend_margin) * row];
|
||||
margin_offset = [$legend_margin, -$legend_margin];
|
||||
|
||||
translate(top_left_corner + centering_offset + position_offset + margin_offset) {
|
||||
translate([0,0,-depth]) {
|
||||
color($tertiary_color) linear_extrude(height=$dish_depth + depth){
|
||||
// resize([0, max_height, 0]) {
|
||||
resize([max_width, 0], auto=true) {
|
||||
text(text=$autolegends[row * grid_size + column], font=$font, halign="center", valign="center");
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
|
||||
|
||||
function side_tilt(column) = asin($unit * column / $double_sculpt_radius);
|
||||
// tan of 0 is 0, division by 0 is nan, so we have to guard
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - (unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
function extra_side_tilt_height(column) = side_tilt(column) ? ($double_sculpt_radius - ($unit * abs(column)) / tan(abs(side_tilt(column)))) : 0;
|
||||
|
||||
// (I think) extra length of the side of the keycap due to the keytop being tilted.
|
||||
// necessary for calculating flat sided keycaps
|
||||
|
||||
10
src/key.scad
10
src/key.scad
@@ -180,7 +180,10 @@ module additive_features(inset) {
|
||||
if($key_bump) keybump($key_bump_depth, $key_bump_edge);
|
||||
if(!inset && $children > 0) color($secondary_color) children();
|
||||
}
|
||||
if($outset_legends) legends(0);
|
||||
if($outset_legends) {
|
||||
legends(0);
|
||||
autolegends(0);
|
||||
}
|
||||
// render the clearance check if it's enabled, but don't have it intersect with anything
|
||||
if ($clearance_check) %clearance_check();
|
||||
}
|
||||
@@ -190,7 +193,10 @@ module subtractive_features(inset) {
|
||||
top_of_key() {
|
||||
if (inset && $children > 0) color($secondary_color) children();
|
||||
}
|
||||
if(!$outset_legends) legends($inset_legend_depth);
|
||||
if(!$outset_legends) {
|
||||
legends($inset_legend_depth);
|
||||
autolegends($inset_legend_depth);
|
||||
}
|
||||
// subtract the clearance check if it's enabled, letting the user see the
|
||||
// parts of the keycap that will hit the cherry switch
|
||||
// this is a little confusing as it eats the stem too
|
||||
|
||||
@@ -170,6 +170,18 @@ module front_legend(text, position=[0,0], size=undef) {
|
||||
children();
|
||||
}
|
||||
|
||||
module autolegend(texts) {
|
||||
// $autolegends = [for(L=[$legends, [[text, position, font_size]]], a=L) a];
|
||||
$autolegends = texts;
|
||||
children();
|
||||
}
|
||||
|
||||
module front_autolegend(texts) {
|
||||
font_size = size == undef ? $font_size : size;
|
||||
$front_autolegends = [for(L=[$front_legends, [[text, position, font_size]]], a=L) a];
|
||||
children();
|
||||
}
|
||||
|
||||
module bump(depth=undef) {
|
||||
$key_bump = true;
|
||||
$key_bump_depth = depth == undef ? $key_bump_depth : depth;
|
||||
|
||||
@@ -79,10 +79,6 @@ $stem_inset = 0;
|
||||
// How many degrees to rotate the stems. useful for sideways keycaps, maybe
|
||||
$stem_rotation = 0;
|
||||
|
||||
// enable to have stem support extend past the keycap bottom, to (hopefully) the next
|
||||
// keycap. only works on tines right now
|
||||
$extra_long_stem_support = false;
|
||||
|
||||
/* [Shape] */
|
||||
|
||||
// Key shape type, determines the shape of the key. default is 'rounded square'
|
||||
@@ -151,12 +147,14 @@ $double_sculpted = false;
|
||||
//valign = "top" or "center" or "bottom"
|
||||
// Currently does not work with thingiverse customizer, and actually breaks it
|
||||
$legends = [];
|
||||
$autolegends = [];
|
||||
|
||||
//list of front legends to place on a key format: [text, halign, valign, size]
|
||||
//halign = "left" or "center" or "right"
|
||||
//valign = "top" or "center" or "bottom"
|
||||
// Currently does not work with thingiverse customizer, and actually breaks it
|
||||
$front_legends = [];
|
||||
$front_autolegends = [];
|
||||
|
||||
// print legends on the front of the key instead of the top
|
||||
$front_print_legends = false;
|
||||
@@ -164,6 +162,9 @@ $front_print_legends = false;
|
||||
// how recessed inset legends / artisans are from the top of the key
|
||||
$inset_legend_depth = 0.2;
|
||||
|
||||
// legends are not allowed to print within this many mm of the edge of the key
|
||||
$legend_margin = 0.8;
|
||||
|
||||
// Dimensions of alps stem
|
||||
$alps_stem = [4.45, 2.25];
|
||||
|
||||
|
||||
@@ -38,12 +38,12 @@ module ISO_enter_shape(size, delta, progress){
|
||||
}
|
||||
|
||||
function iso_enter_vertices(size, delta, progress, thickness_difference) = [
|
||||
[ 0-delta.x/2 * progress - thickness_difference/2, 0 - delta.y / 2 * progress - thickness_difference/2], // top right
|
||||
[ 0-delta.x/2 * progress - thickness_difference/2, -size[1] + delta.y / 2 * progress + thickness_difference/2], // bottom right
|
||||
[-size[0] * width_ratio + delta.x/2 * progress + thickness_difference/2, -size[1] + delta.y / 2 * progress + thickness_difference/2], // bottom left
|
||||
[-size[0] * width_ratio + delta.x/2 * progress + thickness_difference/2,-size[1] * height_ratio + delta.y / 2 * progress + thickness_difference/2], // inner middle point
|
||||
[ -size[0] + delta.x/2 * progress + thickness_difference/2,-size[1] * height_ratio + delta.y / 2 * progress + thickness_difference/2], // outer middle point
|
||||
[ -size[0] + delta.x/2 * progress + thickness_difference/2, 0 - delta.y / 2 * progress - thickness_difference/2] // top left
|
||||
[ 0-delta.x/2 * progress - thickness_difference/8, 0 - delta.y / 2 * progress - thickness_difference/8], // top right
|
||||
[ 0-delta.x/2 * progress - thickness_difference/8, -size[1] + delta.y / 2 * progress + thickness_difference/8], // bottom right
|
||||
[-size[0] * width_ratio + delta.x/2 * progress + thickness_difference/8, -size[1] + delta.y / 2 * progress + thickness_difference/8], // bottom left
|
||||
[-size[0] * width_ratio + delta.x/2 * progress + thickness_difference/8,-size[1] * height_ratio + delta.y / 2 * progress + thickness_difference/2], // inner middle point
|
||||
[ -size[0] + delta.x/2 * progress + thickness_difference/8,-size[1] * height_ratio + delta.y / 2 * progress + thickness_difference/2], // outer middle point
|
||||
[ -size[0] + delta.x/2 * progress + thickness_difference/8, 0 - delta.y / 2 * progress - thickness_difference/8] // top left
|
||||
] + [
|
||||
[(size[0] * width_ratio)/2, size[1]/2 ],
|
||||
[(size[0] * width_ratio)/2, size[1]/2 ],
|
||||
|
||||
@@ -16,12 +16,12 @@ module brim_support(stem_type, stem_support_height, slop) {
|
||||
}
|
||||
}
|
||||
|
||||
inside_cherry_cross(slop);
|
||||
inside_cherry_cross($stem_inner_slop);
|
||||
}
|
||||
} else if (stem_type == "rounded_cherry") {
|
||||
difference() {
|
||||
cylinder(d=$rounded_cherry_stem_d * 2, h=stem_support_height);
|
||||
inside_cherry_cross(slop);
|
||||
inside_cherry_cross($stem_inner_slop);
|
||||
}
|
||||
} else if (stem_type == "box_cherry") {
|
||||
difference() {
|
||||
@@ -31,7 +31,7 @@ module brim_support(stem_type, stem_support_height, slop) {
|
||||
}
|
||||
}
|
||||
|
||||
inside_cherry_cross(slop);
|
||||
inside_cherry_cross($stem_inner_slop);
|
||||
}
|
||||
} else if (stem_type == "cherry_stabilizer") {
|
||||
difference() {
|
||||
@@ -41,7 +41,7 @@ module brim_support(stem_type, stem_support_height, slop) {
|
||||
}
|
||||
}
|
||||
|
||||
inside_cherry_cross(slop);
|
||||
inside_cherry_cross($stem_inner_slop);
|
||||
}
|
||||
} else if(stem_type == "choc") {
|
||||
translate([-5.7/2,0,0]) linear_extrude(height=stem_support_height) {
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
include <../functions.scad>
|
||||
include <../stems/cherry.scad>
|
||||
|
||||
/* NOTE: every reference to total_key_width and total_key_height
|
||||
* is multiplied by two in order to account for offset stems
|
||||
*/
|
||||
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()*2, 0.5, $stem_support_height], center = true);
|
||||
}
|
||||
}
|
||||
|
||||
translate([0,0,$stem_support_height / 2]) {
|
||||
cube([
|
||||
1,
|
||||
total_key_height(),
|
||||
total_key_height()*2,
|
||||
$stem_support_height
|
||||
],
|
||||
center = true);
|
||||
@@ -19,16 +22,13 @@ module centered_tines(stem_support_height) {
|
||||
}
|
||||
|
||||
module tines_support(stem_type, stem_support_height, slop) {
|
||||
extra_height = $extra_long_stem_support ? ($unit - total_key_height()) + 0.1 : -$wall_thickness/4; // fudge
|
||||
extra_width = $extra_long_stem_support ? ($unit - total_key_width()) + 0.1 : -$wall_thickness/4;
|
||||
|
||||
if (stem_type == "cherry" || stem_type == "costar_stabilizer") {
|
||||
difference () {
|
||||
union() {
|
||||
if ($key_length < 2) {
|
||||
translate([0,0,$stem_support_height / 2]) {
|
||||
cube([
|
||||
total_key_width() + extra_width*2,
|
||||
total_key_width()*2,
|
||||
0.5,
|
||||
$stem_support_height
|
||||
], center = true);
|
||||
@@ -40,14 +40,14 @@ module tines_support(stem_type, stem_support_height, slop) {
|
||||
translate([x,0,$stem_support_height / 2]) {
|
||||
cube([
|
||||
0.5,
|
||||
total_key_height() + extra_height*2, // this is to extend past
|
||||
total_key_height()*2, // this is to extend past
|
||||
$stem_support_height
|
||||
], center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inside_cherry_cross(slop);
|
||||
inside_cherry_cross($stem_inner_slop);
|
||||
}
|
||||
} else if (stem_type == "cherry_stabilizer") {
|
||||
difference () {
|
||||
@@ -55,7 +55,7 @@ module tines_support(stem_type, stem_support_height, slop) {
|
||||
translate([x,0,$stem_support_height / 2]) {
|
||||
cube([
|
||||
1,
|
||||
total_key_height($wall_thickness),
|
||||
total_key_height()*2,
|
||||
$stem_support_height
|
||||
], center = true);
|
||||
}
|
||||
@@ -67,19 +67,19 @@ module tines_support(stem_type, stem_support_height, slop) {
|
||||
difference () {
|
||||
centered_tines(stem_support_height);
|
||||
|
||||
inside_cherry_cross(slop);
|
||||
inside_cherry_cross($stem_inner_slop);
|
||||
}
|
||||
} else if (stem_type == "rounded_cherry") {
|
||||
difference () {
|
||||
centered_tines(stem_support_height);
|
||||
|
||||
inside_cherry_cross(slop);
|
||||
inside_cherry_cross($stem_inner_slop);
|
||||
}
|
||||
} else if (stem_type == "alps"){
|
||||
centered_tines(stem_support_height);
|
||||
} else if (stem_type == "choc"){
|
||||
if ($key_length < 2) translate([0,0,$stem_support_height / 2]) cube([total_key_width($wall_thickness)+$wall_thickness/4, 0.42, $stem_support_height], center = true);
|
||||
/* translate([-5.7/2,0,$stem_support_height / 2]) cube([0.5, total_key_height($wall_thickness), $stem_support_height], center = true); */
|
||||
/* translate([5.7/2,0,$stem_support_height / 2]) cube([0.5, total_key_height($wall_thickness), $stem_support_height], center = true); */
|
||||
if ($key_length < 2) translate([0,0,$stem_support_height / 2]) cube([total_key_width(), 0.42, $stem_support_height], center = true);
|
||||
/* translate([-5.7/2,0,$stem_support_height / 2]) cube([0.5, total_key_height(), $stem_support_height], center = true); */
|
||||
/* translate([5.7/2,0,$stem_support_height / 2]) cube([0.5, total_key_height(), $stem_support_height], center = true); */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,6 @@ module box_cherry_stem(depth, slop, throw) {
|
||||
}
|
||||
|
||||
// inside cross
|
||||
inside_cherry_cross(slop);
|
||||
inside_cherry_cross($stem_inner_slop);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,6 @@ module rounded_cherry_stem(depth, slop, throw) {
|
||||
|
||||
// inside cross
|
||||
// translation purely for aesthetic purposes, to get rid of that awful lattice
|
||||
inside_cherry_cross(slop);
|
||||
inside_cherry_cross($stem_inner_slop);
|
||||
}
|
||||
}
|
||||
|
||||
35
yarn.lock
35
yarn.lock
@@ -445,12 +445,12 @@ copy-descriptor@^0.1.0:
|
||||
integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
|
||||
|
||||
copy-props@^2.0.1:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/copy-props/-/copy-props-2.0.4.tgz#93bb1cadfafd31da5bb8a9d4b41f471ec3a72dfe"
|
||||
integrity sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/copy-props/-/copy-props-2.0.5.tgz#03cf9ae328d4ebb36f8f1d804448a6af9ee3f2d2"
|
||||
integrity sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw==
|
||||
dependencies:
|
||||
each-props "^1.3.0"
|
||||
is-plain-object "^2.0.1"
|
||||
each-props "^1.3.2"
|
||||
is-plain-object "^5.0.0"
|
||||
|
||||
core-util-is@~1.0.0:
|
||||
version "1.0.2"
|
||||
@@ -538,7 +538,7 @@ duplexify@^3.6.0:
|
||||
readable-stream "^2.0.0"
|
||||
stream-shift "^1.0.0"
|
||||
|
||||
each-props@^1.3.0:
|
||||
each-props@^1.3.2:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/each-props/-/each-props-1.3.2.tgz#ea45a414d16dd5cfa419b1a81720d5ca06892333"
|
||||
integrity sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==
|
||||
@@ -1013,9 +1013,9 @@ homedir-polyfill@^1.0.1:
|
||||
parse-passwd "^1.0.0"
|
||||
|
||||
hosted-git-info@^2.1.4:
|
||||
version "2.8.8"
|
||||
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488"
|
||||
integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==
|
||||
version "2.8.9"
|
||||
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9"
|
||||
integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==
|
||||
|
||||
inflight@^1.0.4:
|
||||
version "1.0.6"
|
||||
@@ -1178,6 +1178,11 @@ is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4:
|
||||
dependencies:
|
||||
isobject "^3.0.1"
|
||||
|
||||
is-plain-object@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344"
|
||||
integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==
|
||||
|
||||
is-relative@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d"
|
||||
@@ -1624,9 +1629,9 @@ path-is-absolute@^1.0.0:
|
||||
integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
|
||||
|
||||
path-parse@^1.0.6:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
|
||||
integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
|
||||
version "1.0.7"
|
||||
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
|
||||
integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
|
||||
|
||||
path-root-regex@^0.1.0:
|
||||
version "0.1.2"
|
||||
@@ -2348,9 +2353,9 @@ xtend@~4.0.0, xtend@~4.0.1:
|
||||
integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
|
||||
|
||||
y18n@^3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
|
||||
integrity sha1-bRX7qITAhnnA136I53WegR4H+kE=
|
||||
version "3.2.2"
|
||||
resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696"
|
||||
integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==
|
||||
|
||||
yargs-parser@^5.0.0:
|
||||
version "5.0.1"
|
||||
|
||||
Reference in New Issue
Block a user