diff --git a/customizer.scad b/customizer.scad index f940ccb..40bc3d4 100644 --- a/customizer.scad +++ b/customizer.scad @@ -851,17 +851,6 @@ module debug() { %children(); } - -module display() { - $height_slices = 30; - $minkowski_facets = 64; - $shape_facets = 64; - $stem_type = "disable"; - $support_type = "disable"; - $stem_support_type = "disable"; - - children(); -} module arrows(profile, rows = [4,4,4,3]) { positions = [[0, 0], [1, 0], [2, 0], [1, 1]]; legends = ["←", "↓", "→", "↑"]; @@ -967,6 +956,7 @@ unit = 19.05; // NOT 3D function unit_length(length) = unit * (length - 1) + 18.16; + module ISO_enter_shape(size, delta, progress){ width = size[0]; height = size[1]; @@ -981,19 +971,21 @@ module ISO_enter_shape(size, delta, progress){ width_ratio = unit_length(1.25) / unit_length(1.5); height_ratio = unit_length(1) / unit_length(2); + delta = delta / 2; + pointArray = [ - [ 0, 0], // top right - [ 0, -height], // bottom right - [-width * width_ratio, -height], // bottom left - [-width * width_ratio,-height * height_ratio], // inner middle point - [ -width,-height * height_ratio], // outer middle point - [ -width, 0] // top left + [ 0-delta.x, 0-delta.y], // top right + [ 0-delta.x, -height+delta.y], // bottom right + [-width * width_ratio+delta.x, -height+delta.y], // bottom left + [-width * width_ratio + delta.x,-height * height_ratio+delta.y], // inner middle point + [ -width + delta.x,-height * height_ratio + delta.y], // outer middle point + [ -width + delta.x, 0-delta.y] // top left ]; minkowski(){ - circle(r=corner_size); + circle(r=$corner_radius); // 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); } } @@ -1192,7 +1184,7 @@ module rounded_square_shape(size, delta, progress, center = true) { // for skin function skin_rounded_square(size, delta, progress, thickness_difference) = - rounded_rectangle_profile(size - (delta * progress), fn=$shape_facets, r=$corner_radius); + rounded_rectangle_profile(size - (delta * progress) - [thickness_difference, thickness_difference], fn=$shape_facets, r=$corner_radius); SMALLEST_POSSIBLE = 1/128; // I use functions when I need to compute special variables off of other special variables diff --git a/keys.scad b/keys.scad index 0a80ad0..768110e 100644 --- a/keys.scad +++ b/keys.scad @@ -9,32 +9,7 @@ include <./includes.scad> // example key -/* $skin_key_shape = true; */ - -difference() { - /* top_of_key() { */ - /* cube(10); */ - /* } */ - /* key(); */ -} - -/* simple_layout(lets_split_layout) { - dcs_row($row) key(); -} */ - -dcs_row(1) legend("h") front_legend("q" -) { - $key_length = 2.75; - key(); -} - -translate_u(0,1) dcs_row(1) { - $key_length = 0.86; - key(); -} - -/* debug() key(); */ - +dcs_row(5) legend("⇪", size=9) key(); // example row /* for (x = [0:1:4]) { @@ -42,4 +17,4 @@ translate_u(0,1) dcs_row(1) { } */ // example layout -/* preonic_default("dcs"); */ +/* preonic_default("dcs"); */ \ No newline at end of file diff --git a/src/key_transformations.scad b/src/key_transformations.scad index e443ae0..f873a59 100644 --- a/src/key_transformations.scad +++ b/src/key_transformations.scad @@ -177,14 +177,3 @@ module debug() { %children(); } - -module display() { - $height_slices = 30; - $minkowski_facets = 64; - $shape_facets = 64; - $stem_type = "disable"; - $support_type = "disable"; - $stem_support_type = "disable"; - - children(); -}