Skip to content

Commit e252082

Browse files
committed
fix: use solids
1 parent 570ace1 commit e252082

File tree

1 file changed

+112
-92
lines changed

1 file changed

+112
-92
lines changed

src/models/thingyDodecahedron.ts

Lines changed: 112 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -47,98 +47,6 @@ const thingy = () =>
4747

4848
const brace = () =>
4949
union(
50-
hullChain(
51-
translate(
52-
[54 / 2, 54 / 2, radius],
53-
sphere({
54-
radius: 3,
55-
segments: 12,
56-
}),
57-
),
58-
translate(
59-
[radius - 6, 0, 6],
60-
sphere({
61-
radius: 3,
62-
segments: 12,
63-
}),
64-
),
65-
translate(
66-
[54 / 2, -54 / 2, radius],
67-
sphere({
68-
radius: 3,
69-
segments: 12,
70-
}),
71-
),
72-
rotateZ(
73-
degToRad(-segmentAngle),
74-
translate(
75-
[radius - 6, 0, 6],
76-
sphere({
77-
radius: 3,
78-
segments: 12,
79-
}),
80-
),
81-
),
82-
translate(
83-
[-54 / 2, -54 / 2, radius],
84-
sphere({
85-
radius: 3,
86-
segments: 12,
87-
}),
88-
),
89-
rotateZ(
90-
degToRad(-segmentAngle * 2),
91-
translate(
92-
[radius - 6, 0, 6],
93-
sphere({
94-
radius: 3,
95-
segments: 12,
96-
}),
97-
),
98-
),
99-
translate(
100-
[-54 / 2, 0, radius],
101-
sphere({
102-
radius: 3,
103-
segments: 12,
104-
}),
105-
),
106-
rotateZ(
107-
degToRad(-segmentAngle * 3),
108-
translate(
109-
[radius - 6, 0, 6],
110-
sphere({
111-
radius: 3,
112-
segments: 12,
113-
}),
114-
),
115-
),
116-
translate(
117-
[-54 / 2, 54 / 2, radius],
118-
sphere({
119-
radius: 3,
120-
segments: 12,
121-
}),
122-
),
123-
rotateZ(
124-
degToRad(-segmentAngle * 4),
125-
translate(
126-
[radius - 6, 0, 6],
127-
sphere({
128-
radius: 3,
129-
segments: 12,
130-
}),
131-
),
132-
),
133-
translate(
134-
[54 / 2, 54 / 2, radius],
135-
sphere({
136-
radius: 3,
137-
segments: 12,
138-
}),
139-
),
140-
),
141-
// Corners
14250
translate(
14351
[54 / 2, 54 / 2, radius],
14452
sphere({
@@ -170,6 +78,7 @@ const brace = () =>
17078
}),
17179
),
17280
),
81+
17382
translate(
17483
[-54 / 2, -54 / 2, radius],
17584
sphere({
@@ -228,6 +137,117 @@ const brace = () =>
228137
segments: 12,
229138
}),
230139
),
140+
// Beams
141+
rotateX(
142+
degToRad(45),
143+
cuboid({
144+
size: [5, 5, radius + 12],
145+
center: [innerRadius, 3, 6 + radius / 2],
146+
}),
147+
),
148+
rotateX(
149+
degToRad(-45),
150+
cuboid({
151+
size: [5, 5, radius + 12],
152+
center: [innerRadius, -3, 6 + radius / 2],
153+
}),
154+
),
155+
translate(
156+
[-innerRadius + 2, -innerRadius / 2 - 8, radius / 2 + 4],
157+
rotateZ(
158+
degToRad(-25),
159+
rotateX(
160+
degToRad(30),
161+
cuboid({
162+
size: [5, 5, radius],
163+
}),
164+
),
165+
),
166+
),
167+
translate(
168+
[-innerRadius + 2, -7, radius / 2 + 4],
169+
rotateZ(
170+
degToRad(25),
171+
rotateX(
172+
degToRad(-30),
173+
cuboid({
174+
size: [5, 5, radius],
175+
}),
176+
),
177+
),
178+
),
179+
translate(
180+
[-innerRadius + 2, innerRadius / 2 + 8, radius / 2 + 4],
181+
rotateZ(
182+
degToRad(25),
183+
rotateX(
184+
degToRad(-30),
185+
cuboid({
186+
size: [5, 5, radius],
187+
}),
188+
),
189+
),
190+
),
191+
translate(
192+
[-innerRadius + 2, 7, radius / 2 + 4],
193+
rotateZ(
194+
degToRad(-25),
195+
rotateX(
196+
degToRad(30),
197+
cuboid({
198+
size: [5, 5, radius],
199+
}),
200+
),
201+
),
202+
),
203+
translate(
204+
[radius / 2, radius - 6, radius / 2 + 4],
205+
rotateZ(
206+
degToRad(10),
207+
rotateY(
208+
degToRad(40),
209+
cuboid({
210+
size: [5, 5, radius],
211+
}),
212+
),
213+
),
214+
),
215+
translate(
216+
[radius / 2, -radius + 6, radius / 2 + 4],
217+
rotateZ(
218+
degToRad(-10),
219+
rotateY(
220+
degToRad(40),
221+
cuboid({
222+
size: [5, 5, radius],
223+
}),
224+
),
225+
),
226+
),
227+
translate(
228+
[-radius / 2 + 10, radius - 6, radius / 2],
229+
rotateZ(
230+
degToRad(-5),
231+
rotateY(
232+
degToRad(-50),
233+
cuboid({
234+
size: [5, 5, radius * 1.4],
235+
}),
236+
),
237+
),
238+
),
239+
translate(
240+
[-radius / 2 + 10, -radius + 6, radius / 2],
241+
rotateZ(
242+
degToRad(5),
243+
rotateY(
244+
degToRad(-50),
245+
cuboid({
246+
size: [5, 5, radius * 1.4],
247+
}),
248+
),
249+
),
250+
),
231251
)
232252

233253
const hexagon = () =>

0 commit comments

Comments
 (0)