5 psu_sz = [ 21.7, 36.0 ] + [ 0.25, 0.25 ];
8 psu_th_for_clamp = 1.50;
10 psu_hole_pos = [ 2.05, // from back edge of psu_sz[0]
11 0.55 * 0.5 * 25.4, // from centreline
13 psu_hole_dia = 2.5 - 0.3;
14 psu_baffle_gap = 1.0 + 0.5;
15 psu_baffle_cnr_y = 7.45; // from connector end
16 psu_baffle_th = [ 0.8, 3.5 ];
17 psu_connector_z = 2.9 + 0.1;
18 psu_connector_z_overlap = 0.15;
19 psu_connector_depth = 6.25;
20 psu_connector_w = 8.0 + 0.5;
22 psu_usbend_led_x = 4.5;
23 psu_innerend_led_depth = 10;
25 psu_clamp_th = 4.0 + 0.75;
29 psu_board_clamp_ovlp = 4.5;
30 psu_board_support_wall = 2;
31 psu_board_nutbox = nutbox_data_M3;
33 // ----- calculated -----
35 psu_usbend_led_depth = psu_baffle_cnr_y*2 - psu_usbend_led_x;
37 psu_z = NutBox_h_base(psu_board_nutbox);
38 psu_z_down = psu_z + 0.1;
41 module PsuBoardRepresentation(){
42 linear_extrude(height= psu_th)
43 square(center=true, [psu_sz[0],psu_sz[1]]);
46 module PsuRepresentation(){
47 PsuBoardRepresentation();
48 translate([0, -psu_sz[1]/2, -psu_connector_z])
49 linear_extrude(height= psu_connector_z + psu_connector_z_overlap)
50 rectfromto([ -psu_connector_w/2, -10 ],
51 [ +psu_connector_w/2, psu_connector_depth ]);
54 module AtPsuMountCorner(mx,my){
57 translate(-0.5 * [psu_sz[0], psu_sz[1], 0]
58 -1 * [0,0, psu_z_down])
62 module PsuMountCornerExtrude(mx,my, plus_z=board_support_z){
63 AtPsuMountCorner(mx,my){
64 linear_extrude(height= psu_z_down + plus_z, convexity=10) {
70 module PsuLedBafflePlan(){
71 baffle_tr = [0, psu_baffle_cnr_y]
72 + 0.5 * [psu_baffle_th[1], psu_baffle_th[0]];
73 translate([0, -psu_sz[1]/2]) {
75 rectfromto([-psu_baffle_th[1]/2, 0],
77 rectfromto([-psu_sz[0]/2 - psu_board_support_wall *2,
78 baffle_tr[1] - psu_baffle_th[0]],
84 module PsuLedWindowsPlan(){
87 AtPsuMountCorner(1,0) {
88 rectfromto([ -(psu_board_support_wall + 0.1),
91 +psu_usbend_led_depth ]);
93 AtPsuMountCorner(0,0) {
94 sz = psu_baffle_cnr_y - psu_board_support_wall - psu_baffle_th[0];
95 translate([0, psu_baffle_cnr_y])
96 rectfromto([ -(psu_board_support_wall + 0.1),
101 AtPsuMountCorner(0,1){
103 [psu_sz[0]/2 - psu_hole_pos[1] - psu_hole_dia/2,
104 psu_innerend_led_depth]);
108 translate([0, -psu_sz[1]/2])
109 square(center=true, [psu_baffle_th[1], psu_sz[1]]);;
113 module PsuMountPositiveMain(){
116 PsuMountCornerExtrude(mx,my){
117 rectfromto(-[1,1]*psu_board_support_wall,
118 +[1,1]*board_support_ovlp);
121 // mount above at plug end
122 PsuMountCornerExtrude(mx,0, psu_th + psu_board_support_wall){
123 rectfromto(-[1,1]*psu_board_support_wall,
125 board_support_ovlp_ceil]);
128 translate([0,0, -psu_z_down])
129 linear_extrude(psu_z_down - psu_baffle_gap, convexity=10)
133 module PsuMountNegative(){
134 axis = [0, -psu_sz[1]/2, psu_th];
137 rotate([atan(2 * board_support_z / psu_sz[1]),
140 PsuBoardRepresentation();
143 module PsuMountPositive(){
145 PsuMountPositiveMain();
149 PsuBoardRepresentation();
150 translate([0,0,5]) PsuBoardRepresentation();
152 translate([-20,0,-20]) cube(40);
156 PsuMountCornerExtrude(mx,1){
157 translate([psu_sz[0]/2 - psu_hole_pos[1],
159 + board_gap * [1,1] )
160 circle(r= psu_hole_dia/2);
163 translate([0, psu_sz[1]/2 + psu_board_nutbox[0]/2, 0])
165 NutBox(psu_board_nutbox, psu_z_down);
168 module PsuClamp(){ ////toplevel
169 rotate([180,0,0]) difference(){
170 linear_extrude(height=psu_clamp_th + psu_th_for_clamp, convexity=5) {
173 circle(r = fix_sz/2);
174 translate([ -psu_board_nutbox[0]/2, 0])
175 square(center=true, [ psu_board_clamp_ovlp*2, psu_clamp_w ]);
177 circle(r = psu_board_nutbox[0]/2);
180 translate([0,0,-1]) linear_extrude(height=psu_th_for_clamp+1) {
181 translate([ -psu_board_nutbox[0]/2 + psu_clamp_gap, 0 ])
183 translate([0,-20]) square(40);
188 module PsuMountDemo(ceil = 2.5) { ////toplevel
189 translate([0, psu_y, psu_z]) {
192 color("yellow") translate([0,0, -psu_z - ceil])
193 linear_extrude(height=0.4, convexity=10)