From 1feb0d1c60319110dc9364aa65f95e41e1e31487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B6ber?= Date: Fri, 29 Jun 2018 15:47:41 +0200 Subject: [PATCH] Change order of PP steps to triangulate before searching for degenerates --- code/PostStepRegistry.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/PostStepRegistry.cpp b/code/PostStepRegistry.cpp index 2a5e211c1..6c25b9361 100644 --- a/code/PostStepRegistry.cpp +++ b/code/PostStepRegistry.cpp @@ -164,9 +164,6 @@ void GetPostProcessingStepInstanceList(std::vector< BaseProcess* >& out) #if (!defined ASSIMP_BUILD_NO_OPTIMIZEGRAPH_PROCESS) out.push_back( new OptimizeGraphProcess()); #endif -#if (!defined ASSIMP_BUILD_NO_FINDDEGENERATES_PROCESS) - out.push_back( new FindDegeneratesProcess()); -#endif #ifndef ASSIMP_BUILD_NO_GENUVCOORDS_PROCESS out.push_back( new ComputeUVMappingProcess()); #endif @@ -179,6 +176,12 @@ void GetPostProcessingStepInstanceList(std::vector< BaseProcess* >& out) #if (!defined ASSIMP_BUILD_NO_TRIANGULATE_PROCESS) out.push_back( new TriangulateProcess()); #endif +#if (!defined ASSIMP_BUILD_NO_FINDDEGENERATES_PROCESS) + //find degenerates should run after triangulation (to sort out small + //generated triangles) but before sort by p types (in case there are lines + //and points generated and inserted into a mesh) + out.push_back( new FindDegeneratesProcess()); +#endif #if (!defined ASSIMP_BUILD_NO_SORTBYPTYPE_PROCESS) out.push_back( new SortByPTypeProcess()); #endif