|
|
@@ -0,0 +1,89 @@
|
|
|
+include <ATX.scad>
|
|
|
+include <../config/side.scad>
|
|
|
+include <../config/plate.scad>
|
|
|
+
|
|
|
+module side_shape() {
|
|
|
+ rounding = side_rounding / 2;
|
|
|
+
|
|
|
+ module corner(x = 0, y = 0, rounded = true) {
|
|
|
+ translate([x, y]) {
|
|
|
+ if (rounded) {
|
|
|
+ circle(r = rounding);
|
|
|
+ } else {
|
|
|
+ square([rounding * 2, rounding * 2], center = true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module handle() {
|
|
|
+ top_width = side_handle_width;
|
|
|
+ bottom_width = side_width;
|
|
|
+ height = side_handle_height;
|
|
|
+
|
|
|
+ move_y = height / 2 - rounding;
|
|
|
+ move_x_top = top_width / 2 - rounding;
|
|
|
+ move_x_bottom = bottom_width / 2 - rounding;
|
|
|
+
|
|
|
+ union() {
|
|
|
+ hull() {
|
|
|
+ corner(-move_x_bottom, -move_y);
|
|
|
+ corner(-move_x_top, move_y);
|
|
|
+ }
|
|
|
+
|
|
|
+ hull() {
|
|
|
+ corner(-move_x_top, move_y);
|
|
|
+ corner(move_x_top, move_y);
|
|
|
+ }
|
|
|
+
|
|
|
+ hull() {
|
|
|
+ corner(move_x_top, move_y);
|
|
|
+ corner(move_x_bottom, -move_y);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ width = side_width;
|
|
|
+ handle_height = side_handle_height;
|
|
|
+ height = side_height + handle_height;
|
|
|
+ cutoff_width = side_cutoff_width;
|
|
|
+ cutoff_height = side_cutoff_height;
|
|
|
+
|
|
|
+ module base_shape() {
|
|
|
+ move_x = width / 2 - rounding;
|
|
|
+ move_y_top = height / 2 - handle_height / 2 + rounding;
|
|
|
+ move_y_bottom = -(height - rounding * 2) / 2 - handle_height / 2;
|
|
|
+ cutoff_move_x = cutoff_width / 2 - rounding;
|
|
|
+ cutoff_move_y = cutoff_height / 2 - rounding;
|
|
|
+ cutoff_position_y = move_y_bottom + cutoff_move_y;
|
|
|
+
|
|
|
+ difference() {
|
|
|
+ hull() {
|
|
|
+ corner(move_x, move_y_top);
|
|
|
+ corner(move_x, move_y_bottom);
|
|
|
+ corner(-move_x, move_y_top);
|
|
|
+ corner(-move_x, move_y_bottom);
|
|
|
+ }
|
|
|
+
|
|
|
+ translate([0, cutoff_position_y]) {
|
|
|
+ hull() {
|
|
|
+ corner(cutoff_move_x, cutoff_move_y);
|
|
|
+ corner(-cutoff_move_x, cutoff_move_y);
|
|
|
+ corner(cutoff_move_x, -cutoff_move_y, false);
|
|
|
+ corner(-cutoff_move_x, -cutoff_move_y, false);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ base_shape();
|
|
|
+
|
|
|
+ translate([0, height / 2]) {
|
|
|
+ handle();
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+module side_object() {
|
|
|
+ linear_extrude(height = side_thickness, center = true) {
|
|
|
+ side_shape();
|
|
|
+ }
|
|
|
+}
|