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;
43 psu_fix_sz = NutBox_outer_size(psu_board_nutbox);
44 psu_board_nutbox_y = psu_sz[1]/2 + psu_board_nutbox[0]/2;
46 module PsuBoardRepresentation(){
47 linear_extrude(height= psu_th)
48 square(center=true, [psu_sz[0],psu_sz[1]]);
51 module PsuRepresentation(){
52 PsuBoardRepresentation();
53 translate([0, -psu_sz[1]/2, -psu_connector_z])
54 linear_extrude(height= psu_connector_z + psu_connector_z_overlap)
55 rectfromto([ -psu_connector_w/2, -10 ],
56 [ +psu_connector_w/2, psu_connector_depth ]);
59 module AtPsuMountCorner(mx,my){
62 translate(-0.5 * [psu_sz[0], psu_sz[1], 0]
63 -1 * [0,0, psu_z_down])
67 module PsuMountCornerExtrude(mx,my, plus_z=psu_board_support_z){
68 AtPsuMountCorner(mx,my){
69 linear_extrude(height= psu_z_down + plus_z, convexity=10) {
75 module PsuMountPositiveMain(){
78 PsuMountCornerExtrude(mx,my){
79 rectfromto(-[1,1]*psu_board_support_wall,
80 +[1,1]*psu_board_support_ovlp);
83 // mount above at plug end
84 PsuMountCornerExtrude(mx,0, psu_th + psu_board_support_wall){
85 rectfromto(-[1,1]*psu_board_support_wall,
86 [psu_board_support_ovlp,
87 psu_board_support_ovlp_ceil]);
90 translate([0,0, -psu_z_down])
91 linear_extrude(psu_z_down - psu_baffle_gap, convexity=10)
95 module PsuMountNegative(){
96 axis = [0, -psu_sz[1]/2, psu_th];
99 rotate([atan(2 * psu_board_support_z / psu_sz[1]),
102 PsuBoardRepresentation();
105 module PsuMountPositive(){
108 PsuMountPositiveMain();
109 linextr_y_xz(-psu_y, psu_sz[1]*2) square(100, center=true);
114 PsuBoardRepresentation();
115 translate([0,0,5]) PsuBoardRepresentation();
117 translate([-20,0,-20]) cube(40);
121 PsuMountCornerExtrude(mx,1){
122 translate([psu_sz[0]/2 - psu_hole_pos[1],
124 + psu_board_gap * [1,1] )
125 circle(r= psu_hole_dia/2);
128 translate([0, psu_board_nutbox_y, 0])
130 NutBox(psu_board_nutbox, psu_z_down);
133 module PsuClamp(){ ////toplevel
134 rotate([180,0,0]) difference(){
135 linear_extrude(height=psu_clamp_th + psu_th_for_clamp, convexity=5) {
138 circle(r = psu_fix_sz/2);
139 translate([ -psu_board_nutbox[0]/2, 0])
140 square(center=true, [ psu_board_clamp_ovlp*2, psu_clamp_w ]);
142 circle(r = psu_board_nutbox[0]/2);
145 translate([0,0,-1]) linear_extrude(height=psu_th_for_clamp+1) {
146 translate([ -psu_board_nutbox[0]/2 + psu_clamp_gap, 0 ])
148 translate([0,-20]) square(40);
153 module PsuLedWindowsPlan(){
155 PsuLedWindowsPlanCore();
160 module PsuMountDemo(ceil = 2.5) { ////toplevel
161 translate([0, psu_y, psu_z]) {
168 color("yellow") translate([0,0, -psu_z - ceil])
169 linear_extrude(height=0.4, convexity=10)
172 translate([0, psu_board_nutbox_y, 10])
179 module PsuMountTest(ceil = 2.5) { ////toplevel
184 translate([0, psu_y, psu_z])
187 linextr_x_yz(-(psu_sz[0]/2 + 5),
190 rectfromto([-ceil, -ceil], [psu_sz[1] + 10, psu_z + 10]);
191 rectfromto([0,0], 400*[1,1]);
194 translate([0, psu_y, psu_z]) {
199 translate([0, psu_y, psu_z]) {