From ad2ff9fd713e9bf7a21bf552bec4fdd6e5cee9db Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 9 Nov 2017 21:40:10 +0100 Subject: [PATCH] check for area test if the face is a triangle. --- code/FindDegenerates.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/code/FindDegenerates.cpp b/code/FindDegenerates.cpp index 5b321312a..83dce22ba 100644 --- a/code/FindDegenerates.cpp +++ b/code/FindDegenerates.cpp @@ -172,14 +172,16 @@ void FindDegeneratesProcess::ExecuteOnMesh( aiMesh* mesh) { } } } - ai_real area = calculateAreaOfTriangle( face, mesh ); - if ( area < 1e-6 ) { - if ( configRemoveDegenerates ) { - remove_me[ a ] = true; - goto evil_jump_outside; - } + if ( face.mNumIndices == 3 ) { + ai_real area = calculateAreaOfTriangle( face, mesh ); + if ( area < 1e-6 ) { + if ( configRemoveDegenerates ) { + remove_me[ a ] = true; + goto evil_jump_outside; + } - // todo: check for index which is corrupt. + // todo: check for index which is corrupt. + } } }