Add plane with cutouts for fans
This commit is contained in:
parent
d67673241e
commit
b8f8645f63
@ -1,4 +1,4 @@
|
||||
round_psu_cable_plane(300, 200, 5, 20, 20, 10, 40, 90, 90, 90);
|
||||
round_psu_cable_fan_plane(300, 200, 5, 20, 20, 10, 40, 90, 90, 90);
|
||||
RESOLUTION=36;
|
||||
|
||||
/*
|
||||
@ -84,6 +84,33 @@ module round_psu_cable_plane(width, height, hole_size, hole_spacing_x, hole_spac
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Base plane with cutouts for two fans in the center
|
||||
*/
|
||||
module round_fan_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y, radius) {
|
||||
difference() {
|
||||
round_base_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y, radius);
|
||||
|
||||
// lower fan
|
||||
translate([width/2-120/2, height/4-120/2])
|
||||
__fan_cutout(120, 105, 5);
|
||||
// upper fan
|
||||
translate([width/2-120/2, height*3/4-120/2])
|
||||
__fan_cutout(120, 105, 5);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Base plane with cutouts for psu, cables and fans
|
||||
*/
|
||||
module round_psu_cable_fan_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y, radius, psu_width, psu_height, cable_width, cable_height) {
|
||||
intersection() {
|
||||
round_psu_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y, radius, psu_width, psu_height);
|
||||
round_cable_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y, radius, cable_width, cable_height);
|
||||
round_fan_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y, radius);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper function for round edges
|
||||
*/
|
||||
@ -113,4 +140,44 @@ module __round_square(width, height, radius) {
|
||||
rotate([0, 0, 270])
|
||||
__radius_cutout(radius);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper function for fan cutout
|
||||
*/
|
||||
module __fan_cutout(outer_size, inner_size, bearing_size) {
|
||||
// Bearing
|
||||
translate([outer_size-(outer_size-inner_size)/2, outer_size-(outer_size-inner_size)/2])
|
||||
circle(d=bearing_size);
|
||||
translate([(outer_size-inner_size)/2, outer_size-(outer_size-inner_size)/2])
|
||||
circle(d=bearing_size);
|
||||
translate([outer_size-(outer_size-inner_size)/2, (outer_size-inner_size)/2])
|
||||
circle(d=bearing_size);
|
||||
translate([(outer_size-inner_size)/2, (outer_size-inner_size)/2])
|
||||
circle(d=bearing_size);
|
||||
echo(outer_size-(outer_size-inner_size)/2);
|
||||
echo((outer_size-inner_size)/2);
|
||||
|
||||
// middle squares
|
||||
translate([0, outer_size-inner_size, 0])
|
||||
__round_square(outer_size, inner_size-(outer_size-inner_size), 5);
|
||||
translate([outer_size-inner_size, 0, 0])
|
||||
__round_square(inner_size-(outer_size-inner_size), outer_size, 5);
|
||||
|
||||
// round edges between middle squares
|
||||
translate([outer_size-inner_size-2.5, outer_size-inner_size-2.5, 0])
|
||||
__radius_cutout(2.5);
|
||||
|
||||
translate([outer_size-(outer_size-inner_size)+2.5, outer_size-inner_size-2.5, 0])
|
||||
rotate([0, 0, 90])
|
||||
__radius_cutout(2.5);
|
||||
|
||||
translate([outer_size-(outer_size-inner_size)+2.5, outer_size-(outer_size-inner_size)+2.5, 0])
|
||||
rotate([0, 0, 180])
|
||||
__radius_cutout(2.5);
|
||||
|
||||
translate([outer_size-inner_size-2.5, outer_size-(outer_size-inner_size)+2.5, 0])
|
||||
rotate([0, 0, 270])
|
||||
__radius_cutout(2.5);
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user