6 psu_th_for_clamp = 1.50;
8 psu_hole_dia = 2.5 - 0.3;
9 psu_connector_z = 2.9 + 0.1;
10 psu_connector_z_overlap = 0.15;
11 psu_connector_depth = 6.25;
12 psu_connector_w = 8.0 + 0.5;
15 psu_clamp_th = 4.0 + 0.75;
19 psu_board_clamp_ovlp = 4.5;
20 psu_board_support_wall = 2;
21 psu_board_nutbox = nutbox_data_M3;
23 psu_y = +psu_sz[1]/2 + psu_usb_protr;
25 // ----- calculated -----
27 psu_z = NutBox_h_base(psu_board_nutbox);
28 psu_z_down = psu_z + 0.1;
30 module PsuBoardRepresentation(){
31 linear_extrude(height= psu_th)
32 square(center=true, [psu_sz[0],psu_sz[1]]);
35 module PsuRepresentation(){
36 PsuBoardRepresentation();
37 translate([0, -psu_sz[1]/2, -psu_connector_z])
38 linear_extrude(height= psu_connector_z + psu_connector_z_overlap)
39 rectfromto([ -psu_connector_w/2, -10 ],
40 [ +psu_connector_w/2, psu_connector_depth ]);
43 module AtPsuMountCorner(mx,my){
46 translate(-0.5 * [psu_sz[0], psu_sz[1], 0]
47 -1 * [0,0, psu_z_down])
51 module PsuMountCornerExtrude(mx,my, plus_z=board_support_z){
52 AtPsuMountCorner(mx,my){
53 linear_extrude(height= psu_z_down + plus_z, convexity=10) {
59 module PsuMountPositiveMain(){
62 PsuMountCornerExtrude(mx,my){
63 rectfromto(-[1,1]*psu_board_support_wall,
64 +[1,1]*board_support_ovlp);
67 // mount above at plug end
68 PsuMountCornerExtrude(mx,0, psu_th + psu_board_support_wall){
69 rectfromto(-[1,1]*psu_board_support_wall,
71 board_support_ovlp_ceil]);
74 translate([0,0, -psu_z_down])
75 linear_extrude(psu_z_down - psu_baffle_gap, convexity=10)
79 module PsuMountNegative(){
80 axis = [0, -psu_sz[1]/2, psu_th];
83 rotate([atan(2 * board_support_z / psu_sz[1]),
86 PsuBoardRepresentation();
89 module PsuMountPositive(){
92 PsuMountPositiveMain();
93 linextr_y_xz(-psu_y, psu_sz[1]*2) square(100, center=true);
98 PsuBoardRepresentation();
99 translate([0,0,5]) PsuBoardRepresentation();
101 translate([-20,0,-20]) cube(40);
105 PsuMountCornerExtrude(mx,1){
106 translate([psu_sz[0]/2 - psu_hole_pos[1],
108 + board_gap * [1,1] )
109 circle(r= psu_hole_dia/2);
112 translate([0, psu_sz[1]/2 + psu_board_nutbox[0]/2, 0])
114 NutBox(psu_board_nutbox, psu_z_down);
117 module PsuClamp(){ ////toplevel
118 rotate([180,0,0]) difference(){
119 linear_extrude(height=psu_clamp_th + psu_th_for_clamp, convexity=5) {
122 circle(r = fix_sz/2);
123 translate([ -psu_board_nutbox[0]/2, 0])
124 square(center=true, [ psu_board_clamp_ovlp*2, psu_clamp_w ]);
126 circle(r = psu_board_nutbox[0]/2);
129 translate([0,0,-1]) linear_extrude(height=psu_th_for_clamp+1) {
130 translate([ -psu_board_nutbox[0]/2 + psu_clamp_gap, 0 ])
132 translate([0,-20]) square(40);
137 module PsuLedWindowsPlan(){
139 PsuLedWindowsPlanCore();
144 module PsuMountDemo(ceil = 2.5) { ////toplevel
145 translate([0, psu_y, psu_z]) {
148 color("yellow") translate([0,0, -psu_z - ceil])
149 linear_extrude(height=0.4, convexity=10)