Skip to content

PSLer/SGLDBench

Repository files navigation

SGLDBench

A Suite of Benchmarks for Stress-guided Lightweight Design

This repository is the associated software of the paper:

"SGLDBench: A Benchmark Suite for Stress-Guided Lightweight 3D Designs" in IEEE Transactions on Visualization and Computer Graphics, doi: 10.1109/TVCG.2025.3573774.
by Junpeng Wang, Simon Niedermayr, Christoph Neuhauser, Dennis R. Bukenberger, Jun Wu, and Rüdiger Westermann.

1. Overview

SGLDBench is developed based on MATLAB, but has extensions to call external modules implemented using Python or binary executables.

At the bottom of SGLDBench is an efficient geometric multigrid solver for high-resolution static Finite Element Analysis (FEA) simulations on Cartesian grids. This solver is implemented in MATLAB, the MEX functionality is used for higher efficiency.

Built upon this solver, six different lightweight design strategies are provided:

  • Method 1 --- Topology Optimization
  • Method 2 --- Porous Infill Optimizaiton
  • Method 3 --- Stress-aware Graded Voronoi Diagram
  • Method 4 --- Principal Stress Lines-guided Infill
  • Method 5 --- Stress-aligned Conforming Lattice
  • Method 6 --- Stress-aligned Volumetric Michell's Trusses

An easy-to-use WebGL-based render is provided to compare and analyze the generated different designs.

2. Dependencies

To run SGLDBench, a MATLAB release is needed at least, and its "Image Processing Toolbox" and "Parallel Computing Toolbox" need to be installed as well. Recommending versions R2022b and newer.

All MEX functions are already compiled on Windows and included in the repository. In case one needs to re-compile them for some reasons, a C/C++ compiler will be needed. To compile them, one can directly run the MATLAB script "./SGLDBench/src/MEXfuncs/Run2CompileMEXfiles.m", which works for both Window and Linux.

To run Method 3 (Stress-aware Graded Voronoi Diagram), Python needs to be installed. The README in directory ./SGLDBench/externalModules/GradedVoronoiDiagram instructs how to automatically install dependencies. In case the failed run on Windows, the tips below maybe taken as a reference • A multi-user Python 3.11 installation in C:/Program Files • The required Python packages (drbutil, numpy, scipy) installed via pip • The use of pyenv in MATLAB to set the correct Python path: pyenv("Version", "C:/Program Files/python.exe"); When using the version of Python installed via the package manager on Ubuntu, we found that MATLAB does not correctly set the path to the dependencies if they are installed via the system version of the Python package manager pip. Unfortunately, we have not been able to fix this issue so far in MATLAB.

Methods 1, 2, 4 can be seamlessly used on both Windows and Linux.

Methods 3, 5, 6 use pre-compiled Windows and Linux executables of TetGen (https://wias-berlin.de/software/index.jsp?id=TetGen&lang=1) to create the gateway tet-mesh for all of these three methods. Noete Method 5 only works with Windows.

For Method 6, the repository is not directly included in SGLDBench, but one can be either fetched by calling

git submodule update --init --recursive

... or manually downloaded from https://github.com/rarora7777/VolumetricTruss together with its dependency "gptoolbox" from https://github.com/alecjacobson/gptoolbox. In case a manual download is preferred, these repositories need to be put into the directory ./SGLDBench/externalModules/. SGLDBench takes the default folder names VolumetricTruss and gptoolbox and the suggested work directory to set the search path.

3. Usages

The entire process follows the pipeline of "Modeling -> Specifying Boundary Conditions -> Stress Analysis -> Structural Generation -> and Visual Analysis".

3.1 via GUI

One can launch the GUI of SGLDBench by running ./SGLDBench/SGLDBench_Main.m. The demo video shows some guidelines on how to use it.

3.2 via Script

In the directory ./SGLDBench/QuickAccess, we also provide the scripts to quickly access the targeted methods.

3.3 Guide videos

https://ieeexplore.ieee.org/document/11015568/media#media

4. Data

4.1 Input

SGLDBench primarily takes triangle surface meshes in ".obj" or ".ply" format as input to describe the design domain;

Besides, SGLDBench can also take the tailored FEM voxel model file (".TopVoxel") as input for Methods 1, 2, 4. This file includes information of voxel volume, boundary conditions, passive elements (optional), and the density value of each voxel (optional). Please refer to the demo dataset ./SGLDBench/data/Part_R256.TopVoxel for details.

Three common shapes (cuboid, L-shape, and cylinder) in structural design and optimization are integrated in SGLDBench for testing. For the cuboid domain, several built-in boundary conditions are also provided (through the GUI).

4.2 Output

All the (intermediate) output data is placed in the directory ./SGLDBench/out/. SGLDBench stores the design as volumetric data in the NIFTI format (".nii"). All the targeted results of these 6 methods are named DesignVolume.nii. The corresponding stress-to-stress alignment metric is named alignmentMetricVolume_byStress.nii.

One can also save the created voxel model (incl. voxel volume, boundary conditions, ...) as an ASCII file (".TopVoxel") for repeated use.

5. Reproducing Examples in the paper

To re-produce the examples in the paper, please follow the steps below Note To save the size of this repository, we only provide the triangular surface mesh and the boundary conditions of the involved examples in this paper, but one can definitely recover the complete datasets via the provided support routines.

Taking the bone example in Figure 1 as example

5.1 via Script

Going to ./SGLDBench/QuickAccess and directly run the provided scripts:

5.2 via GUI

Going to ./SGLDBench/QuickAccess and directly run the provided scripts:

  1. Open SGLDBench and import the “./data/Bone.ply” geometry;
  2. Set the “Target Voxel Resolution” be 512 and click “Voxelizing” to get the voxelized design domain;
  3. Use the provided functionalities to apply for an arbitrary boundary condition (fixing and loading). "This is just for enabling the subsequent buttons;"
  4. In MATLAB’s command window, run “global loadingCond_; loadingCond_ = load('./data/Bone_R512_loads.bc');” and “global fixingCond_; fixingCond_ = load('./data/Bone_R512_fixa.bc');” This is for replacing the arbitrary boundary condition with the target one, you can check it by clicking “Show Problem Description” in the dropdown menu of “Visualization”;
  5. Go to the “Simulation” panel and run the intended simulation tasks

6. Cite

If you use the code and data of SGLDBench, please cite it as

@ARTICLE{SGLDBench,
  author={Wang, Junpeng and Bukenberger, Dennis R. and Niedermayr, Simon and Neuhauser, Christoph and Wu, Jun and Westermann, R\"udiger},
  journal={IEEE Transactions on Visualization and Computer Graphics}, 
  title={SGLDBench: A Benchmark Suite for Stress-Guided Lightweight 3D Designs}, 
  year={2025},
  volume={},
  number={},
  pages={1-13},
  keywords={Stress;Lattices;Three-dimensional printing;Visualization;MATLAB;Finite element analysis;Layout;Benchmark testing;Solids;Boundary conditions;Topology optimization;lattice infill;lightweight design;simulation design},
  doi={10.1109/TVCG.2025.3573774}
}

About

A Suite of Benchmarks for Stress-guided Lightweight Design

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •