mirror of
https://github.com/rsheldiii/KeyV2.git
synced 2025-01-22 09:27:46 +00:00
add dish overdraw to solve incorrect dishing on ISO Enter key due to repositioning the shape to always be centered
This commit is contained in:
parent
736f3a6d70
commit
ded7af69da
3 changed files with 14 additions and 6 deletions
10
key.scad
10
key.scad
|
@ -79,6 +79,10 @@ support_type = "flared";
|
|||
key_shape_type = "normal";
|
||||
// ISO enter needs to be linear extruded NOT from the center. this tells the program how far up 'not from the center' is
|
||||
linear_extrude_height_adjustment = 0;
|
||||
// if you need the dish to extend further, you can 'overdraw' the rectangle it will hit
|
||||
dish_overdraw_width = 0;
|
||||
// same as width but for height
|
||||
dish_overdraw_height = 0;
|
||||
|
||||
|
||||
|
||||
|
@ -221,14 +225,14 @@ module dished(depth_difference, inverted = false) {
|
|||
union() {
|
||||
children();
|
||||
translate([$dish_skew_x, $top_skew + $dish_skew_y, $total_depth - depth_difference]){
|
||||
color([.4078, .3569, .749]) dish(top_total_key_width(), top_total_key_height(), $dish_depth, $inverted_dish, $top_tilt / $key_height);
|
||||
color([.4078, .3569, .749]) dish(top_total_key_width() + $dish_overdraw_width, top_total_key_height() + $dish_overdraw_height, $dish_depth, $inverted_dish, $top_tilt / $key_height);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
difference() {
|
||||
children();
|
||||
translate([$dish_skew_x, $top_skew + $dish_skew_y, $total_depth - depth_difference]){
|
||||
color([.4078, .3569, .749]) dish(top_total_key_width(), top_total_key_height(), $dish_depth, $inverted_dish, $top_tilt / $key_height);
|
||||
color([.4078, .3569, .749]) dish(top_total_key_width() + $dish_overdraw_width, top_total_key_height() + $dish_overdraw_height, $dish_depth, $inverted_dish, $top_tilt / $key_height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -349,6 +353,8 @@ module example_key(){
|
|||
$slop = slop;
|
||||
$support_type = support_type;
|
||||
$linear_extrude_height_adjustment = linear_extrude_height_adjustment;
|
||||
$dish_overdraw_width = dish_overdraw_width;
|
||||
$dish_overdraw_height = dish_overdraw_height;
|
||||
|
||||
|
||||
key();
|
||||
|
|
|
@ -48,6 +48,8 @@ $slop = 0.3;
|
|||
$support_type = "bars";
|
||||
$key_shape_type = "normal";
|
||||
$linear_extrude_height_adjustment = 0;
|
||||
$dish_overdraw_width = 0;
|
||||
$dish_overdraw_height = 0;
|
||||
|
||||
// key profile definitions
|
||||
|
||||
|
@ -206,13 +208,11 @@ module iso_enter() {
|
|||
$total_depth = 7;
|
||||
$top_tilt = 0;
|
||||
$top_skew = 1.75;
|
||||
$dish_type = "cylindrical";
|
||||
$dish_depth = 1;
|
||||
$dish_skew_x = 0;
|
||||
$dish_skew_y = 0;
|
||||
$key_shape_type = "iso_enter";
|
||||
$linear_extrude_shape = true;
|
||||
$linear_extrude_height_adjustment = 19.05 * 0.5;
|
||||
// (unit_length(1.5) - unit_length(1.25)) / 2
|
||||
$dish_overdraw_width = 2.38125;
|
||||
|
||||
|
||||
stabilized(vertical=true) {
|
||||
|
|
|
@ -39,6 +39,8 @@ module ISO_enter(width, height, width_difference, height_difference, corner_size
|
|||
width_ratio = unit_length(1.25) / unit_length(1.5);
|
||||
height_ratio = unit_length(1) / unit_length(2);
|
||||
|
||||
echo((unit_length(1.5) - unit_length(1.25))/ 2);
|
||||
|
||||
pointArray = [
|
||||
[ -width_difference/2, -height_difference/2],
|
||||
[ -width_difference/2, -height + height_difference/2],
|
||||
|
|
Loading…
Reference in a new issue