diff options
author | XANTRONIX Development | 2023-11-15 15:11:51 -0500 |
---|---|---|
committer | XANTRONIX Development | 2023-11-15 15:11:51 -0500 |
commit | 8fb65233a75317dac5497669d6f802e4509f1b4a (patch) | |
tree | 5d60070a4a9b169385568d71d0fadc00f93cbec2 | |
parent | 651a39d9dca38e6be29d55c9a5881f866e6fb2a3 (diff) | |
download | xantronix-z32-8fb65233a75317dac5497669d6f802e4509f1b4a.tar.gz xantronix-z32-8fb65233a75317dac5497669d6f802e4509f1b4a.tar.bz2 xantronix-z32-8fb65233a75317dac5497669d6f802e4509f1b4a.zip |
Start on support structures
-rw-r--r-- | case/top.scad | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/case/top.scad b/case/top.scad index 7299fac..0279fd7 100644 --- a/case/top.scad +++ b/case/top.scad @@ -14,8 +14,8 @@ include <keyboard.scad> * Ridge thickness: 1.25mm * First horizontal ridge: Starts at keyboard X offset * Ridge height: 11.5mm - * Ridge upper aspect: 8mm - * Ridge lower aspect: 5mm + * Ridge upper aspect: 12mm + * Ridge lower aspect: 3.75mm * First vertical ridge Y offset: 8mm */ @@ -78,7 +78,48 @@ module top_case(key_switch_sizes, pcb_screw_holes) { cube([accent_depth, accent_width, wall_height], false); } } - + + module support(dimensions, width) { + length = dimensions[0]; + height = dimensions[1]; + + module right_triangle(base) { + length = sqrt((base ^ 2) / 2.0); + + intersection() { + rotate([0, 0, -45]) + square([length*2, length*2], true); + + square([length*2, length*2]); + } + } + + module shape() { + /* Height ratio of lower aspect to upper aspect */ + aspect_ratio = 3.75 / 12.0; + + aspect_upper_height = height; + aspect_lower_height = aspect_ratio * height; + + /* The length of each individual support aspect */ + aspect_length = 1/3 * length; + + hypotenuse = sqrt(2*(aspect_length^2)); + lower_x_offset = aspect_length - (hypotenuse - aspect_length); + + right_triangle(aspect_length); + + translate([lower_x_offset, 0, 0]) + square([1.5 * hypotenuse, aspect_lower_height]); + + translate([3 * aspect_length, 0, 0]) + mirror([1, 0, 0]) + right_triangle(aspect_length); + } + + linear_extrude(width) shape(); + } + module body() { translate([0, 0, wall_height - wall_width]) fascia(); |