-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCardHolder.scad
113 lines (100 loc) · 2.13 KB
/
CardHolder.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
include <WriteSCAD/Write.scad>;
cardWidth = 63.4;
cardStack = 45;
cardHeight = 88.1;
boxWidth = cardWidth + 10;
boxDepth = cardStack + 10;
boxHeight = cardHeight + 21;
lidHeight = boxHeight * .2;
module cardPack() {
cube([cardWidth, cardStack, cardHeight]);
}
module cardHolder() {
cube([cardWidth + 10, cardStack + 10, cardHeight + 10]);
}
module box() {
difference() {
cardHolder();
translate([
-(cardWidth - boxWidth) / 2,
-(cardStack - boxDepth) / 2,
-(cardHeight - boxHeight + 20) / 2
])
cardPack();
}
}
module boxLid() {
intersection() {
cube([boxWidth, boxDepth, lidHeight]);
box();
}
}
grooveWidth = cardWidth + 5;
grooveDepth = cardStack + 5;
grooveHeight = 5;
module boxGroove(centerHole) {
difference() {
cube([grooveWidth, grooveDepth, grooveHeight]);
translate([
(grooveWidth - cardWidth) / 2,
(grooveDepth - cardStack) / 2,
-grooveHeight
]) scale([1 * centerHole, 1 * centerHole, 1 ]) cardPack();
}
}
module boxCut() {
difference() {
box();
translate([-5, -5, -.1]) cube([boxWidth + 10, boxDepth + 10, lidHeight + .1]);
}
}
module finalLid() {
difference() {
boxLid();
translate([
(boxWidth - grooveWidth) / 2,
(boxDepth - grooveDepth) / 2,
lidHeight - grooveHeight + 0.1
])
boxGroove(0.1);
}
}
module finalBox() {
union() {
boxCut();
translate([
(boxWidth - grooveWidth) / 2,
(boxDepth - grooveDepth) / 2,
lidHeight - grooveHeight
])
boxGroove();
}
}
module hunterBox() {
difference() {
finalBox();
union() {
translate([225, 13.5, 70])
rotate([90, 180, 0])
import("Magic/black.stl");
translate([boxWidth - 28 / 2, 2.5, 90])
rotate([270, 0, 180])
write("HUNTER", h = 10, t = 3, space = 1.3);
}
}
}
module kaitieBox() {
difference() {
finalBox();
union() {
translate([225, 13.5, 70])
rotate([90, 180, 0])
import("Magic/green.stl");
translate([boxWidth - 28 / 2, 2.5, 90])
rotate([270, 0, 180])
write("KAITIE", h = 10, t = 3, space = 1.3);
}
}
}
translate([0, 0, boxHeight - lidHeight / 2]) rotate([180, 0, 0]) kaitieBox();
//translate([-boxWidth * 1.5, 0 , 0]) finalLid();