diff --git a/apps/tridecimator/CMakeLists.txt b/apps/tridecimator/CMakeLists.txt new file mode 100644 index 00000000..fa817a76 --- /dev/null +++ b/apps/tridecimator/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_BUILD_TYPE Release) +set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required... +set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11 +project (tridecimator) +add_executable(tridecimator tridecimator.cpp ../../wrap/ply/plylib.cpp) +include_directories(../../) +include_directories(../../eigenlib) diff --git a/apps/tridecimator/history.txt b/apps/tridecimator/history.txt deleted file mode 100644 index 5c1495aa..00000000 --- a/apps/tridecimator/history.txt +++ /dev/null @@ -1,28 +0,0 @@ - - VCGLib http://vcg.sf.net o o - Visual and Computer Graphics Library o o - _ O _ - Copyright(C) 2005-2006 \/)\/ - Visual Computing Lab http://vcg.isti.cnr.it /\/| - ISTI - Italian National Research Council | - \ - Metro 4.04 25/01/2005 - All rights reserved. - - - -2005/04/04 Release 4.05 -Added saving of Error Histogram - -2005/01/26 Release 4.04 -Gcc compiling issues -Moved to the library core the code for computing min distance froma a point to a mesh using a uniform grid. -Slightly faster. - -2005/01/03 Release 4.03 -Better ply compatibility, and improved error reporting - -2004/11/29 Release 4.02 -removed bug in printing Hausdorf distance, -removed bug in command line parsing, -upgraded import mesh library to support off format diff --git a/apps/tridecimator/readme.md b/apps/tridecimator/readme.md index 900b948d..cffc814f 100644 --- a/apps/tridecimator/readme.md +++ b/apps/tridecimator/readme.md @@ -1,13 +1,8 @@ - VCGLib http://www.vcglib.net o o - Visual and Computer Graphics Library o o - _ O _ - Copyright(C) 2005-2006 \/)\/ - Visual Computing Lab http://vcg.isti.cnr.it /\/| - ISTI - Italian National Research Council | - \ - TriDecimator 1.00 2/10/2005 - All rights reserved. + VCGLib http://www.vcglib.net + Copyright(C) 2005-2006 + Visual Computing Lab http://vcg.isti.cnr.it + ISTI - Italian National Research Council @@ -24,28 +19,32 @@ for more details. --- Synopsis --- -tridecimator fileIn fileOut face_num [opt]\ -Where opt can be:\ - -e# QuadricError threshold (range [0,inf) default inf) - -b# Boundary Weight (default .5) - -q# Quality threshold (range [0.0, 0.866], default .3 ) - -n# Normal threshold (degree range [0,180] default 90) - -E# Minimal admitted quadric value (default 1e-15, must be >0) - -Q[y|n] Use or not Quality Threshold (default yes) - -N[y|n] Use or not Normal Threshold (default no) - -A[y|n] Use or not Area Weighted Quadrics (default yes) - -O[y|n] Use or not vertex optimal placement (default yes) - -S[y|n] Use or not Scale Independent quadric measure(default yes) - -B[y|n] Preserve or not mesh boundary (default no) - -T[y|n] Preserve or not Topology (default no) - -H[y|n] Use or not Safe Heap Update (default no) - -P Before simplification, remove duplicate & unreferenced vertices +`tridecimator fileIn fileOut face_num [opt]` + +Tridecimator is a commandline mesh simplifier based on a variant of the quadric error edge collapse strategy. +It supports `PLY, OFF, OBJ` format for input and output and require a target number of faces. +The following options are supported: + +-e# QuadricError threshold (range [0,inf) default inf) +-b# Boundary Weight (default .5) +-p# Quality quadric Weight (default .5) +-q# Quality threshold (range [0.0, 0.866], default .3 ) +-n# Normal threshold (degree range [0,180] default 90) +-w# Quality weight factor (10) +-E# Minimal admitted quadric value (default 1e-15, must be >0) +-Q[y|n] Use or not Face Quality Threshold (default yes) +-H[y|n] Use or not HardQualityCheck (default no) +-N[y|n] Use or not Face Normal Threshold (default no) +-P[y|n] Add or not QualityQuadric (default no) +-A[y|n] Use or not Area Checking (default no) +-O[y|n] Use or not vertex optimal placement (default yes) +-S[y|n] Use or not Scale Independent quadric measure(default yes) +-B[y|n] Preserve or not mesh boundary (default no) +-T[y|n] Preserve or not Topology (default no) +-W[y|n] Use or not per vertex Quality to weight the quadric error (default no) +-C Before simplification, remove duplicate & unreferenced vertices -Supported formats: PLY, OFF, STL - --- Some technical notes -- - This simplification tool employ a quadric error based edge collapse iterative approach. Each possible collapse is scored taking into account - its quadric error @@ -57,7 +56,7 @@ The simplification can ends when the desired number of triangles has been reache The 'Safe Heap Update' change the set of edges re-inserted in the heap after a collapse resulting in a vertex v; this option put back in the -heap not only incident in the vbut all the edges of the triangles incident +heap not only incident in the v, but all the edges of the triangles incident in v. It slows down a lot. The 'Scale Independent quadric' is useful when you want simplify