forked from nicklockwood/ShapeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTrain.shape
More file actions
183 lines (174 loc) · 3.38 KB
/
Train.shape
File metadata and controls
183 lines (174 loc) · 3.38 KB
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
// ShapeScript document
detail 32
// colors
define darkBlue 0.1 0.5 1
define lightBlue 0.5 0.8 1
define black 0.2
define red 1 0 0
define gray 0.8
define wheel {
union {
color darkBlue
cylinder { size 0.6 0.05 }
color lightBlue
cylinder { size 0.56 0.1 }
translate 0 0.05 0
difference {
cylinder { size 0.4 0.05 }
cylinder { size 0.36 0.05 }
}
cylinder { size 0.2 0.1 }
define steps 5
for 1 to steps {
cube { size 0.03 0.025 0.37 }
rotate 0 1 / steps
}
}
}
// wheels
for 1 to 3 {
translate 0 0 0.7
group {
rotate 0.5 rnd
translate 0 0.5 0
wheel
translate 0 -0.5 0
cylinder { size 0.1 1 }
rotate 1
translate 0 0.5 0
wheel
}
}
// base
union {
rotate 0 0.5 0
translate -1.7 -0.06
color black
extrude {
size 1 1 0.7
path {
point 0.1
point 1.8
point 2.1 0.15
point 2.1 0.4
point -0.05 0.4
point -0.05 0.15
point 0.1
}
}
color red
extrude {
path {
point 1.95 0.5
point -0.1 0.5
point -0.1 0.2
point 0 0.2
point 0 0.4
point 1.92 0.4
point 2.05 0.34
point 2.05 0.2
point 2.15 0.2
point 2.15 0.4
point 1.95 0.5
}
}
}
// face
lathe {
color gray
position 0 0.8 0.3
orientation 0 0 0.5
path {
point 0 0
point 0.3 0
curve 0.3 -0.1
point 0 -0.1
}
}
// chimney
union {
color black
position 0 0.6 0.1
cube { size 0.7 0.4 0.4 }
cylinder {
position 0 0.2 0
orientation 0 0 0.5
size 0.7 0.4
}
lathe {
position 0 0.48
path {
point 0 0
point -0.2 0
curve -0.1 0.05
point -0.1 0.11
point -0.1 0.35
point -0.125 0.35
point -0.125 0.4
point -0.1 0.4
point -0.1 0.45
point -0.07 0.45
point 0 0.2
point 0 0
}
}
}
// body
union {
color lightBlue
position 0 0.8 -0.5
orientation 0 0 0.5
cylinder { size 0.7 0.8 }
translate 0 0.425 -0.085
difference {
cube { size 0.9 1.65 0.55 }
translate 0 0.6125 0
cube { size 0.8 0.325 0.6 }
}
translate 0 0.15 0.05
// cab
rotate 0 0 -0.5
extrude {
size 1 1 0.6
path {
point -0.45
point 0.45
point 0.45 0.5
curve 0 0.65
point -0.45 0.5
point -0.45
}
}
// roof
extrude {
color black
size 1 1 0.5
path {
point -0.35
point 0.35
point 0.35 0.55
curve 0 0.65
point -0.35 0.55
point -0.35
}
}
}
// coal
union {
color black
position 0 0.73 -1.54
orientation 0 0 0.5
cube { size 0.8 0.325 0.4 }
translate 0.45 -0.1 0.2
for 1 to 3 {
for 1 to 8 {
translate -0.1
cube {
size 0.1
// apply a random rotation
orientation rnd rnd rnd
}
}
translate 0.8 0.1 0
}
}