3D mesh simplification application
Implementation of Surface Simplification Using Quadric Error Metrics, SIGGRAPH 97, written in C++, inspired by fogleman's simplify.
Iteratively simplifying a complex model by 50%
Faces after each iteration
37986 | 18993 | 9496 |
4747 | 2373 | 1186 |
Output for the simplification above:
D:\Dev\git\Simplifier>D:/Dev/git/Simplifier/build/release/simplifier mode=iterative iterations=5 in=d:\Downloads\39-stl\stl\Dragon.stl
Loading "d:\\Downloads\\39-stl\\stl\\Dragon.stl"
Input mesh contains 37986 faces
Simplifying...
Iteration 1 | 18993 faces | duration: 341 ms
Iteration 2 | 9496 faces | duration: 149 ms
Iteration 3 | 4747 faces | duration: 63 ms
Iteration 4 | 2373 faces | duration: 31 ms
Iteration 5 | 1186 faces | duration: 13 ms
-
Clone the repository:
git clone <repository-url> cd Simplifier
-
Create a build directory:
mkdir build cd build
-
Run CMake to configure the project:
cmake ..
-
Build the project:
cmake --build .
Simplifier.exe factor=0.1 in=input.stl out=output.stl
Simplifier.exe in=D:\Downloads\Dragon.stl mode=iterative iterations=5
in
: input file pathout
: output file path [optional, default=input_simplified.stl]factor
: 0.01-0.99 [optional, default=0.5]mode
: simple|iterative [optional, default=simple]iterations
: number of iterations [optional, default=1] (only for iterative mode)