forked from KitWallace/openscad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
liddedHeartBox.scad
41 lines (35 loc) · 1.1 KB
/
liddedHeartBox.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
41
module heart_shape(size) {
union() {
square(size,size);
translate([size/2,size,0]) circle(size/2);
translate([size,size/2,0]) circle(size/2);
}
}
module heart(size,thickness,height) {
linear_extrude(height=height)
minkowski() {
heart_shape(size);
circle(thickness+0.1);
}
}
module heart_box(size,height,thickness,clearance) {
difference() {
heart(size,thickness + clearance,height);
translate([0,0,thickness]) heart(size,clearance,height);
}
}
module heart_lid(size,thickness,depth,clearance) {
union() {
heart(size,thickness+clearance,thickness);
translate([0,0,thickness]) heart(size,0, depth);
}
}
module heart_thing(size,height,thickness,depth,clearance) {
union() {
heart_box(size,height,thickness,clearance);
// rotate([0,0,180]) translate ([10,10,0]) // to place alongside for printing
rotate([180,0,90]) translate ([0,0,- 2 * height ]) // to fit over box to check
heart_lid(size,thickness,depth,clearance);
}
}
heart_thing(20,12,3,4,0.5);