|
|
@@ -2,6 +2,7 @@ include <ATX.scad>
|
|
|
include <functions.scad>
|
|
|
include <angle.scad>
|
|
|
include <addon.scad>
|
|
|
+include <switch.scad>
|
|
|
|
|
|
include <../config/global.scad>
|
|
|
include <../config/front.scad>
|
|
|
@@ -62,12 +63,50 @@ module front_shape() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ module switch_move_cutoff() {
|
|
|
+ move_x
|
|
|
+ = width / 2
|
|
|
+ - switch_size().x / 2
|
|
|
+ - angle_depth
|
|
|
+ + plywood_thickness / 2
|
|
|
+ - front_switch_margin.x;
|
|
|
+
|
|
|
+ move_y
|
|
|
+ = height / 2
|
|
|
+ - switch_size().y / 2
|
|
|
+ - angle_depth
|
|
|
+ + plywood_thickness / 2
|
|
|
+ - front_switch_margin.y;
|
|
|
+
|
|
|
+ translate([move_x, move_y]) {
|
|
|
+ switch_cutoff();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module addon_move_cutoff() {
|
|
|
+ move_x
|
|
|
+ = -width / 2
|
|
|
+ + addon_size().x / 2
|
|
|
+ + angle_depth
|
|
|
+ + front_addon_margin.x;
|
|
|
+
|
|
|
+ move_y
|
|
|
+ = -height / 2
|
|
|
+ + addon_size().y / 2
|
|
|
+ + front_addon_margin.y;
|
|
|
+
|
|
|
+ translate([move_x, move_y]) {
|
|
|
+ addon_cutoff();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
difference() {
|
|
|
base_shape();
|
|
|
mounting_cutoff();
|
|
|
+ switch_move_cutoff();
|
|
|
|
|
|
if (front_addon) {
|
|
|
- addon_cutoff();
|
|
|
+ addon_move_cutoff();
|
|
|
}
|
|
|
}
|
|
|
}
|