]> git.armaanb.net Git - atreides.git/blobdiff - case/openscad/atreus_case.scad
Openscad option to split the spacer layer of the case into fourths.
[atreides.git] / case / openscad / atreus_case.scad
index 9f03d112a3644523658552a013422f2c6149c480..9fcb0117ffc8caf3d8cf5175f01bb0cbbdbbcbe8 100644 (file)
@@ -57,6 +57,12 @@ cable_hole_width = 12;
    be zero. */
 staggering_offsets = [0, 5, 11, 6, 3];
 
+/* Whether or not to split the spacer into quarters. */
+quarter_spacer = false;
+
+/* Where the top/bottom split of a quartered spacer will be. */
+spacer_quartering_offset = 60;
+
 module rz(angle, center=undef) {
   /* Rotate children `angle` degrees around `center`. */
   translate(center) {
@@ -286,8 +292,34 @@ module spacer() {
   }
 }
 
+module spacer_quadrant(spacer_quadrant_number) {
+  /* Cut a quarter of a spacer. */
+  translate([0, spacer_quartering_offset]) {
+    intersection() {
+      translate([0, -spacer_quartering_offset]) { spacer(); }
+      rotate([0, 0, spacer_quadrant_number * 90]) { square([1000, 1000]); }
+    }
+  }
+}
+
+module quartered_spacer()
+{
+  /* Assemble all four quarters of a spacer. */
+  spacer_quadrant(0);
+  spacer_quadrant(1);
+  translate([-5,-10]) spacer_quadrant(2);
+  translate([5,-10]) spacer_quadrant(3);
+}
+
 /* Create all four layers. */
 top_plate();
-translate([300, 150]) { spacer(); }
 translate([300, 0]) { switch_plate(); }
 translate([0, 150]) { bottom_plate(); }
+translate([300, 150]) {
+  if (quarter_spacer == true) {
+    quartered_spacer();
+  }
+  else {
+    spacer();
+  }
+}