From 213fe182d527f59d6b2a519e95d3e58ad38527b9 Mon Sep 17 00:00:00 2001 From: cnr-isti-vclab Date: Wed, 16 Nov 2005 16:45:51 +0000 Subject: [PATCH] Minor changes --- apps/trimeshinfo/trimeshinfo.cpp | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/apps/trimeshinfo/trimeshinfo.cpp b/apps/trimeshinfo/trimeshinfo.cpp index 3a811af6..d95017d4 100644 --- a/apps/trimeshinfo/trimeshinfo.cpp +++ b/apps/trimeshinfo/trimeshinfo.cpp @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.11 2005/11/16 15:59:46 cignoni +Changed name of the component from to + Revision 1.10 2005/11/14 09:21:07 cignoni Heavily restructured the code of Trimeshinfo. Now divided the collecting part from the reporting one (xml and ascii) @@ -81,7 +84,7 @@ Added Standard comments #include using namespace std; -#include + #include #include @@ -153,6 +156,12 @@ struct MeshInfo bool SelfIntersect; }; +void initMeshInfo(MeshInfo &mi) +{ + mi.vn = mi.fn = mi.count_e = mi.boundary_e = mi.count_fd = mi.count_uv = mi.numholes = mi.BEdges = + mi.numcomponents = mi.Genus = mi.dv = 0; + mi.Volume = 0.; +} void PrintAsciiInfo(MeshInfo &mi) { printf("\t Mesh info:\n"); @@ -240,6 +249,7 @@ int main(int argc,char ** argv) string SaveName; MeshInfo mi; + initMeshInfo(mi); printf("-------------------------------\n" " TriMeshInfo V.1.2 \n" " http://vcg.isti.cnr.it\n" @@ -273,8 +283,18 @@ int main(int argc,char ** argv) OpenMesh(mi.FileName.c_str(),m); mi.vn=m.vn; mi.fn=m.fn; + + + // DEGENERATED FACES + mi.count_fd = tri::Clean::DegeneratedFaces(m); + + + vcg::tri::UpdateTopology::FaceFace(m); + // UNREFERENCED VERTEX + mi.count_uv = tri::Clean::DetectUnreferencedVertex(m); + // IS MANIFOLD tri::Clean::Initialize(m); mi.Manifold = tri::Clean::IsComplexManifold(m); @@ -282,11 +302,7 @@ int main(int argc,char ** argv) // COUNT EDGES tri::Clean::CountEdges(m, mi.count_e, mi.boundary_e); - // DEGENERATED FACES - mi.count_fd = tri::Clean::DegeneratedFaces(m); - // UNREFERENCED VERTEX - mi.count_uv = tri::Clean::DetectUnreferencedVertex(m); // HOLES COUNT if(mi.Manifold)