mirror of
https://github.com/rsheldiii/KeyV2.git
synced 2025-03-10 08:42:53 +00:00
ISO enter small fix
This commit is contained in:
parent
2eed004407
commit
57fbf6044d
1 changed files with 11 additions and 8 deletions
|
@ -2,6 +2,7 @@
|
||||||
// NOT 3D
|
// NOT 3D
|
||||||
function unit_length(length) = unit * (length - 1) + 18.16;
|
function unit_length(length) = unit * (length - 1) + 18.16;
|
||||||
|
|
||||||
|
|
||||||
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];
|
||||||
|
@ -16,19 +17,21 @@ module ISO_enter_shape(size, delta, progress){
|
||||||
width_ratio = unit_length(1.25) / unit_length(1.5);
|
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);
|
||||||
|
|
||||||
|
delta = delta / 2;
|
||||||
|
|
||||||
pointArray = [
|
pointArray = [
|
||||||
[ 0, 0], // top right
|
[ 0-delta.x, 0-delta.y], // top right
|
||||||
[ 0, -height], // bottom right
|
[ 0-delta.x, -height+delta.y], // bottom right
|
||||||
[-width * width_ratio, -height], // bottom left
|
[-width * width_ratio+delta.x, -height+delta.y], // bottom left
|
||||||
[-width * width_ratio,-height * height_ratio], // inner middle point
|
[-width * width_ratio + delta.x,-height * height_ratio+delta.y], // inner middle point
|
||||||
[ -width,-height * height_ratio], // outer middle point
|
[ -width + delta.x,-height * height_ratio + delta.y], // outer middle point
|
||||||
[ -width, 0] // top left
|
[ -width + delta.x, 0-delta.y] // top left
|
||||||
];
|
];
|
||||||
|
|
||||||
minkowski(){
|
minkowski(){
|
||||||
circle(r=corner_size);
|
circle(r=$corner_radius);
|
||||||
// gives us rounded inner corner
|
// gives us rounded inner corner
|
||||||
offset(r=-corner_size*2) {
|
offset(r=-$corner_radius*2) {
|
||||||
translate([(width * width_ratio)/2, height/2]) polygon(points=pointArray);
|
translate([(width * width_ratio)/2, height/2]) polygon(points=pointArray);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue