From d938165038d0d9d3ddb0476a341f350ecd57d4e9 Mon Sep 17 00:00:00 2001 From: maxcorsini Date: Wed, 21 Dec 2005 14:11:59 +0000 Subject: [PATCH] Out the number of self intersection --- apps/trimeshinfo/trimeshinfo.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/apps/trimeshinfo/trimeshinfo.cpp b/apps/trimeshinfo/trimeshinfo.cpp index 066f6a2a..c6945912 100644 --- a/apps/trimeshinfo/trimeshinfo.cpp +++ b/apps/trimeshinfo/trimeshinfo.cpp @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.27 2005/12/21 13:26:58 corsini +Re-add save xml feature + Revision 1.26 2005/12/21 13:10:10 corsini Move duplicated vertices routine Modify genus computation call @@ -269,6 +272,7 @@ void PrintMeshInfo(MeshInfo &mi) printf(" Number of boundary edges: %i \n", mi.boundary_e); printf(" Number of degenerated faces: %d\n", mi.count_fd); printf(" Number of unreferenced vertices: %d\n",mi.count_uv); + printf(" Number of duplicated vertices found: %d\n", mi.dv); printf(" Number of holes/boundaries: %d \n", mi.numholes); if ((mi.Manifold)&&(mi.Oriented)&&(!mi.numholes)) @@ -318,8 +322,10 @@ void PrintMeshInfo(MeshInfo &mi) printf(" Mesh Type: IRREGULAR\n"); // Further details - printf(" Number of duplicated vertices found: %d\n", mi.dv); - printf(" Self Intersection: %s\n", mi.SelfIntersect?"Yes":"No"); + if (mi.SelfIntersect) + printf(" Self Intersection: %d\n", mi.intersections.size()); + else + printf(" Self Intersection: NONE.\n"); } void SaveXMLInfo(MeshInfo &mi) @@ -411,9 +417,9 @@ void SaveMeshInfoHtmlTable(fstream &fout, MeshInfo &mi) fout << " " << mi.dv << "" << std::endl; if (mi.SelfIntersect) - fout << " Yes" << std::endl; + fout << " " << mi.intersections.size() << "" << std::endl; else - fout << " No" << std::endl; + fout << " None" << std::endl; if (mi.Manifold) fout << " Yes" << std::endl; @@ -676,7 +682,6 @@ int main(int argc, char ** argv) // Save mesh information in XML format if(XmlFlag) - //printf(" This feature will be available soon.\n\n"); SaveXMLInfo(mi); // Save mesh information in HTML format