The Lattice Generator is a simple MatLab program that automatically generates various lattice geometries direct to STL format. These periodic structures are intended for use with the metallic additive manufacturing technologies of Selective Laser Melting (SLM) or Electron Beam Melting (EBM), however could be applied to a number of other additive technologies that require the input of an STL file.
Developed out the apparent need for a fast and simple way to generate STL lattice structures for research purposes, the program is a part of a preliminary work in developing a much larger lattice generation capability. In its current state, the program includes the following uniform lattice types:
- Body Centred Cubic (BCC)
- Face Centred Cubic (FCC)
- Modified FCC variants removing x-y, y-z, and x-z planes
- Combined BCC and FCC cell
- Modified combined BCC and FCC removing x-y plane
- Simple cube (box cell)
In theory, any lattice cell configuration could be added to the program provided that it can occupy a cubic volume and is able to be tessellated.
In addition, it was observed that creating Finite Element (FE) meshes was incredibly time consuming via traditional techniques. In response, the lattice generator script has the added functionality of generating FE meshes automatically in NASTRAN format. Other formats are possible, however for the purposes of the development project NASTRAN was all that was needed. In its current form, the lattice FE mesh is a 3D beam element mesh with the properties of the STL lattice applied. Loads or constraints are not generated, and the material properties are only set as a place holder. These aspects need to be modified in a pre-processor (HyperMesh, Patran etc.).
Marten (2022). STL Lattice Generator (https://www.mathworks.com/matlabcentral/fileexchange/48373-stl-lattice-generator), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!