-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.scad
133 lines (110 loc) · 3.21 KB
/
main.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
use <Stencilia-A.ttf>
WIDTH=500;
HEIGHT=170;
DEPTH=150;
THICKNESS=2;
SCREEN_HEIGHT=126;
/* [Hidden] */
DISPLAY_BLOCKS=false;
include <back.scad>;
include <components.scad>;
include <connection.scad>;
include <front.scad>;
include <supports.scad>;
main();
module main() {
difference() {
union() {
front();
back();
}
rotate([-90, 0, 0])
translate([-WIDTH / 3 + 30, 20, HEIGHT - 1])
linear_extrude(THICKNESS)
text("Yellow Pitaya", DEPTH / 3, "Stencilia\\-A:style=Regular");
translate([-WIDTH / 3, HEIGHT - 40, -10])
rotate([0, -90, 0])
hinge();
translate([-WIDTH / 3, HEIGHT / 2 - 15, -10])
rotate([0, -90, 0])
hinge();
translate([-WIDTH / 3, 15, -10])
rotate([0, -90, 0])
hinge();
translate([2 * WIDTH / 3, HEIGHT - 40, 20])
rotate([0, 90, 0])
lock();
}
if (DISPLAY_BLOCKS) {
color("red") {
translate([-WIDTH / 3, HEIGHT - 40, -10])
rotate([0, -90, 0])
hinge();
translate([-WIDTH / 3, HEIGHT / 2 - 15, -10])
rotate([0, -90, 0])
hinge();
translate([-WIDTH / 3, 15, -10])
rotate([0, -90, 0])
hinge();
translate([2 * WIDTH / 3, HEIGHT - 40, 20])
rotate([0, 90, 0])
lock();
}
}
}
module part(width, height, depth) {
cube([width, height, THICKNESS]);
translate([width, 12, 0])
rotate([0, 90, -180])
screw_support();
translate([width - 8, height - 12, 0])
rotate([0, 90, 0])
screw_support();
translate([width - 8, 12, -depth])
rotate([0, -90, -180])
screw_support();
translate([width, height - 12, -depth])
rotate([0, -90, 0])
screw_support();
difference() {
rotate([0, 90, 0])
cube([depth, height, THICKNESS]);
for (y=[0:height / 4:height]) {
if (y != 0 && y != height) {
translate([0, y, -15])
rotate([0, -90, 0])
rotate([0, 0, 90])
screw();
translate([0, y, -15 - 36])
rotate([0, -90, 0])
rotate([0, 0, 90])
screw();
}
}
}
rotate([-90, 0, 0])
cube([width, depth, THICKNESS]);
translate([0, height - THICKNESS, 0])
rotate([-90, 0, 0])
cube([width, depth, THICKNESS]);
}
module middle_part(width, height, depth) {
difference() {
part(width, height, depth);
rotate([0,90,0])
translate([0, THICKNESS, 0])
cube([depth, height - THICKNESS * 2, THICKNESS]);
};
translate([8, 12, 0])
rotate([0, 90, -180])
screw_support();
translate([0, height - 12, 0])
rotate([0, 90, 0])
screw_support();
translate([0, 12, -depth])
rotate([0, -90, -180])
screw_support();
translate([8, height - 12, -depth])
rotate([0, -90, 0])
screw_support();
}