6 psu_sz = psu_sz_nom + [ 0.11, 0.44 ] + [ 0.25, 0.25 ];
8 psu_hole_pos = [ 2.05, // from back edge of psu_sz[0]
9 0.55 * 0.5 * 25.4, // from centreline
13 psu_th_for_clamp = 1.50;
15 psu_hole_dia = 2.5 - 0.3;
16 psu_connector_z = 2.9 + 0.1;
17 psu_connector_z_overlap = 0.15;
18 psu_connector_depth = 6.25;
19 psu_connector_w = 8.0 + 0.5;
22 psu_clamp_th = 4.0 + 0.75;
26 psu_board_clamp_ovlp = 4.5;
27 psu_board_nutbox = nutbox_data_M3;
30 psu_board_support_wall = 2;
31 psu_board_support_ovlp = 4.5;
32 psu_board_support_ovlp_ceil = 2;
33 psu_board_support_z = 2;
35 psu_baffle_gap = 1.0 + 0.5;
37 psu_y = +psu_sz[1]/2 + psu_usb_protr;
39 // ----- calculated -----
41 psu_z = NutBox_h_base(psu_board_nutbox);
42 psu_z_down = psu_z + 0.1;
44 module PsuBoardRepresentation(){
45 linear_extrude(height= psu_th)
46 square(center=true, [psu_sz[0],psu_sz[1]]);
49 module PsuRepresentation(){
50 PsuBoardRepresentation();
51 translate([0, -psu_sz[1]/2, -psu_connector_z])
52 linear_extrude(height= psu_connector_z + psu_connector_z_overlap)
53 rectfromto([ -psu_connector_w/2, -10 ],
54 [ +psu_connector_w/2, psu_connector_depth ]);
57 module AtPsuMountCorner(mx,my){
60 translate(-0.5 * [psu_sz[0], psu_sz[1], 0]
61 -1 * [0,0, psu_z_down])
65 module PsuMountCornerExtrude(mx,my, plus_z=psu_board_support_z){
66 AtPsuMountCorner(mx,my){
67 linear_extrude(height= psu_z_down + plus_z, convexity=10) {
73 module PsuMountPositiveMain(){
76 PsuMountCornerExtrude(mx,my){
77 rectfromto(-[1,1]*psu_board_support_wall,
78 +[1,1]*psu_board_support_ovlp);
81 // mount above at plug end
82 PsuMountCornerExtrude(mx,0, psu_th + psu_board_support_wall){
83 rectfromto(-[1,1]*psu_board_support_wall,
84 [psu_board_support_ovlp,
85 psu_board_support_ovlp_ceil]);
88 translate([0,0, -psu_z_down])
89 linear_extrude(psu_z_down - psu_baffle_gap, convexity=10)
93 module PsuMountNegative(){
94 axis = [0, -psu_sz[1]/2, psu_th];
97 rotate([atan(2 * psu_board_support_z / psu_sz[1]),
100 PsuBoardRepresentation();
103 module PsuMountPositive(){
106 PsuMountPositiveMain();
107 linextr_y_xz(-psu_y, psu_sz[1]*2) square(100, center=true);
112 PsuBoardRepresentation();
113 translate([0,0,5]) PsuBoardRepresentation();
115 translate([-20,0,-20]) cube(40);
119 PsuMountCornerExtrude(mx,1){
120 translate([psu_sz[0]/2 - psu_hole_pos[1],
122 + psu_board_gap * [1,1] )
123 circle(r= psu_hole_dia/2);
126 translate([0, psu_sz[1]/2 + psu_board_nutbox[0]/2, 0])
128 NutBox(psu_board_nutbox, psu_z_down);
131 module PsuClamp(){ ////toplevel
132 rotate([180,0,0]) difference(){
133 linear_extrude(height=psu_clamp_th + psu_th_for_clamp, convexity=5) {
136 circle(r = fix_sz/2);
137 translate([ -psu_board_nutbox[0]/2, 0])
138 square(center=true, [ psu_board_clamp_ovlp*2, psu_clamp_w ]);
140 circle(r = psu_board_nutbox[0]/2);
143 translate([0,0,-1]) linear_extrude(height=psu_th_for_clamp+1) {
144 translate([ -psu_board_nutbox[0]/2 + psu_clamp_gap, 0 ])
146 translate([0,-20]) square(40);
151 module PsuLedWindowsPlan(){
153 PsuLedWindowsPlanCore();
158 module PsuMountDemo(ceil = 2.5) { ////toplevel
159 translate([0, psu_y, psu_z]) {
166 color("yellow") translate([0,0, -psu_z - ceil])
167 linear_extrude(height=0.4, convexity=10)
172 module PsuMountTest(ceil = 2.5) { ////toplevel
175 translate([0, psu_y, psu_z])
178 linextr_x_yz(-(psu_sz[0]/2 + 5),
181 rectfromto([-ceil, -ceil], [psu_sz[1] + 5, psu_z + 10]);
182 rectfromto([0,0], 400*[1,1]);
185 translate([0, psu_y, psu_z]) {
190 translate([0, psu_y, psu_z]) {