6 psu_sz = psu_sz_nom + [ 0.11, 0.44 ] + [ 0.25, 0.25 ];
9 psu_th_for_clamp = 1.50;
11 psu_hole_dia = 2.5 - 0.3;
12 psu_connector_z = 2.9 + 0.1;
13 psu_connector_z_overlap = 0.15;
14 psu_connector_depth = 6.25;
15 psu_connector_w = 8.0 + 0.5;
18 psu_clamp_th = 4.0 + 0.75;
22 psu_board_clamp_ovlp = 4.5;
23 psu_board_nutbox = nutbox_data_M3;
26 psu_board_support_wall = 2;
27 psu_board_support_ovlp = 4.5;
28 psu_board_support_ovlp_ceil = 2;
29 psu_board_support_z = 2;
31 psu_baffle_gap = 1.0 + 0.5;
33 psu_y = +psu_sz[1]/2 + psu_usb_protr;
35 // ----- calculated -----
37 psu_z = NutBox_h_base(psu_board_nutbox);
38 psu_z_down = psu_z + 0.1;
40 module PsuBoardRepresentation(){
41 linear_extrude(height= psu_th)
42 square(center=true, [psu_sz[0],psu_sz[1]]);
45 module PsuRepresentation(){
46 PsuBoardRepresentation();
47 translate([0, -psu_sz[1]/2, -psu_connector_z])
48 linear_extrude(height= psu_connector_z + psu_connector_z_overlap)
49 rectfromto([ -psu_connector_w/2, -10 ],
50 [ +psu_connector_w/2, psu_connector_depth ]);
53 module AtPsuMountCorner(mx,my){
56 translate(-0.5 * [psu_sz[0], psu_sz[1], 0]
57 -1 * [0,0, psu_z_down])
61 module PsuMountCornerExtrude(mx,my, plus_z=psu_board_support_z){
62 AtPsuMountCorner(mx,my){
63 linear_extrude(height= psu_z_down + plus_z, convexity=10) {
69 module PsuMountPositiveMain(){
72 PsuMountCornerExtrude(mx,my){
73 rectfromto(-[1,1]*psu_board_support_wall,
74 +[1,1]*psu_board_support_ovlp);
77 // mount above at plug end
78 PsuMountCornerExtrude(mx,0, psu_th + psu_board_support_wall){
79 rectfromto(-[1,1]*psu_board_support_wall,
80 [psu_board_support_ovlp,
81 psu_board_support_ovlp_ceil]);
84 translate([0,0, -psu_z_down])
85 linear_extrude(psu_z_down - psu_baffle_gap, convexity=10)
89 module PsuMountNegative(){
90 axis = [0, -psu_sz[1]/2, psu_th];
93 rotate([atan(2 * psu_board_support_z / psu_sz[1]),
96 PsuBoardRepresentation();
99 module PsuMountPositive(){
102 PsuMountPositiveMain();
103 linextr_y_xz(-psu_y, psu_sz[1]*2) square(100, center=true);
108 PsuBoardRepresentation();
109 translate([0,0,5]) PsuBoardRepresentation();
111 translate([-20,0,-20]) cube(40);
115 PsuMountCornerExtrude(mx,1){
116 translate([psu_sz[0]/2 - psu_hole_pos[1],
118 + psu_board_gap * [1,1] )
119 circle(r= psu_hole_dia/2);
122 translate([0, psu_sz[1]/2 + psu_board_nutbox[0]/2, 0])
124 NutBox(psu_board_nutbox, psu_z_down);
127 module PsuClamp(){ ////toplevel
128 rotate([180,0,0]) difference(){
129 linear_extrude(height=psu_clamp_th + psu_th_for_clamp, convexity=5) {
132 circle(r = fix_sz/2);
133 translate([ -psu_board_nutbox[0]/2, 0])
134 square(center=true, [ psu_board_clamp_ovlp*2, psu_clamp_w ]);
136 circle(r = psu_board_nutbox[0]/2);
139 translate([0,0,-1]) linear_extrude(height=psu_th_for_clamp+1) {
140 translate([ -psu_board_nutbox[0]/2 + psu_clamp_gap, 0 ])
142 translate([0,-20]) square(40);
147 module PsuLedWindowsPlan(){
149 PsuLedWindowsPlanCore();
154 module PsuMountDemo(ceil = 2.5) { ////toplevel
155 translate([0, psu_y, psu_z]) {
158 color("yellow") translate([0,0, -psu_z - ceil])
159 linear_extrude(height=0.4, convexity=10)
164 module PsuMountTest(ceil = 2.5) { ////toplevel
167 translate([0, psu_y, psu_z])
169 linextr_x_yz(-(psu_sz[0]/2 + 5),
172 rectfromto([-ceil, -ceil], [psu_sz[1] + 5, psu_z + 10]);
173 rectfromto([0,0], 400*[1,1]);
177 translate([0, psu_y, psu_z])