This past week I have read over the official OpenSCAD documentation and achieved a limited but sufficient understanding of the OpenSCAD scripting language.
To the Sphere Packing software, I have added a new file output for the graph edges as well as a file output for the mesh triangles.
Unfortunately, since it doesn’t seem like OpenSCAD has a direct way of pulling input from general files aside from standard 3D object files such as STL, OFF, and AMF, I have to manually copy and paste the file outputs from Sphere Packing into an OpenSCAD file. On the bright side, I have made the file outputs to be vectors of points that are already in scad format so copying and pasting is all that really needs to be done. I have written a simple scad script file that takes the graph data and mesh data and generates corresponding solids.
Here is a picture of an example solid for a graph from Sphere Packing:
The solid above took several minutes to render since the level of detail is relatively high. Next, I constructed a hollow shell from the triangles of the original mesh to fuse with the internal graph structure as a cover. The results are demonstrated below:
These solids are all union-ed together to create one solid which is then exported as an STL file. The object can be sliced with any 3D slicer program and then printed using existing 3D printers.
Hopefully, I’ll get to print a physical model this week.
Thanks for reading,