-
-module PsuMountPositiveMain(){
- for (mx=[0,1]) {
- for (my=[0,1]) {
- PsuMountCornerExtrude(mx,my){
- rectfromto(-[1,1]*psu_board_support_wall,
- +[1,1]*board_support_ovlp);
- }
- }
- // mount above at plug end
- PsuMountCornerExtrude(mx,0, psu_th + psu_board_support_wall){
- rectfromto(-[1,1]*psu_board_support_wall,
- [board_support_ovlp,
- board_support_ovlp_ceil]);
- }
- }
- translate([0,0, -psu_z_down])
- linear_extrude(psu_z_down - psu_baffle_gap, convexity=10)
- PsuLedBafflePlan();
-}
-
-module PsuMountNegative(){
- axis = [0, -psu_sz[1]/2, psu_th];
- PsuRepresentation();
- translate(axis)
- rotate([atan(2 * board_support_z / psu_sz[1]),
- 0,0])
- translate(-axis)
- PsuBoardRepresentation();
-}
-
-module PsuMountPositive(){
- difference(){
- intersection(){
- PsuMountPositiveMain();
- linextr_y_xz(-psu_y, psu_sz[1]*2) square(100, center=true);
- }
- PsuMountNegative();
- intersection(){
- hull(){
- PsuBoardRepresentation();
- translate([0,0,5]) PsuBoardRepresentation();
- }
- translate([-20,0,-20]) cube(40);
- }
- }
- for (mx=[0,1]) {
- PsuMountCornerExtrude(mx,1){
- translate([psu_sz[0]/2 - psu_hole_pos[1],
- psu_hole_pos[0]]
- + board_gap * [1,1] )
- circle(r= psu_hole_dia/2);
- }
- }
- translate([0, psu_sz[1]/2 + psu_board_nutbox[0]/2, 0])
- rotate([0,0,180])
- NutBox(psu_board_nutbox, psu_z_down);
-}
-
-module PsuClamp(){ ////toplevel
- rotate([180,0,0]) difference(){
- linear_extrude(height=psu_clamp_th + psu_th_for_clamp, convexity=5) {
- difference(){
- hull(){
- circle(r = fix_sz/2);
- translate([ -psu_board_nutbox[0]/2, 0])
- square(center=true, [ psu_board_clamp_ovlp*2, psu_clamp_w ]);
- }
- circle(r = psu_board_nutbox[0]/2);
- }
- }
- translate([0,0,-1]) linear_extrude(height=psu_th_for_clamp+1) {
- translate([ -psu_board_nutbox[0]/2 + psu_clamp_gap, 0 ])
- mirror([1,0])
- translate([0,-20]) square(40);
- }
- }
-}
-
-module PsuMountDemo(ceil = 2.5) { ////toplevel
- translate([0, psu_y, psu_z]) {
- PsuMountPositive();
- %PsuMountNegative();
- color("yellow") translate([0,0, -psu_z - ceil])
- linear_extrude(height=0.4, convexity=10)
- PsuLedWindowsPlan();
- }
-}