chiark / gitweb /
digispark-with-cable: wip progress
[reprap-play.git] / adafruit-powerboost-common.scad
index 505e47247dab9824cc70e814915dc1b142d294a7..b62643ac8ba297a2ad25efca633c980c1d2e860a 100644 (file)
@@ -192,15 +192,33 @@ module PsuLedWindowsPlan(){
   }
 }
 
-module PsuMountWindowsNegative(ceil){
-  linextr(-10, 0.1)
+module PsuLedWindowsWindows(ceil){
+  translate([0,0, -psu_z - ceil])
+    linextr(0, psu_initial_layer_thick)
+    offset(delta=psu_window_ledge)
     PsuLedWindowsPlan();
+}
+
+module PsuFirstLayerNegative(ceil){
   translate([0, 0, -psu_z - ceil])
     linextr(-1, psu_initial_layer_thick)
-    offset(delta=psu_window_ledge + psu_multicolour_gap)
+    children();
+}
+
+module PsuMountWindowsNegative(ceil){
+  linextr(-10, 0.1)
+    PsuLedWindowsPlan();
+  PsuFirstLayerNegative(ceil)
+    offset(delta= psu_window_ledge + psu_multicolour_gap)
     PsuLedWindowsPlan();
 }
 
+module PsuLedLegendsNegative(ceil){
+  PsuFirstLayerNegative(ceil)
+    offset(delta= psu_multicolour_gap)
+    PsuLedLegendsPlan();
+}
+
 module PsuMountDemo() { ////toplevel
   ceil = psu_test_ceil;
 
@@ -252,8 +270,10 @@ module PsuMountTest() { ////toplevel
        }
       }
     }
-    translate([0, psu_y, psu_z])
+    translate([0, psu_y, psu_z]) {
       PsuMountWindowsNegative(ceil);
+      PsuLedLegendsNegative(ceil);
+    }
   }
 }
 
@@ -290,13 +310,6 @@ module PsuMountTestFullMain() { ////toplevel
   difference(){
     translate([0,0, ceil])
       PsuMountTest();
-
-    translate([0, psu_y, 0]) {
-      linextr(-1, psu_initial_layer_thick) {
-       offset(delta=psu_multicolour_gap)
-         PsuLedLegendsPlan();
-      }
-    }
   }
 }
 
@@ -312,9 +325,9 @@ module PsuMountTestFullText() { ////toplevel
     PsuLedLegendsPlan();
 }
 module PsuMountTestFullWindows() { ////toplevel
-  PsuMountTestFullOneLayer(1)
-    offset(delta=psu_window_ledge)
-    PsuLedWindowsPlan();
+  PsuMountTestFullLayerFrame(1);
+  translate([0, psu_y, psu_z + psu_test_ceil])
+    PsuLedWindowsWindows(psu_test_ceil);
 }
 
 module PsuMountTestFullDemo() { ////toplevel