Compare commits

..

No commits in common. "master" and "dependabot/npm_and_yarn/path-parse-1.0.7" have entirely different histories.

58 changed files with 1297 additions and 16109 deletions

View File

@ -1,16 +0,0 @@
CHANGELOG:
V2.0.0:
* added $fa values for minkowski and shape - so you can customize how much rounding there is
* rejiggered `key.scad` pipeline for more clarity and less shapes
* implemented "3d_surface" dish - still in beta
* super cool though, you can even change the distribution of points on the surface! just make sure you use monotonically increasing functions
* created "hull" folder to house different ways of creating the overall key shape
* promoted "feature" folder to first-class folder with keytext and switch clearance as new residents
* wrote this changelog!
* implemented `$inner_shape_type`, use "flat" for less geometry or "disable" to make a completely solid key easily. didn't help render rounded keys though
* side-printed keycaps are first class! you can use the `sideways()` modifier to set up sideways keycaps that have flat sides to print on.
* it's much easier to make quick artisans now that the inside of the keycap is differenced from any additive features placed on top
* `$linear_extrude_shape` and `$skin_extrude_shape` retired in favor of `$hull_shape_type`
* added regular_polygon shape and octagonal and hexagonal key profiles
* added beta kailh choc
* Finally got ISO Enter working correctly!

View File

@ -9,14 +9,6 @@ Relevant links:
* Shapeways: https://www.shapeways.com/designer/rsheldiii/creations * Shapeways: https://www.shapeways.com/designer/rsheldiii/creations
* Buy me a coffee: https://ko-fi.com/rsheldiii, but only if you want to! * Buy me a coffee: https://ko-fi.com/rsheldiii, but only if you want to!
# V2.0.0 Cutover
As of February 19th, 2022, the v2.0.0 branch has been merged into master.
This branch completely rewrote key.scad to be much simpler and faster. If you're just starting out, please use master and report any bugs you find.
If you branched off this repo previously, merging to master will probably break any additions you've made. If you need the prior version of the code for whatever reason, v1.1.0 is master just before the v2.0.0 merge. I will be backporting bugfixes to the v1 branch, so if you see v1.1.1 or higher, use that instead.
## How to run ## How to run
#### OpenSCAD Proper (recommended way) #### OpenSCAD Proper (recommended way)
@ -25,19 +17,7 @@ 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. 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/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. 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.
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. All examples below assume you are running the library on your computer with OpenSCAD.
@ -90,7 +70,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! 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 print layouts with a brim that extends to the next key. It is recommended to use tined stem support and set `$extra_long_stem_support = true` if you plan on printing these keycaps.
``` ```
60_percent_default("dcs") key(); 60_percent_default("dcs") key();
@ -198,7 +178,9 @@ Prints from this library are still challenging, despite all efforts to the contr
That's it, if you have any questions feel free to open an issue or leave a comment on thingiverse! That's it, if you have any questions feel free to open an issue or leave a comment on thingiverse!
## TODO: ## TODO:
moved to [TODO doc](./TODO.md) * replace linear_extrude_shape_hull with skin_extrude_shape_hull or something, to enable concave extrusions
* replace current ISO enter shape with one that works for `skin()`
* generate dishes via math?
## Contributions welcome ## Contributions welcome

View File

@ -14,7 +14,7 @@ At the end of the day though, all the columnular sculpting is doing is adding ex
## skin mode ## skin mode
SA, HiPro and DSA keycaps take _forever_ to render. This is a multifaceted issue that I don't want to get into here, but suffice to say _one_ of the reasons it takes so long is how the keycap is constructed from multiple, smaller slices. OpenSCAD takes more time to render the more objects you have, regardless of how they interact. Enter `$hull_shape_type = "skin"`. SA, HiPro and DSA keycaps take _forever_ to render. This is a multifaceted issue that I don't want to get into here, but suffice to say _one_ of the reasons it takes so long is how the keycap is constructed from multiple, smaller slices. OpenSCAD takes more time to render the more objects you have, regardless of how they interact. Enter `$skin_extrude_shape = true`.
`skin()` is a list comprehension function available [here](https://github.com/openscad/list-comprehension-demos/blob/master/skin.scad). The gist of it is that instead of having x number of keycap slices unioned together, we give `skin()` a set of profiles and it makes a single object out of it for us. This reduces the number of objects per keycap, which makes it easier to render them. `skin()` is a list comprehension function available [here](https://github.com/openscad/list-comprehension-demos/blob/master/skin.scad). The gist of it is that instead of having x number of keycap slices unioned together, we give `skin()` a set of profiles and it makes a single object out of it for us. This reduces the number of objects per keycap, which makes it easier to render them.

13
TODO.md
View File

@ -1,13 +0,0 @@
TODO:
* implement key_shape_at_progress which allows you to query for the exact 2d outline of the keycap at a given height
* this makes certain functions easier - building the envelope for instance
* requires breaking out shape_slice, and creating a polygon of the skin_shape_slice slices
* dishes add / remove height from keycaps, particularly spherical dishes
* a bandaid solution would be to allow you to modify where the keytop is along the progression of the keycap
* you can't just set a new total_depth because of how width_difference and height_difference work
* the true solution would be to rewrite how the dishes work to make them very graduated at the edges
* 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

File diff suppressed because it is too large Load Diff

View File

@ -17,4 +17,4 @@ dcs_row(5) legend("⇪", size=9) key();
} */ } */
// example layout // example layout
/* preonic_default("dcs") key(); */ /* preonic_default("dcs"); */

View File

@ -1,4 +1,3 @@
// a safe theoretical distance between two vertices such that they don't collapse. hard to use
SMALLEST_POSSIBLE = 1/128; SMALLEST_POSSIBLE = 1/128;
$fs=0.1; $fs = .1;
$unit=19.05; $unit = 19.05;

View File

@ -4,8 +4,6 @@ include <dishes/cylindrical.scad>
include <dishes/old_spherical.scad> include <dishes/old_spherical.scad>
include <dishes/sideways_cylindrical.scad> include <dishes/sideways_cylindrical.scad>
include <dishes/spherical.scad> include <dishes/spherical.scad>
include <dishes/squared_spherical.scad>
include <dishes/squared_scoop.scad>
include <dishes/flat.scad> include <dishes/flat.scad>
include <dishes/3d_surface.scad> include <dishes/3d_surface.scad>
@ -16,22 +14,20 @@ geodesic=false;
module dish(width, height, depth, inverted) { module dish(width, height, depth, inverted) {
if($dish_type == "cylindrical"){ if($dish_type == "cylindrical"){
cylindrical_dish(width, height, depth, inverted); cylindrical_dish(width, height, depth, inverted);
} else if ($dish_type == "spherical") { }
else if ($dish_type == "spherical") {
spherical_dish(width, height, depth, inverted); spherical_dish(width, height, depth, inverted);
} else if ($dish_type == "sideways cylindrical"){ }
else if ($dish_type == "sideways cylindrical"){
sideways_cylindrical_dish(width, height, depth, inverted); sideways_cylindrical_dish(width, height, depth, inverted);
} else if ($dish_type == "old spherical") { } else if ($dish_type == "old spherical") {
old_spherical_dish(width, height, depth, inverted); old_spherical_dish(width, height, depth, inverted);
} else if ($dish_type == "3d surface") { } else if ($dish_type == "3d_surface") {
3d_surface_dish(width, height, depth, inverted); 3d_surface_dish(width, height, depth, inverted);
} else if ($dish_type == "flat") { } else if ($dish_type == "flat") {
flat_dish(width, height, depth, inverted); flat_dish(width, height, depth, inverted);
} else if ($dish_type == "disable") { } else if ($dish_type == "disable") {
// else no dish // else no dish
} else if ($dish_type == "squared spherical") {
squared_spherical_dish(width, height, depth, inverted=inverted);
} else if ($dish_type == "squared scoop") {
squared_scoop_dish(width, height, depth, inverted=inverted);
} else { } else {
echo("WARN: $dish_type unsupported"); echo("WARN: $dish_type unsupported");
} }

View File

@ -6,11 +6,9 @@ module 3d_surface_dish(width, height, depth, inverted) {
// it doesn't have to be dead reckoning for anything but sculpted sides // it doesn't have to be dead reckoning for anything but sculpted sides
// we know the angle of the sides from the width difference, height difference, // we know the angle of the sides from the width difference, height difference,
// skew and tilt of the top. it's a pain to calculate though // skew and tilt of the top. it's a pain to calculate though
scale_factor = 1.05; scale_factor = 1.1;
// the edges on this behave differently than with the previous dish implementations // the edges on this behave differently than with the previous dish implementations
scale([width*scale_factor/$3d_surface_size/2,height*scale_factor/$3d_surface_size/2,depth]) scale([width*scale_factor/$3d_surface_size/2,height*scale_factor/$3d_surface_size/2,depth]) rotate([inverted ? 0:180,0,90]) polar_3d_surface(bottom=-10);
rotate([inverted ? 0:180,0,180])
polar_3d_surface(size=$3d_surface_size, step=$3d_surface_step, bottom=-10);
/* %scale([width*scale_factor/$3d_surface_size/2,height*scale_factor/$3d_surface_size/2,depth]) rotate([180,0,0]) polar_3d_surface(bottom=-10); */ /* %scale([width*scale_factor/$3d_surface_size/2,height*scale_factor/$3d_surface_size/2,depth]) rotate([180,0,0]) polar_3d_surface(bottom=-10); */
} }

View File

@ -1,8 +1,4 @@
module spherical_dish(width, height, depth, inverted){ module spherical_dish(width, height, depth, inverted){
// these variables take into account corner_radius and corner_sculpting, resulting in a more correct dish
// they don't fix the core issue though (dishes adding / subtracting height on the edges of the keycap), so I've disabled them
// new_width = $key_shape_type == "sculpted_square" ? width - distance_between_circumscribed_and_inscribed($corner_radius + $corner_sculpting(1)) : width;
// new_height = $key_shape_type == "sculpted_square" ? height - distance_between_circumscribed_and_inscribed($corner_radius + $corner_sculpting(1)) : height;
//same thing as the cylindrical dish here, but we need the corners to just touch - so we have to find the hypotenuse of the top //same thing as the cylindrical dish here, but we need the corners to just touch - so we have to find the hypotenuse of the top
chord = pow((pow(width,2) + pow(height, 2)),0.5); //getting diagonal of the top chord = pow((pow(width,2) + pow(height, 2)),0.5); //getting diagonal of the top

View File

@ -1,34 +0,0 @@
module squared_scoop_dish(height, width, depth, r=0.5, inverted=false, num=4, den=5){
// changable numerator/denoninator on where to place the square's corners
// for example, num=2, den=3 means the dish will happen at 1/3 and 2/3 the
// width and the height. Defaults to 4/5. Customizable when calling
// this module
//
// This was initially intended for the scoop on the HiPro, since that's what
// it uses. Use "hipro_row()" if that's what you'd like. However, I do NOT
// know how close the inner square is for the HiPro keycaps. In fact, it could
// just be a sphere, in which the "squared spherical" scoop is more appropriate.
// If, however, it the "squared scoop" makes sense, you can adjust where the square
// lands with the num (numerator) and den (denominator) variables. For instance,
// "3" and "4" mean 3/4 of the width/height is where the flat part starts.
chord = pow(pow(height/2, 2) + pow(width/2, 2),0.5);
direction = inverted ? -1 : 1;
//This is the set of points to hull around for the scoop
points=[
[height/den - height/2, width/den - width/2, -chord],
[num*height/den - height/2, width/den - width/2, -chord],
[height/den - height/2, num*width/den - width/2, -chord],
[num*height/den - height/2, num*width/den - width/2, -chord]
];
resize([height,width,depth])
hull() {
shape_slice(1,0,0);
for(i=[0:len(points)-1]) {
translate(points[i])
sphere(r=r,$fn=64);
}
}
}

View File

@ -1,22 +0,0 @@
module squared_spherical_dish(width, height, depth, inverted=false) {
chord = pow(pow(height / 2, 2) + pow(width / 2, 2),0.5);
direction = inverted ? -1 : 1;
r=max(height,width,chord) / 5;
// ^^^^^ Nothing special about this code to figure out r.
// I just modeled up 1u, 1.25u, 1.5u, 2u, 2.25u, and 2.75u
// keys and messed around until I came up with something that
// looked reasonable for all key sizes. This just seems to work
// well for all sizes
translate([-width / 2, -height / 2, 0 * direction]) {
resize([width, height, depth])
hull() {
cube([chord,chord,0.001]);
// Use something larger in this translate than -depth
// (like -chord) if you want more of a defined circle
// in the keywell
translate([chord/2, chord/2, -depth])
sphere(r=r, $fn=128);
}
}
}

View File

@ -1,5 +0,0 @@
// features are any premade self-contained objects that go on top or inside
include <features/key_bump.scad>
include <features/clearance_check.scad>
include <features/legends.scad>

View File

@ -1,24 +0,0 @@
// a fake cherry keyswitch, abstracted out to maybe replace with a better one later
module cherry_keyswitch() {
union() {
hull() {
cube([15.6, 15.6, 0.01], center=true);
translate([0,1,5 - 0.01]) cube([10.5,9.5, 0.01], center=true);
}
hull() {
cube([15.6, 15.6, 0.01], center=true);
translate([0,0,-5.5]) cube([13.5,13.5,0.01], center=true);
}
}
}
//approximate (fully depressed) cherry key to check clearances
module clearance_check() {
if($stem_type == "cherry" || $stem_type == "cherry_rounded"){
color($warning_color){
translate([0,0,3.6 + $stem_inset - 5]) {
cherry_keyswitch();
}
}
}
}

View File

@ -1,26 +0,0 @@
module keytext(text, position, font_size, font_face, depth) {
woffset = (top_total_key_width()/3.5) * position[0];
hoffset = (top_total_key_height()/3.5) * -position[1];
translate([woffset, hoffset, -depth]){
color($tertiary_color) linear_extrude(height=$dish_depth + depth){
text(text=text, font=font_face, size=font_size, halign="center", valign="center");
}
}
}
module legends(depth=0) {
if (len($front_legends) > 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], $front_legends[i][3], depth);
}
}
}
if (len($legends) > 0) {
top_of_key() {
for (i=[0:len($legends)-1]) {
keytext($legends[i][0], $legends[i][1], $legends[i][2], $legends[i][3], depth);
}
}
}
}

View File

@ -1,12 +1,9 @@
include <constants.scad> include <constants.scad>
include <settings.scad>
// I use functions when I need to compute special variables off of other special variables // I use functions when I need to compute special variables off of other special variables
// functions need to be explicitly included, unlike special variables, which // functions need to be explicitly included, unlike special variables, which
// just need to have been set before they are used. hence this file // just need to have been set before they are used. hence this file
function stem_height() = $total_depth - ($dish_depth * ($inverted_dish ? -1 : 1)) - $stem_inset;
// cherry stem dimensions // cherry stem dimensions
function outer_cherry_stem(slop) = [7.2 - slop * 2, 5.5 - slop * 2]; function outer_cherry_stem(slop) = [7.2 - slop * 2, 5.5 - slop * 2];
@ -24,10 +21,6 @@ function cherry_cross(slop, extra_vertical = 0) = [
[1.15 + slop / 3, 4.23 + extra_vertical + slop / 3 + SMALLEST_POSSIBLE], [1.15 + slop / 3, 4.23 + extra_vertical + slop / 3 + SMALLEST_POSSIBLE],
]; ];
// TODO add side_sculpting
function key_width_at_progress(progress = 0) = $bottom_key_width + ($unit * ($key_length - 1)) - $width_difference;
function key_height_at_progress(progress = 0) = $bottom_key_height + ($unit * ($key_height - 1)) - $height_difference + $side_sculpting(progress);
// actual mm key width and height // actual mm key width and height
function total_key_width(delta = 0) = $bottom_key_width + $unit * ($key_length - 1) - delta; function total_key_width(delta = 0) = $bottom_key_width + $unit * ($key_length - 1) - delta;
function total_key_height(delta = 0) = $bottom_key_height + $unit * ($key_height - 1) - delta; function total_key_height(delta = 0) = $bottom_key_height + $unit * ($key_height - 1) - delta;
@ -38,7 +31,7 @@ function top_total_key_height() = $bottom_key_height + ($unit * ($key_height - 1
function side_tilt(column) = asin($unit * column / $double_sculpt_radius); 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 // 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. // (I think) extra length of the side of the keycap due to the keytop being tilted.
// necessary for calculating flat sided keycaps // necessary for calculating flat sided keycaps
@ -48,11 +41,25 @@ function vertical_inclination_due_to_top_tilt() = sin($top_tilt) * (top_total_ke
// I derived this through a bunch of trig reductions I don't really understand. // I derived this through a bunch of trig reductions I don't really understand.
function extra_keytop_length_for_flat_sides() = ($width_difference * vertical_inclination_due_to_top_tilt()) / ($total_depth); function extra_keytop_length_for_flat_sides() = ($width_difference * vertical_inclination_due_to_top_tilt()) / ($total_depth);
// 3d surface functions (still in beta)
// monotonically increasing function that distributes the points of the surface mesh
// only for polar_3d_surface right now
// if it's linear it's a grid. sin(dim) * size concentrates detail around the edges
function surface_distribution_function(dim, size) = sin(dim) * size;
// the function that actually determines what the surface is.
// feel free to override, the last one wins
// debug
function surface_function(x,y) = 1;
// cylindrical
function surface_function(x,y) = (sin(acos(x/$3d_surface_size)));
// spherical
function surface_function(x,y) = (sin(acos(x/$3d_surface_size))) * sin(acos(y/$3d_surface_size));
// (statically) random!
/* function surface_function(x,y) = sin(rands(0,90,1,x+y)[0]); */
// adds uniform rounding radius for round-anything polyRound // adds uniform rounding radius for round-anything polyRound
function add_rounding(p, radius)=[for(i=[0:len(p)-1])[p[i].x,p[i].y, radius]]; function add_rounding(p, radius)=[for(i=[0:len(p)-1])[p[i].x,p[i].y, radius]];
// computes millimeter length from unit length // computes millimeter length from unit length
function unit_length(length) = $unit * (length - 1) + 18.16; function unit_length(length) = unit * (length - 1) + 18.16;
// if you have a radius of an inscribed circle, this function gives you the extra length for the radius of the circumscribed circle
// and vice versa. used to find the edge of a rounded_square
function distance_between_circumscribed_and_inscribed(radius) = (pow(2, 0.5) - 1) * radius;

View File

@ -1,19 +0,0 @@
include <hulls/skin.scad>
include <hulls/linear_extrude.scad>
include <hulls/hull.scad>
// basic key shape, no dish, no inside
// which is only used for dishing to cut the dish off correctly
// $height_difference used for keytop thickness
// extra_slices is a hack to make inverted dishes still work
module shape_hull(thickness_difference, depth_difference, extra_slices = 0){
render() {
if ($hull_shape_type == "skin") {
skin_extrude_shape_hull(thickness_difference, depth_difference, extra_slices);
} else if ($hull_shape_type == "linear extrude") {
linear_extrude_shape_hull(thickness_difference, depth_difference, extra_slices);
} else {
hull_shape_hull(thickness_difference, depth_difference, extra_slices);
}
}
}

View File

@ -1,37 +0,0 @@
module hull_shape_hull(thickness_difference, depth_difference, extra_slices = 0) {
for (index = [0:$height_slices - 1 + extra_slices]) {
hull() {
placed_shape_slice(index / $height_slices, thickness_difference, depth_difference);
placed_shape_slice((index + 1) / $height_slices, thickness_difference, depth_difference);
}
}
}
module placed_shape_slice(progress, thickness_difference, depth_difference) {
skew_this_slice = $top_skew * progress;
x_skew_this_slice = $top_skew_x * progress;
depth_this_slice = ($total_depth - depth_difference) * progress;
tilt_this_slice = -$top_tilt / $key_height * progress;
y_tilt_this_slice = $double_sculpted ? (-$top_tilt_y / $key_length * progress) : 0;
translate([x_skew_this_slice, skew_this_slice, depth_this_slice]) {
rotate([tilt_this_slice,y_tilt_this_slice,0]){
shape_slice(progress, thickness_difference, depth_difference);
}
}
}
module shape_slice(progress, thickness_difference, depth_difference) {
linear_extrude(height = SMALLEST_POSSIBLE, scale = 1){
key_shape(
[
total_key_width(thickness_difference),
total_key_height(thickness_difference)
],
[$width_difference, $height_difference],
progress
);
}
}

View File

@ -1,18 +0,0 @@
// corollary is hull_shape_hull
// extra_slices unused, only to match argument signatures
module linear_extrude_shape_hull(thickness_difference, depth_difference, extra_slices = 0){
height = $total_depth - depth_difference;
width_scale = top_total_key_width() / total_key_width();
height_scale = top_total_key_height() / total_key_height();
translate([0,$linear_extrude_height_adjustment,0]){
linear_extrude(height = height, scale = [width_scale, height_scale]) {
translate([0,-$linear_extrude_height_adjustment,0]){
key_shape(
[total_key_width(), total_key_height()],
[thickness_difference, thickness_difference]
);
}
}
}
}

View File

@ -1,34 +0,0 @@
// 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
// a lot more difficult to use
module skin_extrude_shape_hull(thickness_difference, depth_difference, extra_slices = 0 ) {
skin([
for (index = [0:$height_slices + extra_slices])
let(
progress = (index / $height_slices),
skew_this_slice = $top_skew * progress,
x_skew_this_slice = $top_skew_x * progress,
depth_this_slice = ($total_depth - depth_difference) * progress,
tilt_this_slice = -$top_tilt / $key_height * progress,
y_tilt_this_slice = $double_sculpted ? (-$top_tilt_y / $key_length * progress) : 0
)
skin_shape_slice(progress, thickness_difference, skew_this_slice, x_skew_this_slice, depth_this_slice, tilt_this_slice, y_tilt_this_slice)
]);
}
function skin_shape_slice(progress, thickness_difference, skew_this_slice, x_skew_this_slice, depth_this_slice, tilt_this_slice, y_tilt_this_slice) =
transform(
translation([x_skew_this_slice,skew_this_slice,depth_this_slice]),
transform(
rotation([tilt_this_slice,y_tilt_this_slice,0]),
skin_key_shape([
total_key_width(0) - thickness_difference,
total_key_height(0) - thickness_difference,
],
[$width_difference, $height_difference],
progress,
thickness_difference
)
)
);

View File

@ -6,8 +6,7 @@ include <stems.scad>
include <stem_supports.scad> include <stem_supports.scad>
include <dishes.scad> include <dishes.scad>
include <supports.scad> include <supports.scad>
include <features.scad> include <key_features.scad>
include <hulls.scad>
include <libraries/geodesic_sphere.scad> include <libraries/geodesic_sphere.scad>
@ -17,126 +16,183 @@ use <libraries/scad-utils/lists.scad>
use <libraries/scad-utils/shapes.scad> use <libraries/scad-utils/shapes.scad>
use <libraries/skin.scad> use <libraries/skin.scad>
// key shape including dish. used as the outside and inside shape in hollow_key(). allows for itself to be shrunk in depth and width / height // key shape including dish. used as the ouside and inside shape in hollow_key(). allows for itself to be shrunk in depth and width / height
module shape(thickness_difference, depth_difference=0){ module shape(thickness_difference, depth_difference=0){
dished(depth_difference, $inverted_dish) { dished(depth_difference, $inverted_dish) {
color($primary_color) shape_hull(thickness_difference, depth_difference, $inverted_dish ? 200 : 0); /* %shape_hull(thickness_difference, depth_difference, $inverted_dish ? 2 : 0); */
color($primary_color) shape_hull(thickness_difference, depth_difference, $inverted_dish ? 2 : 0);
} }
} }
// shape of the key but with soft, rounded edges. no longer includes dish
// randomly doesnt work sometimes
// the dish doesn't _quite_ reach as far as it should
module rounded_shape() { module rounded_shape() {
dished(-$minkowski_radius, $inverted_dish) {
color($primary_color) minkowski(){
// half minkowski in the z direction
color($primary_color) shape_hull($minkowski_radius * 2, $minkowski_radius/2, $inverted_dish ? 2 : 0);
/* cube($minkowski_radius); */
sphere(r=$minkowski_radius, $fn=$minkowski_facets);
}
}
/* %envelope(); */
}
// this function is more correct, but takes _forever_
// the main difference is minkowski happens after dishing, meaning the dish is
// also minkowski'd
/* module rounded_shape() {
color($primary_color) minkowski(){ color($primary_color) minkowski(){
// half minkowski in the z direction // half minkowski in the z direction
shape($minkowski_radius * 2, $minkowski_radius/2); shape($minkowski_radius * 2, $minkowski_radius/2);
minkowski_object();
}
}
// minkowski places this object at every vertex of the other object then mashes
// it all together
module minkowski_object() {
// alternative minkowski shape that needs the bottom of the keycap to be trimmed
/* sphere(1); */
difference(){
sphere(r=$minkowski_radius, $fa=360/$minkowski_facets);
translate([0,0,-$minkowski_radius]){
cube($minkowski_radius * 2, center=true);
}
}
}
module envelope(depth_difference=0, extra_floor_depth=0) {
size = 1.5;
hull(){
translate([0,0,extra_floor_depth]) cube([key_width_at_progress(extra_floor_depth / $total_depth) * size, key_height_at_progress(extra_floor_depth / $total_depth) * size, 0.01], center = true);
top_placement(SMALLEST_POSSIBLE + depth_difference){
cube([top_total_key_width() * size, top_total_key_height() * size, 0.01], center = true);
}
}
}
// for when you want to take the dish out of things
// used for adding the dish to the key shape and making sure stems don't stick out the top
// creates a bounding box 1.5 times larger in width and height than the keycap.
module dished(depth_difference = 0, inverted = false) {
intersection() {
children();
difference(){ difference(){
union() { sphere(r=$minkowski_radius, $fn=20);
// envelope is needed to "fill in" the rest of the keycap. intersections with small objects are much faster than differences with large objects translate([0,0,-$minkowski_radius]){
envelope(depth_difference, $stem_inset); cube($minkowski_radius * 2, center=true);
if (inverted) top_placement(depth_difference) color($secondary_color) _dish(inverted);
} }
if (!inverted) top_placement(depth_difference) color($secondary_color) _dish(inverted); }
// %top_placement(depth_difference) _dish(); }
} */
// basic key shape, no dish, no inside
// which is only used for dishing to cut the dish off correctly
// $height_difference used for keytop thickness
// extra_slices is a hack to make inverted dishes still work
module shape_hull(thickness_difference, depth_difference, extra_slices = 0){
render() {
if ($skin_extrude_shape) {
skin_extrude_shape_hull(thickness_difference, depth_difference, extra_slices);
} else if ($linear_extrude_shape) {
linear_extrude_shape_hull(thickness_difference, depth_difference, extra_slices);
} else {
hull_shape_hull(thickness_difference, depth_difference, extra_slices);
} }
} }
} }
// just to DRY up the code // use skin() instead of successive hulls. much more correct, and looks faster
// TODO is putting special vars in function signatures legal // too, in most cases. successive hull relies on overlapping faces which are
module _dish(inverted=$inverted_dish) { // not good. But, skin works on vertex sets instead of shapes, which makes it
translate([$dish_offset_x,0,0]) color($secondary_color) // a lot more difficult to use
dish(top_total_key_width() + $dish_overdraw_width, top_total_key_height() + $dish_overdraw_height, $dish_depth, inverted); module skin_extrude_shape_hull(thickness_difference, depth_difference, extra_slices = 0 ) {
// %dish(top_total_key_width() + $dish_overdraw_width, top_total_key_height() + $dish_overdraw_height, $dish_depth, inverted); skin([
for (index = [0:$height_slices + extra_slices])
let(
progress = (index / $height_slices),
skew_this_slice = $top_skew * progress,
x_skew_this_slice = $top_skew_x * progress,
depth_this_slice = ($total_depth - depth_difference) * progress,
tilt_this_slice = -$top_tilt / $key_height * progress,
y_tilt_this_slice = $double_sculpted ? (-$top_tilt_y / $key_length * progress) : 0
)
skin_shape_slice(progress, thickness_difference, skew_this_slice, x_skew_this_slice, depth_this_slice, tilt_this_slice, y_tilt_this_slice)
]);
} }
// puts its children at each keystem position provided function skin_shape_slice(progress, thickness_difference, skew_this_slice, x_skew_this_slice, depth_this_slice, tilt_this_slice, y_tilt_this_slice) =
module keystem_positions(positions) { transform(
for (connector_pos = positions) { translation([x_skew_this_slice,skew_this_slice,depth_this_slice]),
translate(connector_pos) { transform(
rotate([0, 0, $stem_rotation]){ rotation([tilt_this_slice,y_tilt_this_slice,0]),
children(); skin_key_shape([
total_key_width(0),
total_key_height(0),
],
[$width_difference, $height_difference],
progress,
thickness_difference
)
)
);
// corollary is hull_shape_hull
// extra_slices unused, only to match argument signatures
module linear_extrude_shape_hull(thickness_difference, depth_difference, extra_slices = 0){
height = $total_depth - depth_difference;
width_scale = top_total_key_width() / total_key_width();
height_scale = top_total_key_height() / total_key_height();
translate([0,$linear_extrude_height_adjustment,0]){
linear_extrude(height = height, scale = [width_scale, height_scale]) {
translate([0,-$linear_extrude_height_adjustment,0]){
key_shape(
[total_key_width(thickness_difference), total_key_height(thickness_difference)],
[$width_difference, $height_difference]
);
} }
} }
} }
} }
module support_for(positions, stem_type) { module hull_shape_hull(thickness_difference, depth_difference, extra_slices = 0) {
keystem_positions(positions) { for (index = [0:$height_slices - 1 + extra_slices]) {
color($tertiary_color) supports($support_type, stem_type, $stem_throw, $total_depth - $stem_throw); hull() {
shape_slice(index / $height_slices, thickness_difference, depth_difference);
shape_slice((index + 1) / $height_slices, thickness_difference, depth_difference);
}
} }
} }
module stems_for(positions, stem_type) { module shape_slice(progress, thickness_difference, depth_difference) {
keystem_positions(positions) { skew_this_slice = $top_skew * progress;
color($tertiary_color) stem(stem_type, stem_height(), $stem_slop, $stem_throw); x_skew_this_slice = $top_skew_x * progress;
if ($stem_support_type != "disable") {
color($quaternary_color) stem_support($stem_support_type, stem_type, $stem_support_height, $stem_slop); depth_this_slice = ($total_depth - depth_difference) * progress;
tilt_this_slice = -$top_tilt / $key_height * progress;
y_tilt_this_slice = $double_sculpted ? (-$top_tilt_y / $key_length * progress) : 0;
translate([x_skew_this_slice, skew_this_slice, depth_this_slice]) {
rotate([tilt_this_slice,y_tilt_this_slice,0]){
linear_extrude(height = SMALLEST_POSSIBLE){
key_shape(
[
total_key_width(thickness_difference),
total_key_height(thickness_difference)
],
[$width_difference, $height_difference],
progress
);
}
} }
} }
} }
// for when you want something to only exist inside the keycap.
// used for the support structure
module inside() {
intersection() {
shape($wall_thickness, $keytop_thickness);
children();
}
}
// for when you want something to only exist outside the keycap
module outside() {
difference() {
children();
shape($wall_thickness, $keytop_thickness);
}
}
// put something at the top of the key, with no adjustments for dishing // put something at the top of the key, with no adjustments for dishing
module top_placement(depth_difference=0) { module top_placement(depth_difference=0) {
top_tilt_by_height = -$top_tilt / $key_height; top_tilt_by_height = -$top_tilt / $key_height;
top_tilt_y_by_length = $double_sculpted ? (-$top_tilt_y / $key_length) : 0; top_tilt_y_by_length = $double_sculpted ? (-$top_tilt_y / $key_length) : 0;
// minkowski_height = $rounded_key ? $minkowski_radius : 0; minkowski_height = $rounded_key ? $minkowski_radius : 0;
translate([$top_skew_x + $dish_skew_x, $top_skew + $dish_skew_y, $total_depth - depth_difference]){ translate([$top_skew_x + $dish_skew_x, $top_skew + $dish_skew_y, $total_depth - depth_difference + minkowski_height/2]){
rotate([top_tilt_by_height, top_tilt_y_by_length,0]){ rotate([top_tilt_by_height, top_tilt_y_by_length,0]){
children(); children();
} }
} }
} }
// puts its children at the center of the dishing on the key, including dish height module front_placement() {
// more user-friendly than top_placement
module top_of_key(){
// if there is a dish, we need to account for how much it digs into the top
dish_depth = ($dish_type == "disable") ? 0 : $dish_depth;
// if the dish is inverted, we need to account for that too. in this case we do half, otherwise the children would be floating on top of the dish
corrected_dish_depth = ($inverted_dish) ? -dish_depth / 2 : dish_depth;
top_placement(corrected_dish_depth) {
children();
}
}
module front_of_key() {
// all this math is to take top skew and tilt into account // all this math is to take top skew and tilt into account
// we need to find the new effective height and depth of the top, front lip // we need to find the new effective height and depth of the top, front lip
// of the keycap to find the angle so we can rotate things correctly into place // of the keycap to find the angle so we can rotate things correctly into place
@ -155,108 +211,217 @@ module front_of_key() {
} }
} }
module outer_shape() { // just to DRY up the code
if ($rounded_key == true) { module _dish() {
rounded_shape(); translate([$dish_offset_x,0,0]) dish(top_total_key_width() + $dish_overdraw_width, top_total_key_height() + $dish_overdraw_height, $dish_depth, $inverted_dish);
} else { }
shape(0, 0);
module envelope(depth_difference=0) {
s = 1.5;
hull(){
cube([total_key_width() * s, total_key_height() * s, 0.01], center = true);
top_placement(SMALLEST_POSSIBLE + depth_difference){
cube([top_total_key_width() * s, top_total_key_height() * s, 0.01], center = true);
}
} }
} }
module inner_shape(extra_wall_thickness = 0, extra_keytop_thickness = 0) { // I think this is unused
if ($inner_shape_type == "flat") { module dished_for_show() {
/* $key_shape_type="square"; */ difference(){
$height_slices = 1; union() {
// if inner_shape is flat, keytop_thickness will be dish_depth less than it should be, since the dish digs in that far. envelope();
// so, we add dish_depth here if ($inverted_dish) top_placement(0) color($secondary_color) _dish();
color($primary_color) shape_hull($wall_thickness + extra_wall_thickness, $keytop_thickness + extra_keytop_thickness + $dish_depth, 0); }
} else { if (!$inverted_dish) top_placement(0) color($secondary_color) _dish();
shape($wall_thickness + extra_wall_thickness, $keytop_thickness + extra_keytop_thickness);
} }
} }
// additive objects at the top of the key
module additive_features(inset) {
top_of_key() {
if($key_bump) keybump($key_bump_depth, $key_bump_edge);
if(!inset && $children > 0) color($secondary_color) children();
}
if($outset_legends) legends(0);
// render the clearance check if it's enabled, but don't have it intersect with anything
if ($clearance_check) %clearance_check();
}
// subtractive objects at the top of the key // for when you want to take the dish out of things
module subtractive_features(inset) { // used for adding the dish to the key shape and making sure stems don't stick out the top
top_of_key() { // creates a bounding box 1.5 times larger in width and height than the keycap.
if (inset && $children > 0) color($secondary_color) children(); module dished(depth_difference = 0, inverted = false) {
} intersection() {
if(!$outset_legends) legends($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
/* if ($clearance_check) clearance_check(); */
}
// features inside the key itself (stem, supports, etc)
module inside_features() {
// Stems and stabilizers are not "inside features" unless they are fully
// contained inside the cap. otherwise they'd be cut off when they are
// differenced with the outside shape. this only matters if $stem_inset
// is negative
if ($stem_inset >= 0) stems_and_stabilizers();
if ($support_type != "disable") translate([0, 0, $stem_inset]) support_for($stem_positions, $stem_type);
if ($stabilizer_type != "disable") translate([0, 0, $stem_inset]) support_for($stabilizers, $stabilizer_type);
}
// all stems and stabilizers
module stems_and_stabilizers() {
translate([0, 0, $stem_inset]) {
if ($stabilizer_type != "disable") stems_for($stabilizers, $stabilizer_type);
if ($stem_type != "disable") stems_for($stem_positions, $stem_type);
}
}
// helpers for doubleshot keycaps for now
module inner_total_shape() {
difference() {
inner_shape();
inside_features();
}
}
module outer_total_shape(inset=false) {
outer_shape();
additive_features(inset) {
children(); children();
}; difference(){
union() {
envelope(depth_difference);
if (inverted) top_placement(depth_difference) color($secondary_color) _dish();
}
if (!inverted) top_placement(depth_difference) color($secondary_color) _dish();
/* %top_placement(depth_difference) _dish(); */
}
}
} }
// puts it's children at the center of the dishing on the key, including dish height
// more user-friendly than top_placement
module top_of_key(){
// if there is a dish, we need to account for how much it digs into the top
dish_depth = ($dish_type == "disable") ? 0 : $dish_depth;
// if the dish is inverted, we need to account for that too. in this case we do half, otherwise the children would be floating on top of the dish
corrected_dish_depth = ($inverted_dish) ? -dish_depth / 2 : dish_depth;
top_placement(corrected_dish_depth) {
children();
}
}
module keytext(text, position, font_size, depth) {
woffset = (top_total_key_width()/3.5) * position[0];
hoffset = (top_total_key_height()/3.5) * -position[1];
translate([woffset, hoffset, -depth]){
color($tertiary_color) linear_extrude(height=$dish_depth){
text(text=text, font=$font, size=font_size, halign="center", valign="center");
}
}
}
module keystem_positions(positions) {
for (connector_pos = positions) {
translate(connector_pos) {
rotate([0, 0, $stem_rotation]){
children();
}
}
}
}
module support_for(positions, stem_type) {
keystem_positions(positions) {
color($tertiary_color) supports($support_type, stem_type, $stem_throw, $total_depth - $stem_throw);
}
}
module stems_for(positions, stem_type) {
keystem_positions(positions) {
color($tertiary_color) stem(stem_type, $total_depth, $stem_slop, $stem_throw);
if ($stem_support_type != "disable") {
color($quaternary_color) stem_support($stem_support_type, stem_type, $stem_support_height, $stem_slop);
}
}
}
// a fake cherry keyswitch, abstracted out to maybe replace with a better one later
module cherry_keyswitch() {
union() {
hull() {
cube([15.6, 15.6, 0.01], center=true);
translate([0,1,5 - 0.01]) cube([10.5,9.5, 0.01], center=true);
}
hull() {
cube([15.6, 15.6, 0.01], center=true);
translate([0,0,-5.5]) cube([13.5,13.5,0.01], center=true);
}
}
}
//approximate (fully depressed) cherry key to check clearances
module clearance_check() {
if($stem_type == "cherry" || $stem_type == "cherry_rounded"){
color($warning_color){
translate([0,0,3.6 + $stem_inset - 5]) {
cherry_keyswitch();
}
}
}
}
module legends(depth=0) {
if (len($front_legends) > 0) {
front_placement() {
if (len($front_legends) > 0) {
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($legends) > 0) {
top_of_key() {
// outset legend
if (len($legends) > 0) {
for (i=[0:len($legends)-1]) {
keytext($legends[i][0], $legends[i][1], $legends[i][2], depth);
}
}
}
}
}
// legends / artisan support
module artisan(depth) {
top_of_key() {
// artisan objects / outset shape legends
color($secondary_color) children();
}
}
// key with hollowed inside but no stem
module hollow_key() {
difference(){
if ($rounded_key) {
rounded_shape();
} else {
shape(0, 0);
}
// translation purely for aesthetic purposes, to get rid of that awful lattice
translate([0,0,-SMALLEST_POSSIBLE]) {
shape($wall_thickness, $keytop_thickness);
}
}
}
// The final, penultimate key generation function. // The final, penultimate key generation function.
// takes all the bits and glues them together. requires configuration with special variables. // takes all the bits and glues them together. requires configuration with special variables.
module key(inset=false) { module key(inset = false) {
difference(){ difference() {
outer_total_shape(inset) { union(){
children(); // the shape of the key, inside and out
}; hollow_key();
if($key_bump) top_of_key() keybump($key_bump_depth, $key_bump_edge);
if ($inner_shape_type != "disable") { // additive objects at the top of the key
translate([0,0,-SMALLEST_POSSIBLE]) { // avoids moire // outside() makes them stay out of the inside. it's a bad name
inner_total_shape(); if(!inset && $children > 0) outside() artisan(0) children();
} if($outset_legends) legends(0);
// render the clearance check if it's enabled, but don't have it intersect with anything
if ($clearance_check) %clearance_check();
} }
subtractive_features(inset) { // subtractive objects at the top of the key
children(); // no outside() - I can't think of a use for it. will save render time
}; if (inset && $children > 0) artisan($inset_legend_depth) children();
if(!$outset_legends) legends($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
if ($clearance_check) %clearance_check();
} }
// semi-hack to make sure negative inset stems don't poke through the top of the keycap // both stem and support are optional
if ($stem_inset < 0) { if ($stem_type != "disable" || ($stabilizers != [] && $stabilizer_type != "disable")) {
dished(0, $inverted_dish) { dished($keytop_thickness, $inverted_dish) {
stems_and_stabilizers(); 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]) {
if ($stabilizer_type != "disable") support_for($stabilizers, $stabilizer_type);
// always render stem support even if there isn't a stem.
// rendering flat support w/no stem is much more common than a hollow keycap
// so if you want a hollow keycap you'll have to turn support off entirely
support_for($stem_positions, $stem_type);
}
}
}
} }
// actual full key with space carved out and keystem/stabilizer connectors // actual full key with space carved out and keystem/stabilizer connectors

View File

@ -8,14 +8,9 @@ include <key_profiles/dsa.scad>
include <key_profiles/sa.scad> include <key_profiles/sa.scad>
include <key_profiles/g20.scad> include <key_profiles/g20.scad>
include <key_profiles/hipro.scad> include <key_profiles/hipro.scad>
include <key_profiles/mt3.scad>
include <key_profiles/grid.scad> include <key_profiles/grid.scad>
include <key_profiles/regular_polygon.scad>
include <key_profiles/cherry.scad> include <key_profiles/cherry.scad>
include <key_profiles/dss.scad> include <key_profiles/dss.scad>
include <key_profiles/asa.scad>
include <key_profiles/typewriter.scad>
include <key_profiles/hex.scad>
// man, wouldn't it be so cool if functions were first order // man, wouldn't it be so cool if functions were first order
module key_profile(key_profile_type, row, column=0) { module key_profile(key_profile_type, row, column=0) {
@ -29,26 +24,14 @@ module key_profile(key_profile_type, row, column=0) {
dss_row(row, column) children(); dss_row(row, column) children();
} else if (key_profile_type == "sa") { } else if (key_profile_type == "sa") {
sa_row(row, column) children(); sa_row(row, column) children();
} else if (key_profile_type == "asa") {
asa_row(row, column) children();
} else if (key_profile_type == "g20") { } else if (key_profile_type == "g20") {
g20_row(row, column) children(); g20_row(row, column) children();
} else if (key_profile_type == "hipro") { } else if (key_profile_type == "hipro") {
hipro_row(row, column) children(); hipro_row(row, column) children();
} else if (key_profile_type == "grid") { } else if (key_profile_type == "grid") {
grid_row(row, column) children(); grid_row(row, column) children();
} else if (key_profile_type == "typewriter") {
typewriter_row(row, column) children();
} else if (key_profile_type == "hex") { // reddit.com/r/MechanicalKeyboards/comments/kza7ji
hex_row(row, column) children();
} else if (key_profile_type == "hexagon") {
hexagonal_row(row, column) children();
} else if (key_profile_type == "octagon") {
octagonal_row(row, column) children();
} else if (key_profile_type == "cherry") { } else if (key_profile_type == "cherry") {
cherry_row(row, column) children(); cherry_row(row, column) children();
} else if (key_profile_type == "mt3") {
mt3_row(row, column) children();
} else if (key_profile_type == "disable") { } else if (key_profile_type == "disable") {
children(); children();
} else { } else {

View File

@ -1,44 +0,0 @@
use <../functions.scad>
include <../settings.scad>
module asa_row(row=3, column = 0) {
$key_shape_type = "sculpted_square";
$bottom_key_height = 18.15;
$bottom_key_width = 18.10; // Default (R3)
$total_depth = 10.75; // Default (R3)
$top_tilt = 1.5; // Default (R3)
$width_difference = 6.20;
$height_difference = 6.55;
$dish_type = "spherical";
$dish_depth = 1.3;
$dish_skew_x = 0;
$dish_skew_y = 0;
$top_skew = 1.75;
$stem_inset = 1.2;
$height_slices = 10;
$corner_radius = 1;
$more_side_sculpting_factor = 0.4;
$side_sculpting = function(progress) (1 - progress) * 4.5;
$corner_sculpting = function(progress) pow(progress, 2);
// this is _incredibly_ intensive
//$rounded_key = true;
if (row == 1){
$total_depth = 10.5;
$top_tilt = 9.33;
children();
} else if (row == 2) {
$total_depth = 9.95;
$top_tilt = 4;
children();
} else if (row == 4){
$total_depth = 12.55;
$top_tilt = 0.43;
children();
}else{
children();
}
}

View File

@ -1,6 +1,3 @@
use <../functions.scad>
include <../settings.scad>
// based off GMK keycap set // based off GMK keycap set
module cherry_row(row=3, column=0) { module cherry_row(row=3, column=0) {

View File

@ -1,6 +1,3 @@
use <../functions.scad>
include <../settings.scad>
module dcs_row(row=3, column=0) { module dcs_row(row=3, column=0) {
$bottom_key_width = 18.16; $bottom_key_width = 18.16;
$bottom_key_height = 18.16; $bottom_key_height = 18.16;

View File

@ -1,6 +1,3 @@
use <../functions.scad>
include <../settings.scad>
module dsa_row(row=3, column = 0) { module dsa_row(row=3, column = 0) {
$key_shape_type = "sculpted_square"; $key_shape_type = "sculpted_square";
$bottom_key_width = 18.24; // 18.4; $bottom_key_width = 18.24; // 18.4;
@ -14,12 +11,8 @@ module dsa_row(row=3, column = 0) {
$dish_skew_x = 0; $dish_skew_x = 0;
$dish_skew_y = 0; $dish_skew_y = 0;
$height_slices = 10; $height_slices = 10;
$enable_side_sculpting = true;
$side_sculpting = function(progress) (1 - progress) * 4.5;
$corner_sculpting = function(progress) pow(progress, 2);
$corner_radius = 1; $corner_radius = 1;
$more_side_sculpting_factor = 0.4;
$top_tilt_y = side_tilt(column); $top_tilt_y = side_tilt(column);
extra_height = $double_sculpted ? extra_side_tilt_height(column) : 0; extra_height = $double_sculpted ? extra_side_tilt_height(column) : 0;

View File

@ -1,6 +1,3 @@
use <../functions.scad>
include <../settings.scad>
module dss_row(n=3, column=0) { module dss_row(n=3, column=0) {
$key_shape_type = "sculpted_square"; $key_shape_type = "sculpted_square";
$bottom_key_width = 18.24; $bottom_key_width = 18.24;
@ -13,13 +10,10 @@ module dss_row(n=3, column=0) {
$dish_skew_y = 0; $dish_skew_y = 0;
$top_skew = 0; $top_skew = 0;
$height_slices = 10; $height_slices = 10;
$enable_side_sculpting = true;
// might wanna change this if you don't minkowski // might wanna change this if you don't minkowski
// do you even minkowski bro // do you even minkowski bro
$corner_radius = 1; $corner_radius = 1;
$more_side_sculpting_factor = 0.4;
$side_sculpting = function(progress) (1 - progress) * 4.5;
$corner_sculpting = function(progress) pow(progress, 2);
// this is _incredibly_ intensive // this is _incredibly_ intensive
/* $rounded_key = true; */ /* $rounded_key = true; */

View File

@ -1,6 +1,3 @@
use <../functions.scad>
include <../settings.scad>
module g20_row(row=3, column = 0) { module g20_row(row=3, column = 0) {
$bottom_key_width = 18.16; $bottom_key_width = 18.16;
$bottom_key_height = 18.16; $bottom_key_height = 18.16;

View File

@ -1,6 +1,3 @@
use <../functions.scad>
include <../settings.scad>
module grid_row(row=3, column = 0) { module grid_row(row=3, column = 0) {
$bottom_key_width = 18.16; $bottom_key_width = 18.16;
$bottom_key_height = 18.16; $bottom_key_height = 18.16;
@ -14,7 +11,7 @@ module grid_row(row=3, column = 0) {
$dish_skew_x = 0; $dish_skew_x = 0;
$dish_skew_y = 0; $dish_skew_y = 0;
$hull_shape_type = "linear extrude"; $linear_extrude_shape = true;
$dish_overdraw_width = -6.5; $dish_overdraw_width = -6.5;

View File

@ -1,62 +0,0 @@
include <../constants.scad>
// Regular polygon shapes CIRCUMSCRIBE the sphere of diameter $bottom_key_width
// This is to make tiling them easier, like in the case of hexagonal keycaps etc
// this function doesn't set the key shape, so you can't use it directly without some fiddling
module hex_row(n=3, column=0) {
$bottom_key_width = $unit - 0.5;
$bottom_key_height = $unit - 0.5;
$width_difference = 0;
$height_difference = 0;
$dish_type = "spherical";
$key_shape_type = "hexagon";
$stem_inset = -2.5;
$stem_throw = 3;
// $dish_depth = 1;
$top_skew = 0;
$height_slices = 1;
$stem_support_type = "disable";
$dish_overdraw_width = -8.25;
$dish_overdraw_height = -8.25;
// $corner_radius = 1;
// this is _incredibly_ intensive
/* $rounded_key = true; */
$top_tilt_y = side_tilt(column);
extra_height = $double_sculpted ? extra_side_tilt_height(column) : 0;
base_depth = 4;
if (n <= 1){
$total_depth = base_depth + 2.5 + extra_height;
$top_tilt = -13;
children();
} else if (n == 2) {
$total_depth = base_depth + 0.5 + extra_height;
$top_tilt = -7;
children();
} else if (n == 3) {
$total_depth = base_depth + extra_height;
$top_tilt = 0;
children();
} else if (n == 4){
$total_depth = base_depth + 0.5 + extra_height;
$top_tilt = 7;
children();
} else {
$total_depth = base_depth + extra_height;
$top_tilt = 0;
children();
}
}

View File

@ -1,6 +1,4 @@
use <../functions.scad> // my own measurements
include <../settings.scad>
module hipro_row(row=3, column=0) { module hipro_row(row=3, column=0) {
$key_shape_type = "sculpted_square"; $key_shape_type = "sculpted_square";
@ -9,18 +7,13 @@ module hipro_row(row=3, column=0) {
$width_difference = ($bottom_key_width - 12.3); $width_difference = ($bottom_key_width - 12.3);
$height_difference = ($bottom_key_height - 12.65); $height_difference = ($bottom_key_height - 12.65);
$dish_type = "squared scoop"; $dish_type = "spherical";
$dish_depth = 0.75; $dish_depth = 0.75;
$dish_skew_x = 0; $dish_skew_x = 0;
$dish_skew_y = 0; $dish_skew_y = 0;
$top_skew = 0; $top_skew = 0;
$height_slices = 10; $height_slices = 10;
$corner_radius = 1; $corner_radius = 1;
$more_side_sculpting_factor = 0.4;
$side_sculpting = function(progress) (1 - progress) * 4.5;
$corner_sculpting = function(progress) pow(progress, 2);
$top_tilt_y = side_tilt(column); $top_tilt_y = side_tilt(column);
extra_height = $double_sculpted ? extra_side_tilt_height(column) : 0; extra_height = $double_sculpted ? extra_side_tilt_height(column) : 0;

View File

@ -1,58 +0,0 @@
use <../functions.scad>
include <../settings.scad>
// This is an imperfect attempt to clone the MT3 profile
module mt3_row(row=3, column=0, deep_dish=false) {
$key_shape_type = "sculpted_square";
$bottom_key_width = 18.35;
$bottom_key_height = 18.6;
$width_difference = ($bottom_key_width - 13.0);
$height_difference = ($bottom_key_height - 13.0);
$dish_type = "squared spherical";
$dish_depth = deep_dish ? 1.6 : 1.2;
$dish_skew_x = 0;
$dish_skew_y = 0;
$top_skew = 0;
$height_slices = 10;
$corner_radius = 0.0125;
$more_side_sculpting_factor = 0.75;
$side_sculpting = function(progress) (1 - progress) * 4.5;
$corner_sculpting = function(progress) pow(progress, 2) * 2;
$top_tilt_y = side_tilt(column);
extra_height = $double_sculpted ? extra_side_tilt_height(column) : 0;
if (row == 0){
// TODO I didn't change these yet
$total_depth = 14.7 + extra_height;
$top_tilt = -12.5;
children();
} else if (row == 1) {
$total_depth = 13.1 + extra_height;
$top_tilt = -6;
children();
} else if (row == 2) {
$total_depth = 10.7 + extra_height;
$top_tilt = -6;
children();
} else if (row == 3) {
$total_depth = 10.7 + extra_height;
$top_tilt = 6;
children();
} else if (row == 4){
$total_depth = 11.6 + extra_height;
$top_tilt = 12;
children();
} else if (row >= 5) {
$total_depth = 11.6 + extra_height;
$top_tilt = 0;
children();
} else {
children();
}
}

View File

@ -1,6 +1,3 @@
use <../functions.scad>
include <../settings.scad>
module oem_row(row=3, column = 0) { module oem_row(row=3, column = 0) {
$bottom_key_width = 18.05; $bottom_key_width = 18.05;
$bottom_key_height = 18.05; $bottom_key_height = 18.05;

View File

@ -1,68 +0,0 @@
use <../functions.scad>
include <../settings.scad>
include <../constants.scad>
// Regular polygon shapes CIRCUMSCRIBE the sphere of diameter $bottom_key_width
// This is to make tiling them easier, like in the case of hexagonal keycaps etc
// this function doesn't set the key shape, so you can't use it directly without some fiddling
module regular_polygon_row(n=3, column=0) {
$bottom_key_width = $unit - 0.5;
$bottom_key_height = $unit - 0.5;
$width_difference = 0;
$height_difference = 0;
$dish_type = "spherical";
$dish_depth = 0.85;
$dish_skew_x = 0;
$dish_skew_y = 0;
$top_skew = 0;
$height_slices = 1;
$corner_radius = 1;
// this is _incredibly_ intensive
/* $rounded_key = true; */
$top_tilt_y = side_tilt(column);
extra_height = $double_sculpted ? extra_side_tilt_height(column) : 0;
base_depth = 7.5;
if (n <= 1){
$total_depth = base_depth + 2.5 + extra_height;
$top_tilt = -13;
children();
} else if (n == 2) {
$total_depth = base_depth + 0.5 + extra_height;
$top_tilt = -7;
children();
} else if (n == 3) {
$total_depth = base_depth + extra_height;
$top_tilt = 0;
children();
} else if (n == 4){
$total_depth = base_depth + 0.5 + extra_height;
$top_tilt = 7;
children();
} else {
$total_depth = base_depth + extra_height;
$top_tilt = 0;
children();
}
}
module hexagonal_row(n=3, column=0) {
$key_shape_type = "hexagon";
regular_polygon_row(n,column) {
children();
}
}
module octagonal_row(n=3, column=0) {
$key_shape_type = "octagon";
regular_polygon_row(n, column) {
children();
}
}

View File

@ -1,6 +1,3 @@
use <../functions.scad>
include <../settings.scad>
module sa_row(n=3, column=0) { module sa_row(n=3, column=0) {
$key_shape_type = "sculpted_square"; $key_shape_type = "sculpted_square";
$bottom_key_width = 18.4; $bottom_key_width = 18.4;
@ -13,12 +10,7 @@ module sa_row(n=3, column=0) {
$dish_skew_y = 0; $dish_skew_y = 0;
$top_skew = 0; $top_skew = 0;
$height_slices = 10; $height_slices = 10;
$corner_radius = 1; $corner_radius = 1;
$more_side_sculpting_factor = 0.4;
$side_sculpting = function(progress) (1 - progress) * 4.5;
$corner_sculpting = function(progress) pow(progress, 2);
// this is _incredibly_ intensive // this is _incredibly_ intensive
/* $rounded_key = true; */ /* $rounded_key = true; */

View File

@ -1,59 +0,0 @@
use <../functions.scad>
include <../settings.scad>
include <../constants.scad>
// Regular polygon shapes CIRCUMSCRIBE the sphere of diameter $bottom_key_width
// This is to make tiling them easier, like in the case of hexagonal keycaps etc
// this function doesn't set the key shape, so you can't use it directly without some fiddling
module typewriter_row(n=3, column=0) {
$bottom_key_width = $unit - 0.5;
$bottom_key_height = $unit - 0.5;
$width_difference = 0;
$height_difference = 0;
$dish_type = "spherical";
$key_shape_type = "circular";
$inverted_dish = true;
$stem_inset = -4.5;
$stem_throw = 5;
$dish_depth = 4;
$dish_skew_x = 0;
$dish_skew_y = 0;
$top_skew = 0;
$height_slices = 1;
$stem_support_type = "disable";
// $corner_radius = 1;
// this is _incredibly_ intensive
/* $rounded_key = true; */
$top_tilt_y = side_tilt(column);
extra_height = $double_sculpted ? extra_side_tilt_height(column) : 0;
base_depth = 3.5;
if (n <= 1){
$total_depth = base_depth + 2.5 + extra_height;
$top_tilt = -13;
children();
} else if (n == 2) {
$total_depth = base_depth + 0.5 + extra_height;
$top_tilt = -7;
children();
} else if (n == 3) {
$total_depth = base_depth + extra_height;
$top_tilt = 0;
children();
} else if (n == 4){
$total_depth = base_depth + 0.5 + extra_height;
$top_tilt = 7;
children();
} else {
$total_depth = base_depth + extra_height;
$top_tilt = 0;
children();
}
}

View File

@ -1,9 +1,10 @@
// kind of a catch-all at this point for any directive that doesn't fit in the other files // kind of a catch-all at this point for any directive that doesn't fit in the other files
include <constants.scad> //TODO duplicate def to not make this a special var. maybe not worth it
unit = 19.05;
module translate_u(x=0, y=0, z=0){ module translate_u(x=0, y=0, z=0){
translate([x * $unit, y*$unit, z*$unit]) children(); translate([x * unit, y*unit, z*unit]) children();
} }
module no_stem_support() { module no_stem_support() {
@ -91,58 +92,30 @@ module blank() {
children(); children();
} }
module cherry(slop = undef) { module cherry(slop) {
$stem_slop = slop != undef ? slop : $stem_slop; $stem_slop = slop ? slop : $stem_slop;
$stem_type = "cherry"; $stem_type = "cherry";
children(); children();
} }
module alps(slop = undef) { module alps(slop) {
$stem_slop = slop != undef ? slop : $stem_slop; $stem_slop = slop ? slop : $stem_slop;
$stem_type = "alps"; $stem_type = "alps";
children(); children();
} }
module rounded_cherry(slop = undef) { module rounded_cherry(slop) {
$stem_slop = slop != undef ? slop : $stem_slop; $stem_slop = slop ? slop : $stem_slop;
$stem_type = "rounded_cherry"; $stem_type = "rounded_cherry";
children(); children();
} }
module box_cherry(slop = undef) { module box_cherry(slop) {
$stem_slop = slop != undef ? slop : $stem_slop; $stem_slop = slop ? slop : $stem_slop;
$stem_type = "box_cherry"; $stem_type = "box_cherry";
children(); children();
} }
module choc(slop = 0.05) {
echo("WARN:\n\n * choc support is experimental.\n * $stem_slop is overridden.\n * it is also recommended to print them upside down if you can\n\n");
$stem_throw = 3;
$stem_slop = slop;
$bottom_key_width = 18;
$bottom_key_height = 17;
$stem_type = "choc";
children();
}
// a hacky way to make "low profile" keycaps
module low_profile() {
$width_difference = $width_difference / 1.5;
$height_difference = $height_difference / 1.5;
// helps tilted keycaps not have holes if worst comes to worst
$inner_shape_type = "dished";
$top_tilt = $top_tilt / 1.25;
$total_depth = ($total_depth / 2) < 7 ? 7 : $total_depth / 2;
// just to make sure
$stem_throw = 3;
children();
}
module flared_support() { module flared_support() {
$support_type = "flared"; $support_type = "flared";
children(); children();
@ -158,17 +131,15 @@ module flat_support() {
children(); children();
} }
module legend(text, position=[0,0], size=undef, font=undef) { module legend(text, position=[0,0], size=undef) {
font_size = size == undef ? $font_size : size; font_size = size == undef ? $font_size : size;
font_face = font == undef ? $font : font; $legends = [for(L=[$legends, [[text, position, font_size]]], a=L) a];
$legends = [for(L=[$legends, [[text, position, font_size, font_face]]], a=L) a];
children(); children();
} }
module front_legend(text, position=[0,0], size=undef, font=undef) { module front_legend(text, position=[0,0], size=undef) {
font_size = size == undef ? $font_size : size; font_size = size == undef ? $font_size : size;
font_face = font == undef ? $font : font; $front_legends = [for(L=[$front_legends, [[text, position, font_size]]], a=L) a];
$front_legends = [for(L=[$front_legends, [[text, position, font_size, font_face]]], a=L) a];
children(); children();
} }
@ -195,68 +166,13 @@ module upside_down() {
} }
module sideways() { module sideways() {
$stem_support_type = "disable";
$key_shape_type = "flat_sided_square"; $key_shape_type = "flat_sided_square";
$dish_overdraw_width = abs(extra_keytop_length_for_flat_sides()); $dish_overdraw_width = abs(extra_keytop_length_for_flat_sides());
extra_y_rotation = atan2($width_difference/2,$total_depth); // TODO assumes centered top extra_y_rotation = atan2($width_difference/2,$total_depth);
translate([0,0,cos(extra_y_rotation) * total_key_width()/2]) translate([0,0,cos(extra_y_rotation) * total_key_width()/2])
rotate([0,90 + extra_y_rotation ,0]) children(); rotate([0,90 + extra_y_rotation ,0]) children();
} }
/* this is hard to explain. we want the angle of the back of the keycap.
* first we draw a line at the back of the keycap perpendicular to the ground.
* then we extend the line created by the slope of the keytop to that line
* the angle of the latter line off the ground is $top_tilt, and
* you can create a right triangle with the adjacent edge being $bottom_key_height/2
* raised up $total_depth. this gets you x, the component of the extended
* keytop slope line, and y, a component of the first perpendicular line.
* by a very similar triangle you get r and s, where x is the hypotenuse of that
* right triangle and the right angle is again against the first perpendicular line
* s is the opposite line in the right triangle required to find q, the angle
* of the back. if you subtract r from $total_depth plus y you can now use these
* two values in atan to find the angle of interest.
*/
module backside() {
$stem_support_type = "disable";
// $key_shape_type = "flat_sided_square";
a = $bottom_key_height;
b = $total_depth;
c = top_total_key_height();
x = (a / 2 - $top_skew) / cos(-$top_tilt) - c / 2;
y = sin(-$top_tilt) * (x + c/2);
r = sin(-$top_tilt) * x;
s = cos(-$top_tilt) * x;
q = atan2(s, (y + b - r));
translate([0,0,cos(q) * total_key_height()/2])
rotate([-90 - q, 0,0]) children();
}
// this is just backside with a few signs switched
module frontside() {
$stem_support_type = "disable";
// $key_shape_type = "flat_sided_square";
a = $bottom_key_height;
b = $total_depth;
c = top_total_key_height();
x = (a / 2 + $top_skew) / cos($top_tilt) - c / 2;
y = sin($top_tilt) * (x + c/2);
r = sin($top_tilt) * x;
s = cos($top_tilt) * x;
q = atan2(s, (y + b - r));
translate([0,0,cos(q) * total_key_height()/2])
rotate([90 + q, 0,0]) children();
}
// emulating the % modifier. // emulating the % modifier.
// since we use custom colors, just using the % modifier doesn't work // since we use custom colors, just using the % modifier doesn't work
module debug() { module debug() {
@ -267,24 +183,3 @@ module debug() {
%children(); %children();
} }
// auto-place children in a grid.
// For this to work all children have to be single keys, no for loops etc
module auto_place() {
num_children = $children;
row_size = round(pow(num_children, 0.5));
for (child_index = [0:num_children-1]) {
x = child_index % row_size;
y = floor(child_index / row_size);
translate_u(x,-y) children(child_index);
}
}
// suggested settings for resin prints
module resin() {
$stem_slop = 0;
$stem_inner_slop = 0;
$stem_support_type = "disable";
children();
}

View File

@ -1,10 +1,8 @@
include <functions.scad> include <functions.scad>
use <key_sizes.scad>
use <key_transformations.scad>
module spacebar() { module spacebar() {
$inverted_dish = $dish_type != "disable"; $inverted_dish = true;
$dish_type = $dish_type != "disable" ? "sideways cylindrical" : "disable"; $dish_type = "sideways cylindrical";
6_25u() stabilized(mm=50) children(); 6_25u() stabilized(mm=50) children();
} }
@ -52,14 +50,13 @@ module iso_enter() {
/* $top_tilt = 0; */ /* $top_tilt = 0; */
$stem_support_type = "disable"; $stem_support_type = "disable";
$key_shape_type = "iso_enter"; $key_shape_type = "iso_enter";
$hull_shape_type = "skin"; /* $linear_extrude_shape = true; */
$linear_extrude_height_adjustment = 19.05 * 0.5; $linear_extrude_height_adjustment = 19.05 * 0.5;
// this equals (unit_length(1.5) - unit_length(1.25)) / 2 // this equals (unit_length(1.5) - unit_length(1.25)) / 2
/* $dish_overdraw_width = 2.38125; */ /* $dish_overdraw_width = 2.38125; */
render() {
stabilized(vertical=true) { stabilized(vertical=true) {
children(); children();
}
} }
} }

View File

@ -17,5 +17,5 @@ include <../layout.scad>
]; ];
module 60_percent_default(profile) { module 60_percent_default(profile) {
layout(60_percent_default_layout, profile, 60_percent_legends, row_sculpting_offset=1) children(); layout(60_percent_default_layout, profile, 60_percent_legends) children();
} }

View File

@ -1,21 +0,0 @@
include <../layout.scad>
hhkb_layout = [
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[1.5,1,1,1,1,1,1,1,1,1,1,1,1,1.5],
[1.75,1,1,1,1,1,1,1,1,1,1,1,2.25],
[2.25,1,1,1,1,1,1,1,1,1,1,1.75,1],
[-1.5,1,1.5,6,1.5,1]
];
hhkb_legends = [
["Esc", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "\\", "`"],
["Tab", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "[", "]", "Delete"],
["Ctrl", "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "'", "Return"],
["Shift", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "Shift", "Fn"],
["", "Alt", "Cmd", "", "Cmd", "Alt"],
];
module hhkb_default(profile) {
layout(hhkb_layout, profile, hhkb_legends) children();
}

View File

@ -1,8 +1,3 @@
use <../key_transformations.scad>
use <../key_profiles.scad>
use <../key_sizes.scad>
use <../key_types.scad>
// sums all values, unless a value is negative, in which case it makes it positive // sums all values, unless a value is negative, in which case it makes it positive
// dirty hack to allow for large gaps in keysets // dirty hack to allow for large gaps in keysets
function abs_sum(list, x=0) = function abs_sum(list, x=0) =

View File

@ -1,7 +1,7 @@
include <../layout.scad> include <../layout.scad>
// negative numbers are used for spacing // negative numbers are used for spacing
lets_split_layout = [ lets_split_mapping = [
[1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1],
@ -9,5 +9,5 @@ lets_split_layout = [
]; ];
module lets_split_default(profile) { module lets_split_default(profile) {
layout(lets_split_layout, profile, row_sculpting_offset=1) children(); layout(lets_split_mapping, profile, row_sculpting_offset=1) children();
} }

View File

@ -3,7 +3,7 @@
include <../functions.scad> include <../functions.scad>
module 3d_surface(size=$3d_surface_size, step=$3d_surface_step, bottom=-SMALLEST_POSSIBLE){ module 3d_surface(size=$3d_surface_size, step=$3d_surface_step, bottom=-SMALLEST_POSSIBLE){
function p(x, y) = [ x, y, max(0,$surface_function(x, y) * $corner_smoothing_surface_function(x,y)) ]; function p(x, y) = [ x, y, max(0,surface_function(x, y)) ];
function p0(x, y) = [ x, y, bottom ]; function p0(x, y) = [ x, y, bottom ];
function rev(b, v) = b ? v : [ v[3], v[2], v[1], v[0] ]; function rev(b, v) = b ? v : [ v[3], v[2], v[1], v[0] ];
function face(x, y) = [ p(x, y + step), p(x + step, y + step), p(x + step, y), p(x + step, y), p(x, y), p(x, y + step) ]; function face(x, y) = [ p(x, y + step), p(x + step, y + step), p(x + step, y), p(x + step, y), p(x, y), p(x, y + step) ];
@ -35,13 +35,13 @@ module 3d_surface(size=$3d_surface_size, step=$3d_surface_step, bottom=-SMALLEST
polyhedron(points, faces, convexity = 8); polyhedron(points, faces, convexity = 8);
} }
module polar_3d_surface(size, step, bottom=-SMALLEST_POSSIBLE){ module polar_3d_surface(size=$3d_surface_size, step=$3d_surface_step, bottom=-SMALLEST_POSSIBLE){
function to_polar(q, size) = q * (90 / size); function to_polar(q, size) = q * (90 / size);
function p(x, y) = [ function p(x, y) = [
$surface_distribution_function(to_polar(x, size), size), surface_distribution_function(to_polar(x, size), size),
$surface_distribution_function(to_polar(y, size), size), surface_distribution_function(to_polar(y, size), size),
max(0,$surface_function($surface_distribution_function(to_polar(x, size), size), $surface_distribution_function(to_polar(y, size), size)) * $corner_smoothing_surface_function($surface_distribution_function(to_polar(x, size), size), $surface_distribution_function(to_polar(y, size), size))) max(0,surface_function(surface_distribution_function(to_polar(x, size), size), surface_distribution_function(to_polar(y, size), size)))
]; ];
function p0(x, y) = [ x, y, bottom ]; function p0(x, y) = [ x, y, bottom ];
function rev(b, v) = b ? v : [ v[3], v[2], v[1], v[0] ]; function rev(b, v) = b ? v : [ v[3], v[2], v[1], v[0] ];
@ -75,5 +75,5 @@ module polar_3d_surface(size, step, bottom=-SMALLEST_POSSIBLE){
} }
// defaults, overridden in functions.scad // defaults, overridden in functions.scad
// $surface_distribution_function = function(dim, size) sin(dim) * size; function surface_distribution_function(dim, size) = sin(dim) * size;
// $surface_function = function(x,y) (sin(acos(x/$3d_surface_size))) * sin(acos(y/$3d_surface_size)); function surface_function(x,y) = (sin(acos(x/$3d_surface_size))) * sin(acos(y/$3d_surface_size));

View File

@ -74,12 +74,13 @@ $rounded_cherry_stem_d = 5.5;
// How much higher the stem is than the bottom of the keycap. // How much higher the stem is than the bottom of the keycap.
// Inset stem requires support but is more accurate in some profiles // Inset stem requires support but is more accurate in some profiles
// can be negative to make outset stems!
$stem_inset = 0; $stem_inset = 0;
// How many degrees to rotate the stems. useful for sideways keycaps // How many degrees to rotate the stems. useful for sideways keycaps, maybe
$stem_rotation = 0; $stem_rotation = 0;
// How many degrees to rotate the keycap, but _not_ inside features (the stem).
$keycap_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] */ /* [Shape] */
@ -121,10 +122,12 @@ $font="DejaVu Sans Mono:style=Book";
// Whether or not to render fake keyswitches to check clearances // Whether or not to render fake keyswitches to check clearances
$clearance_check = false; $clearance_check = false;
// Should be faster, also required for concave shapes // Should be faster, also required for concave shapes
// Use linear_extrude instead of hull slices to make the shape of the key
$linear_extrude_shape = false;
// what kind of extrusion we use to create the keycap. "hull" is standard, "linear extrude" is legacy, "skin" is new and not well supported. // warns in trajectory.scad but it looks benign
$hull_shape_type = "hull"; // ["hull", "linear extrude", "skin"] // brand new, more correct, hopefully faster, lots more work
$skin_extrude_shape = false;
// This doesn't work very well, but you can try // This doesn't work very well, but you can try
$rounded_key = false; $rounded_key = false;
//minkowski radius. radius of sphere used in minkowski sum for minkowski_key function. 1.75 for G20 //minkowski radius. radius of sphere used in minkowski sum for minkowski_key function. 1.75 for G20
@ -165,9 +168,6 @@ $inset_legend_depth = 0.2;
// Dimensions of alps stem // Dimensions of alps stem
$alps_stem = [4.45, 2.25]; $alps_stem = [4.45, 2.25];
// Dimensions of choc stem
$choc_stem = [1.2, 3];
// Enable stabilizer stems, to hold onto your cherry or costar stabilizers // Enable stabilizer stems, to hold onto your cherry or costar stabilizers
$stabilizer_type = "costar_stabilizer"; // [costar_stabilizer, cherry_stabilizer, disable] $stabilizer_type = "costar_stabilizer"; // [costar_stabilizer, cherry_stabilizer, disable]
@ -192,60 +192,8 @@ $warning_color = [1,0,0, 0.15];
$minkowski_facets = 30; $minkowski_facets = 30;
$shape_facets =30; $shape_facets =30;
// "flat" / "dished" / "disable"
$inner_shape_type = "flat";
// default side_sculpting function, linear
$side_sculpting = function(progress) 0;
$corner_sculpting = function(progress) 0;
// you probably shouldn't touch this, it's internal to sculpted_square
// modify side sculpting with the $side_sculpting function in the key profile files
$more_side_sculpting_factor = 0;
// 3d surface functions (still in beta)
// 3d surface settings // 3d surface settings
// unused for now // unused for now
$3d_surface_size = 1; $3d_surface_size = 100;
// 3d surface point resolution. $3d_surface_size / $3d_surface_step = steps per x / y // resolution in each axis. 10 = 10 divisions per x/y = 100 points total
$3d_surface_step = 1/20; $3d_surface_step = 10;
// monotonically increasing function that distributes the points of the surface mesh
// only for polar_3d_surface right now
// if it's linear it's a grid. sin(dim) * size concentrates detail around the edges
sinusoidal_surface_distribution = function(dim,size) sin(dim) * size;
linear_surface_distribution = function(dim,size) dim;
$surface_distribution_function = sinusoidal_surface_distribution;
// the function that actually determines what the surface is.
// feel free to override, the last one wins
// debug
// $surface_function = function(x,y) 1;
cylindrical_surface = function(x,y) (sin(acos(x/$3d_surface_size)));
spherical_surface = function(x,y) (1 - (x/$3d_surface_size)^2)^0.5 * (1 - (y/$3d_surface_size)^2)^0.5;
// looks a lot like mt3
quartic_surface = function(x,y) (1 - (x/$3d_surface_size)^4)^0.5 * (1 - (y/$3d_surface_size)^4)^0.5;
ripple_surface = function(x,y) cos((x^2+y^2)^0.5 * 50)/4 + 0.75;
rosenbrocks_banana_surface = function(x,y) (pow(1-(x/$3d_surface_size))^2 + 100 * pow((y/$3d_surface_size)-(x/$3d_surface_size)^2)^2)/200 + 0.1;
spike_surface = function(x,y) 1/(((x/$3d_surface_size)^2+(y/$3d_surface_size)^2)^0.5) + .01;
random_surface = function(x,y) sin(rands(0,90,1,x+y)[0]);
bumps_surface = function(x,y) sin(20*x)*cos(20*y)/3+1;
$surface_function = bumps_surface; // bumps_surface;
// can be used to smooth the corners of the 3d surface function, to make the dishes add / subtract less height. can really do anything it's just multiplying, but that's what I use it for
$corner_smoothing_surface_function = function(x,y) 1;
// $corner_smoothing_surface_function = function(x,y) (1 - pow(abs(x), 5)/$3d_surface_size) * (1 - pow(abs(y),5)/$3d_surface_size);
// ripples
/*
// Rosenbrock's banana
/* $
// y=x revolved around the y axis
/* $surface_function = */
/* $surface_function = */

View File

@ -1,10 +1,11 @@
include <constants.scad> $fs=.1;
unit = 19.05;
include <shapes/ISO_enter.scad> include <shapes/ISO_enter.scad>
include <shapes/sculpted_square.scad> include <shapes/sculpted_square.scad>
include <shapes/rounded_square.scad> include <shapes/rounded_square.scad>
include <shapes/square.scad> include <shapes/square.scad>
include <shapes/oblong.scad> include <shapes/oblong.scad>
include <shapes/regular_polygon.scad>
// size: at progress 0, the shape is supposed to be this size // size: at progress 0, the shape is supposed to be this size
// delta: at progress 1, the keycap is supposed to be size - delta // delta: at progress 1, the keycap is supposed to be size - delta
@ -24,12 +25,6 @@ module key_shape(size, delta, progress = 0) {
square_shape(size, delta, progress); square_shape(size, delta, progress);
} else if ($key_shape_type == "oblong") { } else if ($key_shape_type == "oblong") {
oblong_shape(size, delta, progress); oblong_shape(size, delta, progress);
} else if ($key_shape_type == "hexagon") {
regular_polygon_shape(size, delta, progress);
} else if ($key_shape_type == "octagon") {
regular_polygon_shape(size, delta, progress, sides=8);
} else if ($key_shape_type == "circular") {
regular_polygon_shape(size, delta, progress, sides=36);
} else { } else {
echo("Warning: unsupported $key_shape_type"); echo("Warning: unsupported $key_shape_type");
} }

View File

@ -5,7 +5,6 @@ width_ratio = unit_length(1.25) / unit_length(1.5);
height_ratio = unit_length(1) / unit_length(2); height_ratio = unit_length(1) / unit_length(2);
module ISO_enter_shape(size, delta, progress){ module ISO_enter_shape(size, delta, progress){
width = size[0]; width = size[0];
height = size[1]; height = size[1];
@ -38,12 +37,12 @@ module ISO_enter_shape(size, delta, progress){
} }
function iso_enter_vertices(size, delta, progress, thickness_difference) = [ function iso_enter_vertices(size, delta, progress, thickness_difference) = [
[ 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/2, 0 - delta.y / 2 * progress - thickness_difference/2], // top right
[ 0-delta.x/2 * progress - thickness_difference/8, -size[1] + delta.y / 2 * progress + thickness_difference/8], // bottom 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/8, -size[1] + delta.y / 2 * progress + thickness_difference/8], // bottom left [-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/8,-size[1] * height_ratio + delta.y / 2 * progress + thickness_difference/2], // inner middle point [-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/8,-size[1] * height_ratio + delta.y / 2 * progress + thickness_difference/2], // outer 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/8, 0 - delta.y / 2 * progress - thickness_difference/8] // top left [ -size[0] + delta.x/2 * progress + thickness_difference/2, 0 - delta.y / 2 * progress - thickness_difference/2] // top left
] + [ ] + [
[(size[0] * width_ratio)/2, size[1]/2 ], [(size[0] * width_ratio)/2, size[1]/2 ],
[(size[0] * width_ratio)/2, size[1]/2 ], [(size[0] * width_ratio)/2, size[1]/2 ],
@ -59,11 +58,11 @@ function skin_iso_enter_shape(size, delta, progress, thickness_difference) =
add_rounding( add_rounding(
iso_enter_vertices( iso_enter_vertices(
size, size,
[delta.x - $side_sculpting(progress), delta.y - $side_sculpting(progress)], delta,
progress, progress,
thickness_difference thickness_difference
), ),
$corner_radius + $corner_sculpting(progress) $corner_radius
), ),
$shape_facets $shape_facets
); );

View File

@ -1,14 +0,0 @@
// we do this weird key_shape_type check here because rounded_square uses
// square_shape, and we want flat sides to work for that too.
// could be refactored, idk
module regular_polygon_shape(size, delta, progress, sides=6){
// https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/undersized_circular_objects
fudge = 1/cos(180/sides);
diameter = (size.x - delta.x * progress - $corner_radius*2) * fudge;
offset(r=$corner_radius) rotate([0,0,360/sides/2]) circle(d = diameter, $fn=sides);
}
// TODO not implemented
function skin_regular_polygon_shape(size, delta, progress, thickness_difference, sides=6) = echo("skin regular polygon not implemented");

View File

@ -1,5 +1,13 @@
// rounded square shape with additional sculpting functions to better approximate // 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;
// When sculpting corners, how much extra radius should be added
$corner_sculpting_factor = 1;
// When doing more side sculpting corners, how much extra radius should be added
$more_side_sculpting_factor = 0.4;
// side sculpting functions // side sculpting functions
// bows the sides out on stuff like SA and DSA keycaps // 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;
@ -13,9 +21,9 @@ module sculpted_square_shape(size, delta, progress) {
width_difference = delta[0]; width_difference = delta[0];
height_difference = delta[1]; height_difference = delta[1];
// makes the sides bow // makes the sides bow
extra_side_size = $side_sculpting(progress); extra_side_size = side_sculpting(progress);
// makes the rounded corners of the keycap grow larger as they move upwards // makes the rounded corners of the keycap grow larger as they move upwards
extra_corner_size = $corner_sculpting(progress); extra_corner_size = corner_sculpting(progress);
// computed values for this slice // computed values for this slice
extra_width_this_slice = (width_difference - extra_side_size) * progress; extra_width_this_slice = (width_difference - extra_side_size) * progress;
@ -71,9 +79,9 @@ function skin_sculpted_square_shape(size, delta, progress, thickness_difference)
width_difference = delta[0], width_difference = delta[0],
height_difference = delta[1], height_difference = delta[1],
// makes the sides bow // makes the sides bow
extra_side_size = $side_sculpting(progress), extra_side_size = side_sculpting(progress),
// makes the rounded corners of the keycap grow larger as they move upwards // makes the rounded corners of the keycap grow larger as they move upwards
extra_corner_size = $corner_sculpting(progress), extra_corner_size = corner_sculpting(progress),
// computed values for this slice // computed values for this slice
extra_width_this_slice = (width_difference - extra_side_size) * progress, extra_width_this_slice = (width_difference - extra_side_size) * progress,

View File

@ -16,12 +16,12 @@ module brim_support(stem_type, stem_support_height, slop) {
} }
} }
inside_cherry_cross($stem_inner_slop); inside_cherry_cross(slop);
} }
} else if (stem_type == "rounded_cherry") { } else if (stem_type == "rounded_cherry") {
difference() { difference() {
cylinder(d=$rounded_cherry_stem_d * 2, h=stem_support_height); cylinder(d=$rounded_cherry_stem_d * 2, h=stem_support_height);
inside_cherry_cross($stem_inner_slop); inside_cherry_cross(slop);
} }
} else if (stem_type == "box_cherry") { } else if (stem_type == "box_cherry") {
difference() { difference() {
@ -31,7 +31,7 @@ module brim_support(stem_type, stem_support_height, slop) {
} }
} }
inside_cherry_cross($stem_inner_slop); inside_cherry_cross(slop);
} }
} else if (stem_type == "cherry_stabilizer") { } else if (stem_type == "cherry_stabilizer") {
difference() { difference() {
@ -41,19 +41,7 @@ module brim_support(stem_type, stem_support_height, slop) {
} }
} }
inside_cherry_cross($stem_inner_slop); inside_cherry_cross(slop);
}
} else if(stem_type == "choc") {
translate([-5.7/2,0,0]) linear_extrude(height=stem_support_height) {
offset(r=1){
square($choc_stem + [3,3], center=true);
}
}
translate([5.7/2,0,0]) linear_extrude(height=stem_support_height) {
offset(r=1){
square($choc_stem + [3,3], center=true);
}
} }
} }
} }

View File

@ -1,20 +1,17 @@
include <../functions.scad> include <../functions.scad>
include <../stems/cherry.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) { module centered_tines(stem_support_height) {
if ($key_length < 2) { if ($key_length < 2) {
translate([0,0,$stem_support_height / 2]) { translate([0,0,$stem_support_height / 2]) {
cube([total_key_width()*2, 0.5, $stem_support_height], center = true); cube([total_key_width(), 0.5, $stem_support_height], center = true);
} }
} }
translate([0,0,$stem_support_height / 2]) { translate([0,0,$stem_support_height / 2]) {
cube([ cube([
1, 1,
total_key_height()*2, total_key_height(),
$stem_support_height $stem_support_height
], ],
center = true); center = true);
@ -22,13 +19,16 @@ module centered_tines(stem_support_height) {
} }
module tines_support(stem_type, stem_support_height, slop) { 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") { if (stem_type == "cherry" || stem_type == "costar_stabilizer") {
difference () { difference () {
union() { union() {
if ($key_length < 2) { if ($key_length < 2) {
translate([0,0,$stem_support_height / 2]) { translate([0,0,$stem_support_height / 2]) {
cube([ cube([
total_key_width()*2, total_key_width() + extra_width*2,
0.5, 0.5,
$stem_support_height $stem_support_height
], center = true); ], center = true);
@ -36,18 +36,18 @@ module tines_support(stem_type, stem_support_height, slop) {
} }
// 2 vertical tines holding either side of the cruciform // 2 vertical tines holding either side of the cruciform
for (x = [2, -2]) { for (x = [1.15, -1.15]) {
translate([x,0,$stem_support_height / 2]) { translate([x,0,$stem_support_height / 2]) {
cube([ cube([
0.5, 0.5,
total_key_height()*2, // this is to extend past total_key_height() + extra_height*2, // this is to extend past
$stem_support_height $stem_support_height
], center = true); ], center = true);
} }
} }
} }
inside_cherry_cross($stem_inner_slop); inside_cherry_cross(slop);
} }
} else if (stem_type == "cherry_stabilizer") { } else if (stem_type == "cherry_stabilizer") {
difference () { difference () {
@ -55,7 +55,7 @@ module tines_support(stem_type, stem_support_height, slop) {
translate([x,0,$stem_support_height / 2]) { translate([x,0,$stem_support_height / 2]) {
cube([ cube([
1, 1,
total_key_height()*2, total_key_height($wall_thickness),
$stem_support_height $stem_support_height
], center = true); ], center = true);
} }
@ -67,19 +67,15 @@ module tines_support(stem_type, stem_support_height, slop) {
difference () { difference () {
centered_tines(stem_support_height); centered_tines(stem_support_height);
inside_cherry_cross($stem_inner_slop); inside_cherry_cross(slop);
} }
} else if (stem_type == "rounded_cherry") { } else if (stem_type == "rounded_cherry") {
difference () { difference () {
centered_tines(stem_support_height); centered_tines(stem_support_height);
inside_cherry_cross($stem_inner_slop); inside_cherry_cross(slop);
} }
} else if (stem_type == "alps"){ } else if (stem_type == "alps"){
centered_tines(stem_support_height); 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(), 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); */
} }
} }

View File

@ -4,7 +4,7 @@ include <stems/box_cherry.scad>
include <stems/alps.scad> include <stems/alps.scad>
include <stems/filled.scad> include <stems/filled.scad>
include <stems/cherry_stabilizer.scad> include <stems/cherry_stabilizer.scad>
include <stems/choc.scad> include <stems/custom.scad>
//whole stem, alps or cherry, trimmed to fit //whole stem, alps or cherry, trimmed to fit
@ -21,8 +21,6 @@ module stem(stem_type, depth, slop, throw){
filled_stem(); filled_stem();
} else if (stem_type == "cherry_stabilizer") { } else if (stem_type == "cherry_stabilizer") {
cherry_stabilizer_stem(depth, slop, throw); cherry_stabilizer_stem(depth, slop, throw);
} else if (stem_type == "choc") {
choc_stem(depth, slop, throw);
} else if (stem_type == "disable") { } else if (stem_type == "disable") {
children(); children();
} else { } else {

View File

@ -11,6 +11,6 @@ module box_cherry_stem(depth, slop, throw) {
} }
// inside cross // inside cross
inside_cherry_cross($stem_inner_slop); inside_cherry_cross(slop);
} }
} }

View File

@ -2,7 +2,7 @@ include <../functions.scad>
// extra length to the vertical tine of the inside cherry cross // extra length to the vertical tine of the inside cherry cross
// splits the stem into halves - allows easier fitment // splits the stem into halves - allows easier fitment
extra_vertical = 100; extra_vertical = 0.6;
module inside_cherry_cross(slop) { module inside_cherry_cross(slop) {
// inside cross // inside cross

View File

@ -4,11 +4,11 @@ include <../functions.scad>
// splits the stem into halves - allows easier fitment // splits the stem into halves - allows easier fitment
extra_vertical = 0.6; extra_vertical = 0.6;
module inside_cherry_stabilizer_cross(slop, throw) { module inside_cherry_stabilizer_cross(slop) {
// inside cross // inside cross
// translation purely for aesthetic purposes, to get rid of that awful lattice // translation purely for aesthetic purposes, to get rid of that awful lattice
translate([0,0,-SMALLEST_POSSIBLE]) { translate([0,0,-SMALLEST_POSSIBLE]) {
linear_extrude(height = throw) { linear_extrude(height = $stem_throw) {
square(cherry_cross(slop, extra_vertical)[0], center=true); square(cherry_cross(slop, extra_vertical)[0], center=true);
square(cherry_cross(slop, extra_vertical)[1], center=true); square(cherry_cross(slop, extra_vertical)[1], center=true);
} }
@ -24,6 +24,6 @@ module cherry_stabilizer_stem(depth, slop, throw) {
} }
} }
inside_cherry_stabilizer_cross(slop, throw); inside_cherry_stabilizer_cross(slop);
} }
} }

View File

@ -1,17 +0,0 @@
separation = 5.7;
positions = [
[separation/2, 0],
[-separation/2, 0],
];
// TODO throw not used
module choc_stem(depth, slop, throw){
for (position=positions) {
translate([position.x,position.y, depth/2]) single_choc_stem(depth, slop);
}
}
module single_choc_stem(depth, slop) {
cube([$choc_stem.x - slop, $choc_stem.y - slop, depth], center=true);
}

View File

@ -7,6 +7,6 @@ module rounded_cherry_stem(depth, slop, throw) {
// inside cross // inside cross
// translation purely for aesthetic purposes, to get rid of that awful lattice // translation purely for aesthetic purposes, to get rid of that awful lattice
inside_cherry_cross($stem_inner_slop); inside_cherry_cross(slop);
} }
} }

View File

@ -40,14 +40,6 @@ module flared(stem_type, loft, height) {
square(outer_cherry_stabilizer_stem($stem_slop) - [2,2], center=true); square(outer_cherry_stabilizer_stem($stem_slop) - [2,2], center=true);
} }
} }
} else if (stem_type == "choc") {
// single support, just the stem
new_choc_scale = [scale_for_45(height, $choc_stem[0] + 5.7 - $stem_slop), scale_for_45(height, $choc_stem[1])];
translate([0,0,0]) linear_extrude(height=height, scale = new_choc_scale){
// TODO make a choc_stem() function so it can build in the slop
square([$choc_stem[0] + 5.7 - $stem_slop, $choc_stem[1] - $stem_slop], center=true);
}
} else { } else {
// always render cherry if no stem type. this includes stem_type = false! // always render cherry if no stem type. this includes stem_type = false!
// this avoids a bug where the keycap is rendered filled when not desired // this avoids a bug where the keycap is rendered filled when not desired

View File

@ -445,12 +445,12 @@ copy-descriptor@^0.1.0:
integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
copy-props@^2.0.1: copy-props@^2.0.1:
version "2.0.5" version "2.0.4"
resolved "https://registry.yarnpkg.com/copy-props/-/copy-props-2.0.5.tgz#03cf9ae328d4ebb36f8f1d804448a6af9ee3f2d2" resolved "https://registry.yarnpkg.com/copy-props/-/copy-props-2.0.4.tgz#93bb1cadfafd31da5bb8a9d4b41f471ec3a72dfe"
integrity sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw== integrity sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==
dependencies: dependencies:
each-props "^1.3.2" each-props "^1.3.0"
is-plain-object "^5.0.0" is-plain-object "^2.0.1"
core-util-is@~1.0.0: core-util-is@~1.0.0:
version "1.0.2" version "1.0.2"
@ -538,7 +538,7 @@ duplexify@^3.6.0:
readable-stream "^2.0.0" readable-stream "^2.0.0"
stream-shift "^1.0.0" stream-shift "^1.0.0"
each-props@^1.3.2: each-props@^1.3.0:
version "1.3.2" version "1.3.2"
resolved "https://registry.yarnpkg.com/each-props/-/each-props-1.3.2.tgz#ea45a414d16dd5cfa419b1a81720d5ca06892333" resolved "https://registry.yarnpkg.com/each-props/-/each-props-1.3.2.tgz#ea45a414d16dd5cfa419b1a81720d5ca06892333"
integrity sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA== integrity sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==
@ -1013,9 +1013,9 @@ homedir-polyfill@^1.0.1:
parse-passwd "^1.0.0" parse-passwd "^1.0.0"
hosted-git-info@^2.1.4: hosted-git-info@^2.1.4:
version "2.8.9" version "2.8.8"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488"
integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==
inflight@^1.0.4: inflight@^1.0.4:
version "1.0.6" version "1.0.6"
@ -1178,11 +1178,6 @@ is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4:
dependencies: dependencies:
isobject "^3.0.1" 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: is-relative@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d"
@ -2353,9 +2348,9 @@ xtend@~4.0.0, xtend@~4.0.1:
integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
y18n@^3.2.1: y18n@^3.2.1:
version "3.2.2" version "3.2.1"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== integrity sha1-bRX7qITAhnnA136I53WegR4H+kE=
yargs-parser@^5.0.0: yargs-parser@^5.0.0:
version "5.0.1" version "5.0.1"