Added facility to add vents to PSU. Added vents to S_300_12.
This commit is contained in:
parent
95c4359421
commit
a5a640e273
|
@ -39,6 +39,7 @@ function psu_face_grill(type) = type[3]; //! Is this face a grill
|
|||
function psu_face_fan(type) = type[4]; //! Fan x,y position and type
|
||||
function psu_face_iec(type) = type[5]; //! IEC connector x,y, rotation and type
|
||||
function psu_face_switch(type) = type[6]; //! Rocker switch x,y, rotation and type
|
||||
function psu_face_vents(type) = type[7]; //! Vents array position x,y, rotation, size and corner radius
|
||||
|
||||
function psu_name(type) = type[1]; //! The part name
|
||||
function psu_length(type) = type[2]; //! Length
|
||||
|
@ -166,6 +167,7 @@ module psu(type) { //! Draw a power supply
|
|||
fan = psu_face_fan(f);
|
||||
iec = psu_face_iec(f);
|
||||
switch = psu_face_switch(f);
|
||||
vents = psu_face_vents(f);
|
||||
|
||||
multmatrix(psu_face_transform(type, i))
|
||||
translate([xo, 0, -t]) {
|
||||
|
@ -208,6 +210,14 @@ module psu(type) { //! Draw a power supply
|
|||
translate([switch.x, switch.y])
|
||||
rotate(switch.z)
|
||||
rocker_hole(switch[3], 0);
|
||||
if(vents)
|
||||
for(i = [0 : len(vents) - 1]) {
|
||||
// vent is of form: [ [pos.x, pos.y, angle], [size.x, size.y], corner radius ]
|
||||
vent = vents[i];
|
||||
translate([vent[0].x, vent[0].y])
|
||||
rotate(vent[0].z)
|
||||
rounded_square(vent[1], vent[2]-eps, center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -105,14 +105,23 @@ S_300_12 = [
|
|||
1.5,// thickness
|
||||
[],// cutouts
|
||||
false,// grill
|
||||
[],[],[]// fan, iec, rocker
|
||||
[],[],[],// fan, iec, rocker
|
||||
[// vents
|
||||
// [ [pos.x, pos.y, angle], [size.x, size.y], corner radius ]
|
||||
for(x = [0:21], y = [-1,1]) [ [-7*x+215/2-34, (115/2-5)*y, 0], [3, 25], 1.5 ]
|
||||
]
|
||||
],
|
||||
[// f_top, top
|
||||
[],// holes
|
||||
0.5,// thickness
|
||||
[],// coutouts
|
||||
false,// grill
|
||||
[215/2 - 47.5, 115/2 - 37.5, fan50x15]
|
||||
[215/2 - 47.5, 115/2 - 37.5, fan50x15],
|
||||
[],//iec
|
||||
[],//rocker
|
||||
[// vents
|
||||
for(x = [0:4], y = [-1,1]) [ [-7*x-215/2+48, 28*y, 0], [3, 25], 1.5 ]
|
||||
]
|
||||
],
|
||||
[// f_left, front (terminals) after rotation
|
||||
[],// holes
|
||||
|
@ -140,14 +149,24 @@ S_300_12 = [
|
|||
1.5,// thickness
|
||||
[],// cutouts
|
||||
false,// grill
|
||||
[],[],[],// fan, iec, rocker
|
||||
[// vents
|
||||
for(x = [0 : 21]) [ [-7*x+215/2-34, -25, 0], [3, 10], 1.5 ],
|
||||
for(x = [0 : 1]) [ [-7*x, -1, 0], [3, 25], 1.5 ],
|
||||
for(x = [0 : 2]) [ [-7*x-215/2+20, -1, 0], [3, 25], 1.5 ],
|
||||
]
|
||||
],
|
||||
[// f_back, left after rotation
|
||||
[// holes, offset from center
|
||||
[215/2 - 32.5, 15], [215/2 - 182.5, 15]
|
||||
[215/2 - 32.5 - 13/2, 15], [215/2 - 182.5 - 13/2, 15]
|
||||
],
|
||||
1.5,// thickness
|
||||
[],// cutouts
|
||||
false,// grill
|
||||
[],[],[],// fan, iec, rocker
|
||||
[// vents
|
||||
for(x = [0 : 21]) [ [-7*x+215/2-34-13/2, 25, 0], [3, 10], 1.5 ]
|
||||
]
|
||||
],
|
||||
],
|
||||
// accessories to add to BOM
|
||||
|
|
Loading…
Reference in New Issue