|
|
@@ -2,9 +2,50 @@ include <../config/plate.scad>
|
|
|
include <ATX.scad>
|
|
|
|
|
|
module plate_shape() {
|
|
|
+ size = plate_size;
|
|
|
+ holes = plate_holes;
|
|
|
+ padding = plate_padding;
|
|
|
+ hole = plate_hole;
|
|
|
|
|
|
+ module corner(x = 0, y = 0) {
|
|
|
+ translate([x, y]) {
|
|
|
+ circle(r = padding);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module board_mount_hole(hole = [0, 0]) {
|
|
|
+ translate(hole) {
|
|
|
+ circle(r = hole / 2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module base_shape() {
|
|
|
+ hull() {
|
|
|
+ move_x = size[0] / 2;
|
|
|
+ move_y = size[1] / 2;
|
|
|
+
|
|
|
+ corner(move_x, move_y);
|
|
|
+ corner(-move_x, move_y);
|
|
|
+ corner(move_x, -move_y);
|
|
|
+ corner(-move_x, -move_y);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module shape_with_mobo_mount() {
|
|
|
+ difference() {
|
|
|
+ base_shape();
|
|
|
+
|
|
|
+ for (hole = holes) {
|
|
|
+ board_mount_hole(hole);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ shape_with_mobo_mount();
|
|
|
}
|
|
|
|
|
|
module plate_object() {
|
|
|
-
|
|
|
+ linear_extrude(height = plate_thickness, center = true) {
|
|
|
+ plate_shape();
|
|
|
+ }
|
|
|
}
|