From cb766858b70b0b0eb7a6239f1ab068c21ef89520 Mon Sep 17 00:00:00 2001 From: osa Date: Tue, 30 Mar 2021 15:49:57 +0300 Subject: [PATCH] 0032269: Visualization - update trinfo command with -lods option --- src/MeshTest/MeshTest.cxx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/MeshTest/MeshTest.cxx b/src/MeshTest/MeshTest.cxx index 230d5c0b22..8eb30cc973 100644 --- a/src/MeshTest/MeshTest.cxx +++ b/src/MeshTest/MeshTest.cxx @@ -734,19 +734,30 @@ static Standard_Integer trianglesinfo (Draw_Interpretor& theDI, Standard_Integer aDynTypeCounter = &aStats->TypeMap.ChangeFromIndex (aNewIndex); } (*aDynTypeCounter)++; - aStats->NbTriangles += aLOD->NbTriangles(); if (aLOD->HasDeferredData()) { aStats->NbDeferredFaces++; - if (!aLOD->HasGeometry()) + if (aLOD->HasGeometry()) + { + aStats->NbTriangles += aLOD->NbTriangles(); + } + else { aStats->NbUnloadedFaces++; + aStats->NbTriangles += aLOD->NbDeferredTriangles(); aStats->NbUnloadedTriangles += aLOD->NbDeferredTriangles(); } } - else if (!aLOD->HasGeometry()) + else { - aStats->NbEmptyFaces++; + if (aLOD->HasGeometry()) + { + aStats->NbTriangles += aLOD->NbTriangles(); + } + else + { + aStats->NbEmptyFaces++; + } } } }