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 psu_usba_v_apart = 7.0;
40 psu_usba_v_from_edge = 4.86;
41 psu_usba_v_space_below = 1.5;
42 psu_usba_v_space_w = 1.7;
43 psu_usba_v_space_l = 3.0;
45 // ----- calculated -----
47 psu_z = NutBox_h_base(psu_board_nutbox);
48 psu_z_down = psu_z + 0.1;
49 psu_fix_sz = NutBox_outer_size(psu_board_nutbox);
50 psu_board_nutbox_y = psu_sz[1]/2 + psu_board_nutbox[0]/2;
52 module PsuBoardRepresentation(){
53 linear_extrude(height= psu_th)
54 square(center=true, [psu_sz[0],psu_sz[1]]);
57 module PsuRepresentation(){
58 PsuBoardRepresentation();
59 translate([0, -psu_sz[1]/2, -psu_connector_z])
60 linear_extrude(height= psu_connector_z + psu_connector_z_overlap)
61 rectfromto([ -psu_connector_w/2, -10 ],
62 [ +psu_connector_w/2, psu_connector_depth ]);
65 module AtPsuMountCorner(mx,my){
68 translate(-0.5 * [psu_sz[0], psu_sz[1], 0]
69 -1 * [0,0, psu_z_down])
73 module PsuMountCornerExtrude(mx,my, plus_z=psu_board_support_z){
74 AtPsuMountCorner(mx,my){
75 linear_extrude(height= psu_z_down + plus_z, convexity=10) {
81 module PsuUsbAVSpacePlan(){
82 for (x= [-1,+1] * psu_usba_v_apart/2) {
83 translate([x, -psu_usba_v_from_edge ]) {
85 for (y= [-1,+1] * (psu_usba_v_space_l - psu_usba_v_space_w)) {
87 circle(r= psu_usba_v_space_w);
94 module PsuMountPositiveMain(){
97 PsuMountCornerExtrude(mx,my){
98 rectfromto(-[1,1]*psu_board_support_wall,
99 +[1,1]*psu_board_support_ovlp);
102 // mount above at plug end
103 PsuMountCornerExtrude(mx,0, psu_th + psu_board_support_wall){
104 rectfromto(-[1,1]*psu_board_support_wall,
105 [psu_board_support_ovlp,
106 psu_board_support_ovlp_ceil]);
109 translate([0,0, -psu_z_down])
110 linear_extrude(psu_z_down - psu_baffle_gap, convexity=10)
114 module PsuMountNegative(){
115 axis = [0, -psu_sz[1]/2, psu_th];
118 rotate([atan(2 * psu_board_support_z / psu_sz[1]),
121 PsuBoardRepresentation();
124 module PsuMountPositive(){
127 PsuMountPositiveMain();
128 linextr_y_xz(-psu_y, psu_sz[1]*2) square(100, center=true);
133 PsuBoardRepresentation();
134 translate([0,0,5]) PsuBoardRepresentation();
136 translate([-20,0,-20]) cube(40);
140 PsuMountCornerExtrude(mx,1){
141 translate([psu_sz[0]/2 - psu_hole_pos[1],
143 + psu_board_gap * [1,1] )
144 circle(r= psu_hole_dia/2);
148 translate([0, psu_board_nutbox_y, 0])
150 NutBox(psu_board_nutbox, psu_z_down);
151 translate([0, psu_sz[1]/2, 0])
152 linextr(-psu_usba_v_space_below, +10)
157 module PsuClamp(){ ////toplevel
158 rotate([180,0,0]) difference(){
159 linear_extrude(height=psu_clamp_th + psu_th_for_clamp, convexity=5) {
162 circle(r = psu_fix_sz/2);
163 translate([ -psu_board_nutbox[0]/2, 0])
164 square(center=true, [ psu_board_clamp_ovlp*2, psu_clamp_w ]);
166 circle(r = psu_board_nutbox[0]/2);
169 translate([0,0,-1]) linear_extrude(height=psu_th_for_clamp+1) {
170 translate([ -psu_board_nutbox[0]/2 + psu_clamp_gap, 0 ])
172 translate([0,-20]) square(40);
181 module PsuLedWindowsPlan(){
183 PsuLedWindowsPlanCore();
188 module PsuMountDemo(ceil = 2.5) { ////toplevel
189 translate([0, psu_y, psu_z]) {
196 color("yellow") translate([0,0, -psu_z - ceil])
197 linear_extrude(height=0.4, convexity=10)
200 translate([0, psu_board_nutbox_y, 10])
207 module PsuMountTest(ceil = 2.5) { ////toplevel
212 translate([0, psu_y, psu_z])
215 linextr_x_yz(-(psu_sz[0]/2 + 5),
218 rectfromto([-ceil, -ceil], [psu_sz[1] + 10, psu_z + 10]);
219 rectfromto([0,0], 400*[1,1]);
222 translate([0, psu_y, psu_z]) {
227 translate([0, psu_y, psu_z]) {