5 psu_sz = psu_sz_nom + [ 0.11, 0.44 ] + [ 0.25, 0.25 ];
8 psu_th_for_clamp = 1.50;
10 psu_hole_dia = 2.5 - 0.3;
11 psu_connector_z = 2.9 + 0.1;
12 psu_connector_z_overlap = 0.15;
13 psu_connector_depth = 6.25;
14 psu_connector_w = 8.0 + 0.5;
17 psu_clamp_th = 4.0 + 0.75;
21 psu_board_clamp_ovlp = 4.5;
22 psu_board_support_wall = 2;
23 psu_board_nutbox = nutbox_data_M3;
25 psu_y = +psu_sz[1]/2 + psu_usb_protr;
27 // ----- calculated -----
29 psu_z = NutBox_h_base(psu_board_nutbox);
30 psu_z_down = psu_z + 0.1;
32 module PsuBoardRepresentation(){
33 linear_extrude(height= psu_th)
34 square(center=true, [psu_sz[0],psu_sz[1]]);
37 module PsuRepresentation(){
38 PsuBoardRepresentation();
39 translate([0, -psu_sz[1]/2, -psu_connector_z])
40 linear_extrude(height= psu_connector_z + psu_connector_z_overlap)
41 rectfromto([ -psu_connector_w/2, -10 ],
42 [ +psu_connector_w/2, psu_connector_depth ]);
45 module AtPsuMountCorner(mx,my){
48 translate(-0.5 * [psu_sz[0], psu_sz[1], 0]
49 -1 * [0,0, psu_z_down])
53 module PsuMountCornerExtrude(mx,my, plus_z=board_support_z){
54 AtPsuMountCorner(mx,my){
55 linear_extrude(height= psu_z_down + plus_z, convexity=10) {
61 module PsuMountPositiveMain(){
64 PsuMountCornerExtrude(mx,my){
65 rectfromto(-[1,1]*psu_board_support_wall,
66 +[1,1]*board_support_ovlp);
69 // mount above at plug end
70 PsuMountCornerExtrude(mx,0, psu_th + psu_board_support_wall){
71 rectfromto(-[1,1]*psu_board_support_wall,
73 board_support_ovlp_ceil]);
76 translate([0,0, -psu_z_down])
77 linear_extrude(psu_z_down - psu_baffle_gap, convexity=10)
81 module PsuMountNegative(){
82 axis = [0, -psu_sz[1]/2, psu_th];
85 rotate([atan(2 * board_support_z / psu_sz[1]),
88 PsuBoardRepresentation();
91 module PsuMountPositive(){
94 PsuMountPositiveMain();
95 linextr_y_xz(-psu_y, psu_sz[1]*2) square(100, center=true);
100 PsuBoardRepresentation();
101 translate([0,0,5]) PsuBoardRepresentation();
103 translate([-20,0,-20]) cube(40);
107 PsuMountCornerExtrude(mx,1){
108 translate([psu_sz[0]/2 - psu_hole_pos[1],
110 + board_gap * [1,1] )
111 circle(r= psu_hole_dia/2);
114 translate([0, psu_sz[1]/2 + psu_board_nutbox[0]/2, 0])
116 NutBox(psu_board_nutbox, psu_z_down);
119 module PsuClamp(){ ////toplevel
120 rotate([180,0,0]) difference(){
121 linear_extrude(height=psu_clamp_th + psu_th_for_clamp, convexity=5) {
124 circle(r = fix_sz/2);
125 translate([ -psu_board_nutbox[0]/2, 0])
126 square(center=true, [ psu_board_clamp_ovlp*2, psu_clamp_w ]);
128 circle(r = psu_board_nutbox[0]/2);
131 translate([0,0,-1]) linear_extrude(height=psu_th_for_clamp+1) {
132 translate([ -psu_board_nutbox[0]/2 + psu_clamp_gap, 0 ])
134 translate([0,-20]) square(40);
139 module PsuLedWindowsPlan(){
141 PsuLedWindowsPlanCore();
146 module PsuMountDemo(ceil = 2.5) { ////toplevel
147 translate([0, psu_y, psu_z]) {
150 color("yellow") translate([0,0, -psu_z - ceil])
151 linear_extrude(height=0.4, convexity=10)