Clean and Scalable Medial Axis Simplification via Explicit Surface Correspondence
Pengfei Wang, Shuangmin Chen, Dongming Yan, Ying He, Shiqing Xin, Changhe Tu, and Wenping Wang
Structural MAT simplifies a medial axis initialized from a 3D Voronoi diagram of surface samples. During progressive simplification, it explicitly tracks the correspondence between medial-axis vertices and surface regions. This correspondence guides edge-collapse priorities and helps preserve structural alignment, boundary regularity, and triangle quality, even under aggressive simplification.
The current implementation is generally consistent with the method described in the paper, with minor differences in a few implementation details. The standard version of the code is still being organized and will replace this version in the near future.
- CMake 3.20 or newer
- A C++17 compiler
- CGAL
- Eigen3
- OpenMP
- OpenGL and a working desktop graphics environment
- Polyscope
- FCPW
- LBFGSpp
- portable-file-dialogs
- libigl
The repository already contains the project-specific surfaceVoronoi and spaceVoronoi sources under extern/. The other third-party dependencies should be placed together in a dependency directory with the following layout:
deps/
├── polyscope/
├── fcpw/
├── LBFGSpp/
├── portable-file-dialogs/
└── libigl/
└── include/igl/
Clone dependencies with their submodules where applicable. For example:
mkdir deps
git clone --recursive https://github.com/nmwsharp/polyscope.git deps/polyscope
git clone --recursive https://github.com/rohan-sawhney/fcpw.git deps/fcpw
git clone https://github.com/yixuan/LBFGSpp.git deps/LBFGSpp
git clone https://github.com/samhocevar/portable-file-dialogs.git deps/portable-file-dialogs
git clone https://github.com/libigl/libigl.git deps/libiglOn macOS with Homebrew, the system dependencies can be installed with:
brew install cmake cgal eigen libompOn Ubuntu/Debian, a typical system setup is:
sudo apt update
sudo apt install build-essential cmake libcgal-dev libeigen3-dev libomp-dev \
libgl1-mesa-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-devIf the third-party dependencies are placed directly under the repository's extern/ directory, configure and build with:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --target structural_mat -jIf they are stored elsewhere, pass the dependency directory explicitly:
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DSTRUCTURAL_MAT_DEPS_DIR=/absolute/path/to/deps \
-DLIBIGL_INCLUDE_DIR=/absolute/path/to/deps/libigl/include
cmake --build build --target structural_mat -jLIBIGL_INCLUDE_DIR must point to the directory that contains the igl/ folder. On macOS, CMake also searches the standard Homebrew locations for libomp.
The resulting executable is:
build/structural_mat
Launch the application and select a mesh from the UI:
./build/structural_matAlternatively, pass an input mesh on the command line:
./build/structural_mat path/to/model.objThe file dialog accepts common triangle-mesh formats including OBJ, PLY, OFF, and STL.
The processing stages depend on one another, so please use the controls in the following order:
- Load the input mesh. Click
Browse Model File..., unless a mesh was supplied on the command line. - Choose the input type. Decide whether the input is a CAD model. For CAD input, enable
CAD Input, adjust the feature-angle threshold if needed, and clickDetect Feature Linesbefore sampling. - Set the simplification weights. The current defaults are
Quality w1 = 0.000005andStability ratio w = 0.025. - Sample the surface. Set the number of samples, optionally enable
Blue Noise, and clickSampling. - Compute the surface Voronoi diagram. Click
2D Voronoi. - Initialize the medial axis. Click
3D Voronoi. - Initialize simplification. Click
Init Queueto construct the edge-collapse priority queue. - Set the simplification controls.
Step Sizeis the number of edge collapses performed before the displayed result is refreshed.Target Verticesis the desired final number of medial-axis vertices. - Start simplification. Click
Simplify. UseStopto pause, orSimplify One Edgeto inspect a single collapse. - Inspect or save the result. The current faces and edges are displayed as
Medial Axis (Ours)andMedial Axis Edges (Ours). ClickSave Model File...to export the current result as OBJ.
When simplifying to a very small target, the result may contain wire edges that are not incident to any triangle. These edges are displayed separately as a Polyscope curve network so that the complete simplified structure remains visible.
If you use this project in academic work, please cite:
@article{10.1145/3811291,
author = {Wang, Pengfei and Chen, Shuangmin and Yan, Dongming and He, Ying and Xin, Shiqing and Tu, Changhe and Wang, Wenping},
title = {Structural MAT: Clean and Scalable Medial Axis Simplification via Explicit Surface Correspondence},
year = {2026},
issue_date = {July 2026},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
volume = {45},
number = {4},
issn = {0730-0301},
url = {https://doi.org/10.1145/3811291},
doi = {10.1145/3811291},
journal = {ACM Trans. Graph.},
month = jul,
articleno = {164},
numpages = {19}
}For questions or discussions, please contact:
- Pengfei Wang — pengfei1998@foxmail.com
This work is supported by the National Key R&D Program of China (2022YFB3303200), the National Natural Science Foundation of China (62272277, U23A20312, 62072284, 62172415), the Natural Science Foundation of Shandong Province (ZR2020MF036), the Strategic Priority Research Program of the Chinese Academy of Sciences (XDB0640000 and XDB0640200), and the Beijing Natural Science Foundation (Z240002).