mirror of
https://github.com/rsheldiii/KeyV2.git
synced 2025-01-22 17:30:57 +00:00
lol ISO enter on the SA branch #madlads
This commit is contained in:
parent
f0d1220c63
commit
5edb404697
2 changed files with 22 additions and 20 deletions
35
key.scad
35
key.scad
|
@ -345,18 +345,15 @@ example_key();
|
||||||
|
|
||||||
// Experimental stuff
|
// Experimental stuff
|
||||||
|
|
||||||
// NOT 3D, NOT CENTERED
|
|
||||||
// corollary is roundedRect
|
// corollary is roundedRect
|
||||||
module fakeISOEnter(thickness_difference){
|
// NOT 3D
|
||||||
z = 0.001;
|
module fakeISOEnter(thickness_difference = 0){
|
||||||
radius = 2;
|
|
||||||
// 1u is the space taken upy by a 1u keycap.
|
// 1u is the space taken upy by a 1u keycap.
|
||||||
// unit is the space taken up by a unit space for a keycap.
|
// unit is the space taken up by a unit space for a keycap.
|
||||||
// formula is 1u + unit *(length - 1)
|
// formula is 1u + unit *(length - 1)
|
||||||
|
|
||||||
// t is all modifications to the polygon array
|
// t is all modifications to the polygon array
|
||||||
// could do map but can scad even do map?
|
t = $corner_radius + thickness_difference/2;
|
||||||
t = radius + thickness_difference/2;
|
|
||||||
|
|
||||||
function unit(length) = 19.02 * (length) + (18.16 - 19.02);
|
function unit(length) = 19.02 * (length) + (18.16 - 19.02);
|
||||||
|
|
||||||
|
@ -367,22 +364,24 @@ module fakeISOEnter(thickness_difference){
|
||||||
[unit(1.25) - t, unit(1) - t],
|
[unit(1.25) - t, unit(1) - t],
|
||||||
[unit(1.25) - t, unit(2) - t],
|
[unit(1.25) - t, unit(2) - t],
|
||||||
[ 0 + t, unit(2) - t]
|
[ 0 + t, unit(2) - t]
|
||||||
];
|
]
|
||||||
|
offset(r=$corner_radius) {
|
||||||
minkowski(){
|
|
||||||
circle(r=radius, $fn=24);
|
|
||||||
polygon(points=pointArray);
|
polygon(points=pointArray);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//corollary is shape_hull
|
//corollary is shape_hull
|
||||||
module ISOEnterShapeHull(thickness_difference, depth_difference, modifier){
|
module ISOEnterShapeHull(thickness_difference, depth_difference, modifier){
|
||||||
function unit(length) = 19.02 * (length) + (18.16 - 19.02);
|
// TODO move this somewhere
|
||||||
height = 8 - depth_difference;
|
function unit(length) = 19.02 * (length) + (18.16 - 19.02);
|
||||||
|
|
||||||
translate([unit(-0.25), unit(.5)]) linear_extrude(height=height*modifier, scale=[.8, .9]){
|
height = $total_depth - depth_difference;
|
||||||
translate([unit(-.5), unit(-1.5)]) minkowski(){
|
width_scale = top_total_key_width() / total_key_width();
|
||||||
fakeISOEnter(thickness_difference);
|
height_scale = top_total_key_height() / total_key_height();
|
||||||
}
|
|
||||||
}
|
linear_extrude(height = height, scale = [width_scale, height_scale]) {
|
||||||
|
|
||||||
|
// TODO completely making up these numbers here
|
||||||
|
translate([unit(-.5), unit(-.9)]) fakeISOEnter();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,8 +164,9 @@ module fake_iso_enter() {
|
||||||
$dish_depth = 1;
|
$dish_depth = 1;
|
||||||
$dish_skew_x = 0;
|
$dish_skew_x = 0;
|
||||||
$dish_skew_y = 0;
|
$dish_skew_y = 0;
|
||||||
|
$ISOEnter = true;
|
||||||
|
|
||||||
children();
|
stabilized(vertical=true) children();
|
||||||
}
|
}
|
||||||
|
|
||||||
module brimmed() {
|
module brimmed() {
|
||||||
|
@ -357,5 +358,7 @@ module legend(text, inset=false) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
/*
|
||||||
|
sa_row(1) blank() key();*/
|
||||||
|
|
||||||
sa_row(1) rounded() blank() key();
|
blank() dishless() fake_iso_enter() cherry() key();
|
||||||
|
|
Loading…
Reference in a new issue