+
+ color("blue") translate([0,0, -psu_z - ceil])
+ linear_extrude(height=0.4, convexity=10)
+ PsuLedLegendsPlan();
+
+ translate([0, psu_board_nutbox_y, 10])
+ rotate([180,0,0])
+ rotate([0,0,-90])
+ PsuClamp();
+ }
+}
+
+module PsuMountTest() { ////toplevel
+ ceil = psu_test_ceil;
+ $fs = 0.1;
+ $fa = 3;
+ difference(){
+ union(){
+ translate([0, psu_y, psu_z])
+ PsuMountPositive();
+ difference(){
+
+ // rectangular box with wall
+ linextr_x_yz(-psu_mount_outer_sz_x/2,
+ +psu_mount_outer_sz_x/2) {
+ difference(){
+ rectfromto([0, -ceil],
+ [psu_mount_outer_sz_y, psu_z + 10]);
+ rectfromto([ceil,0], 400*[1,1]);
+ }
+ }
+
+ translate([0, psu_y, psu_z]) {
+ PsuMountNegative();
+ }
+
+ translate([0, psu_y, -ceil]) {
+ linextr(-1, psu_initial_layer_thick) {
+ offset(delta=psu_multicolour_gap)
+ PsuLedLegendsPlan();
+ }
+ }
+ }
+ }
+ translate([0, psu_y, psu_z])
+ PsuMountWindowsNegative(ceil);
+ }
+}
+
+psu_multicolour_gap = 0.075;
+psu_initial_layer_thick = 0.400;
+psu_initial_layer_width = 0.750;
+psu_window_ledge = 0.50; // each side
+
+psu_frame_gap = 1.0;
+
+module PsuMountLayerFrame(bl, tr, ix) {
+ gap0 = [1,1] * (psu_frame_gap + psu_initial_layer_width*(ix+0));
+ gap1 = [1,1] * (psu_frame_gap + psu_initial_layer_width*(ix+1));
+ linextr(0, psu_initial_layer_thick) {
+ difference(){
+ rectfromto(bl-gap1, tr+gap1);
+ rectfromto(bl-gap0, tr+gap0);
+ }