.. | ||
py | ||
blender-part-2.png | ||
info.json | ||
openscad-generate.py | ||
openscad-part-2.png | ||
part.1.scad | ||
part.2.scad | ||
README.md |
Day 22: Reactor Reboot
Today's solution is a little weird...
I solved part one using the easy, store every point method. However, for part two, I didn't want to go to the trouble of writing code to work out the intersections of all the cubes. Instead, I chose to do the following:
- Wrote some Python code (
openscad-generate.py
) to generate some OpenSCAD code based on the challenge input- This made liberal use of nested
union()
,difference()
,translate()
andcube()
functions
- This made liberal use of nested
- Ran this code in OpenSCAD and exported the resultant model as an STL
- Imported this STL file into Blender and used the 3D-Print Toolbox addon to calculate the total volume of the object
- Typed this number into the AoC website
- Obtained the 2nd star ★ :D