-
Notifications
You must be signed in to change notification settings - Fork 15
/
vent.scad
40 lines (33 loc) · 1.06 KB
/
vent.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Parametric Mini-ITX Case
// https://github.com/eclecticc/ParametricCase
//
// BSD 2-Clause License
// Copyright (c) 2018, Nirav Patel, http://eclecti.cc
//
// Parametric vent cutout modules
module vent_rectangular(size, pitch, wall) {
// Adjust the pitch to fit the total size
fixed_pitch = size[0]/floor(size[0]/pitch);
// Holes for ventilation
// TODO: Taper the holes to reduce turbulance
for (x = [-size[0]/2:fixed_pitch:size[0]/2-fixed_pitch]) {
for (y = [-size[1]/2:fixed_pitch:size[1]/2-fixed_pitch]) {
translate([x+wall/2, y+wall/2, -30]) cube([fixed_pitch-wall, fixed_pitch-wall, 60]);
}
}
}
module vent_circular(r, pitch, wall) {
$fn = 100;
intersection() {
vent_rectangular([r*2, r*2], pitch, wall);
cylinder(r = r, h = 30, center = true);
}
}
module vent_rounded_rect(r, size, pitch, wall) {
$fn = 100;
intersection() {
vent_rectangular(size, pitch, wall);
cylinder(r = r, h = 30, center = true);
}
}
//vent_rounded_rect(60, [100, 100], 10, 2);