summaryrefslogtreecommitdiff
path: root/mech/pcb_case/common.scad
blob: 0f79e16619c14600d7853d175a7645b78db76d4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
nut_h = 3;
nut_d = 4.15;
nut_r = nut_d / 2;
bolt_d = 3;
bolt_r = bolt_d / 2;

module rounded_cube(dim, radius) {
	range_y = [radius, dim[1]-radius];
	range_z = [radius, dim[2]-radius];
	height = dim[0];

	hull() {
		for (y=range_y, z=range_z) {
			translate([0,y,z]) rotate([0,90,0]) cylinder(r=radius, h=height);
		}
	}
}