# Student Post: Conversion of Graph to Solid Complete

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.

Xiang

# Student Post: First Steps Toward 3D Printing Meshes Generated By Sphere Packing

A major goal of my Sphere Packing research is to actualize the mathematics and computer models into novel techniques for the mesh generation portion of the 3D printing process. To this end, we need a way to complete the full process starting from an STL model of a 3D object and ending with a 3D printed object. With the current software, we have already established a way to generate the meshes; however, we do not yet have a way to print the meshes. As partially mentioned in the previous post, we came up with two possible approaches for printing the meshes. The first method that we will try involves the conversion of a mesh into a solid using OpenSCAD.

A simple illustration of this idea is shown below:

Having the solid, we could then use traditional slicer software to generate the G-code for printing the object.

Also, we can use OpenSCAD’s shape union and intersection functionalities to combine the shell of the original object with the internal infill mesh to create a print object that would have the shape of the original object but with a semi-hollow internal support structure consisting of the mesh from sphere packing.

The general idea is produce a lightweight solid with a strong internal structure that can withstand great stress. An analogy to a natural structure with this quality would be bird bones which are necessarily lightweight for flight yet they can withstand the constant pressures from flight motions.

The specific implementation of this procedure is in progress, so stay tuned. ~

-Xiang

# Student Post: New Lattice Structure and Other Ideas Going Forward

Since the last time I posted, I have added the ability to generate a different lattice structure to the Sphere Packing software. This new lattice structure is called the hexagonal close packed (hcp) lattice. It is one of the tightest ways to pack equally sized spheres, with the other way being the face-centered cubic (fcc) lattice which only differs in the way that consecutive layers are aligned.

In the above image, a bird’s-eye view of hcp packing (left) and fcc packing (right) is shown. The underlying hexagonal arrangement of white spheres representing layer 1 resembles the tightest way of packing equally sized circles in a plane also known as a penny-packing. Every layer of the hcp and fcc lattices has this identical hexagonal arrangement. The black spheres representing layer 2 are placed over the gaps created between three underlying spheres. Note that layer 2 and layer 3 are not fully drawn out so that the lower layers are not obscured completely. Also note that layer 2 is identical for both hcp and fcc lattices. The difference is from layer 3 which lines up with layer 1 in the hcp lattice, but is shifted in the fcc lattice.

Anyways, back to the main point. Hexagonal close-packed lattices are now available to use in the sphere packing software. Earlier there was only body centered cubic lattices:

Now here are the hcp lattices:

With this new type of lattice we hope to gain insights into how a different set of combinatorics affects sphere packing.

Moving forward, I would like to 3D print the meshes generated by the sphere packing. The difficulty lies in the fact that the meshes are not solids, so traditional 3D slicer programs can not work with the mesh output directly. Thus, one approach would be to convert the mesh into a solid. As it has been suggested to me, this could possibly be done using OpenSCAD. Another approach would be to skip the slicer step completely and directly generate gcode from the mesh using a toolpath planning algorithm. I will first try the method of converting the mesh into a solid since it seems easier than developing a new algorithm for toolpath planning in 3D space. I will keep you posted on the results.