Scaffolder
Generate scaffold from STL file with implicit function (such as TPMS, Schwarz P/ Gyroid).
Install / Use
/learn @nodtem66/ScaffolderREADME
Scaffolder

Transform a 3D model from STL/PLY/OFF/OBJ to a porous model with implicit function (e.g., Schwarz P/ Gyroid).
| Documentation | Command line options | Python API | Example: TPMS with Python | | --- | ---- | ---- | ---- |
Binary installation
- Download from Github Releases page
- Binary bundle consists of
- Main program:
Scaffolder - Pore analysis program:
Scaffold.SliceTest - Python library:
PyScaffold*.pyd
- Main program:
[!note]
- If you need only python library, you can install it from
pip(see below)- From v1.5.3, I decided to end the support for binary executables as no one uses it. Only python library will be released.
Python supports
pip install PyScaffolder
[!note] v1.5.3 support only Windows and Linux and Python 3.8 - 3.13
Binary building
To build the binary executables, make sure you have installed the following softwares:
- Visual Studio >=2022 (Windows)
- GCC and Cmake (linux)
sudo apt install cmake sudo apt install build-essential checkinstall zlib1g-dev libssl-dev -y - XCode (MacOS)
Steps
- Download or clone the source code from github
- Change current directory to the source code folder
- Create
buildfolder using CMAKE
cmake -E make_directory ./build
cd ./build
- Configure Cmake variables
# Linux
cmake .. -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=11
# Window
cmake .. -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=11
# MacOS
cmake .. -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=11
- Start Building
cmake --build . --config Release
Blender addon (prototype)
- Install the
Scaffolder-blender.zipdownloaded from Release - The plugin will appear at
View > SidebarorPress N
Screenshots
- Blender plugin with PyScaffolder

- The figure of patterns implemented in this program

- The examples of generated porous scaffold

Dependencies
- libigl - The computational geometry library
- vcglib - The mesh utility library
- sol2 - Lua script integration
- tbb - Threading library
How it works
- Read STL file and find the boundary box of STL mesh
- Generate the grid and calculate the winding number with STL mesh
- Use winding number to determine the condition for implicit isosurface function
- Generate the isosurface field in the grid
- Perform Dual marching cube to construct the manifold
- Clean up the duplicated vertices or faces, and abandon the group of connected faces having the diameter below the setting
- Export to the target 3D format
FAQ
How can I find the dataset from the paper?
The raw dataset is available at Mendeley Data. The program that used to generate that data was released at Github repository. You can also find the interactive visualization at Google Colab
Where are the implicit functions defined in the C++ source code?
https://github.com/nodtem66/Scaffolder/blob/master/include/implicit_function.h
Can you suggest alternative softwares like this program?
- Cesogen (There you can find a curated list of the other software)
- TPMS2STEP
- LattGen
- Rhino (Grasshopper) (Commerical software)
- nTopology (Commerical software)
- Hyperganic (Commerical software)
References
- Minimal surface Blog
- Dual marching cube - dualmc
- Command line parser - cxxopts
- Progress bar - ProgressBar
Citation
Computational method and program for generating a porous scaffold based on implicit surfaces
@article{IAMSAMANG2021106088,
title = {Computational method and program for generating a porous scaffold based on implicit surfaces},
journal = {Computer Methods and Programs in Biomedicine},
volume = {205},
pages = {106088},
year = {2021},
issn = {0169-2607},
doi = {https://doi.org/10.1016/j.cmpb.2021.106088},
url = {https://www.sciencedirect.com/science/article/pii/S0169260721001632},
author = {Jirawat Iamsamang and Phornphop Naiyanetr},
keywords = {Triply periodic minimal surface (TPMS), Implicit surface, Porous scaffold, Pore size, Porosity}
}
