3d/Matekiste_PSU_Bracket.scad
2018-01-14 21:54:43 +01:00

50 lines
1.3 KiB
OpenSCAD

HEIGHT=5;
TOLERANCE=0.5;
BEARING=6;
BEARING_SPACING=179;
PSU_WIDTH=82;
PSU_HEIGHT=41;
PSU_Y_SPACING=-PSU_HEIGHT+BEARING*2+10;
POWER_PLUG_WIDTH=24;
POWER_PLUG_HEIGHT=31;
POWER_PLUG_X_SPACING=2;
POWER_PLUG_Y_SPACING=2;
FAN_DIAMETER=37;
FAN_X_SPACING=4;
FAN_Y_SPACING=2;
$fn=36;
__PSU_LEFT_POS=(BEARING*2 + BEARING_SPACING)/2 - PSU_WIDTH/2;
linear_extrude(height=HEIGHT) {
// bearing connector
difference() {
square([BEARING*2 + BEARING_SPACING, BEARING*2]);
// bearing
translate([BEARING, BEARING])
circle(d=BEARING+TOLERANCE);
translate([BEARING + BEARING_SPACING, BEARING])
circle(d=BEARING+TOLERANCE);
// cutout for psu
translate([__PSU_LEFT_POS, 0])
square([PSU_WIDTH, BEARING*2]);
}
//psu outline box
translate([__PSU_LEFT_POS, PSU_Y_SPACING])
difference() {
square([PSU_WIDTH, PSU_HEIGHT]);
// power plug cutout
translate([POWER_PLUG_X_SPACING-TOLERANCE/2, POWER_PLUG_Y_SPACING-TOLERANCE/2])
square([POWER_PLUG_WIDTH+TOLERANCE, POWER_PLUG_HEIGHT+TOLERANCE]);
// fan cutout
translate([PSU_WIDTH-FAN_DIAMETER/2-FAN_X_SPACING-TOLERANCE/2, FAN_Y_SPACING+FAN_DIAMETER/2-TOLERANCE/2])
circle(d=FAN_DIAMETER+TOLERANCE);
}
}