diff --git a/apps/msvc/trimeshinfo/trimeshinfo.vcproj b/apps/msvc/trimeshinfo/trimeshinfo.vcproj index f4734e3f..63bfe542 100644 --- a/apps/msvc/trimeshinfo/trimeshinfo.vcproj +++ b/apps/msvc/trimeshinfo/trimeshinfo.vcproj @@ -115,16 +115,19 @@ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + RelativePath="..\..\..\wrap\ply\plylib.cpp"> + RelativePath="..\..\trimeshinfo\trimeshinfo.cpp"> + + diff --git a/apps/trimeshinfo/defs.h b/apps/trimeshinfo/defs.h index 1122dc4f..cb59ad23 100644 --- a/apps/trimeshinfo/defs.h +++ b/apps/trimeshinfo/defs.h @@ -1,48 +1,18 @@ -// ----------------------------------------------------------------------------------------------- #ifndef _DEFS_H #define _DEFS_H // ----------------------------------------------------------------------------------------------- -// command line parameters -#define CMD_LINE_ARG_HIST 'H' -#define CMD_LINE_ARG_VERTEX_SAMPLE 'V' -#define CMD_LINE_ARG_EDGE_SAMPLE 'E' -#define CMD_LINE_ARG_FACE_SAMPLE 'F' -#define CMD_LINE_ARG_SAMPLE_TYPE 'S' -#define CMD_LINE_ARG_MONTECARLO_SAMPLING 'M' -#define CMD_LINE_ARG_SUBDIVISION_SAMPLING 'S' -#define CMD_LINE_ARG_SIMILAR_TRIANGLES_SAMPLING 'T' -#define CMD_LINE_ARG_N_SAMPLES 'N' -#define CMD_LINE_ARG_SAMPLES_PER_AREA_UNIT 'A' -#define CMD_LINE_ARG_SAVE_DISPLACEMENT 'O' -#define CMD_LINE_ARG_SAVE_ERROR_AS_COLOUR 'C' - - // error messages -#define MSG_ERR_N_ARGS "\nUsage: "\ - "trimeshinfo filename \n" - +#define MSG_ERR_N_ARGS \ + "\nUsage: "\ + "trimeshinfo filename [opt]\n"\ + "where opt can be:\n"\ + " -x[y|n] Enable or not XML info dumping (default no)\n"\ + " -a[y|n] Enable or not ascii info dumping (default yes)\n"\ + " -o Save the input mesh in the specified format\n" + #define MSG_ERR_MESH_LOAD "error loading the input meshes.\n" #define MSG_ERR_INVALID_OPTION "unable to parse option '%s'\n" -#define MSG_ERR_FILE_OPEN "unable to open the output file.'n" -#define MSG_ERR_UNKNOWN_FORMAT "unknown file format '%s'.\n" -// global constants -#define NO_SAMPLES_PER_FACE 10 -#define N_SAMPLES_EDGE_TO_FACE_RATIO 0.1 -#define BBOX_FACTOR 0.1 -#define INFLATE_PERCENTAGE 0.02 -#define MIN_SIZE 125 /* 125 = 5^3 */ -#define N_HIST_BINS 256 -#define PRINT_EVERY_N_ELEMENTS 1000 -#define FILE_EXT_SMF "smf" -#define FILE_EXT_PLY "ply" - -// strings -#define STR_HIST_FILENAME_DEFAULT "hist.txt" -#define STR_NEW_MESH_FILENAME_DEFAULT "error.ply" -#define STR_NEW_MESH_FILENAME_DEFAULT_2 "error_colour.ply" - -// ----------------------------------------------------------------------------------------------- #endif // ----------------------------------------------------------------------------------------------- diff --git a/apps/trimeshinfo/trimeshinfo.cpp b/apps/trimeshinfo/trimeshinfo.cpp index d913f683..8c8a806b 100644 --- a/apps/trimeshinfo/trimeshinfo.cpp +++ b/apps/trimeshinfo/trimeshinfo.cpp @@ -1,29 +1,32 @@ /**************************************************************************** -* VCGLib o o * -* Visual and Computer Graphics Library o o * -* _ O _ * -* Copyright(C) 2004 \/)\/ * -* Visual Computing Lab /\/| * -* ISTI - Italian National Research Council | * -* \ * -* All rights reserved. * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * -* for more details. * -* * +* VCGLib o o * +* Visual and Computer Graphics Library o o * +* _ O _ * +* Copyright(C) 2005 \/)\/ * +* Visual Computing Lab /\/| * +* ISTI - Italian National Research Council | * +* \ * +* All rights reserved. * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * +* for more details. * +* * ****************************************************************************/ /**************************************************************************** History $Log: not supported by cvs2svn $ +Revision 1.9 2005/11/04 15:37:57 rita_borgo +Removed Debug option + Revision 1.8 2005/10/11 16:03:40 rita_borgo Moved all the main functions inside clean.h @@ -68,15 +71,12 @@ Self-intersection first release Revision 1.2 2005/01/03 16:13:09 rita_borgo Added Standard comments - - ****************************************************************************/ #include #include #include using namespace std; - #include #include #include @@ -89,27 +89,30 @@ using namespace std; #include #include -#include -#include -#include +#include + +#include +#include +#include +#include + #include "XMLTree.h" -#include -// loader -#include #include #include "defs.h" -#include "trimeshtype.h" -string ans; +//#include "trimeshtype.h" +using namespace std; using namespace vcg; -using namespace tri; -using namespace face; - - - +//using namespace tri; +//using namespace face; +class CFace; +class CEdge; +class CVertex : public VertexSimp2< CVertex, CEdge, CFace, vert::Coord3f, vert::Flag, vert::Normal3f >{}; +class CFace : public FaceSimp2< CVertex, CEdge, CFace, face::FFAdj, face::VertexRef, face::Flag > {}; +class CMesh : public vcg::tri::TriMesh< vector, vector > {}; typedef CMesh::VertexPointer VertexPointer; typedef CMesh::VertexIterator VertexIterator; @@ -128,425 +131,189 @@ void OpenMesh(const char *filename, CMesh &m) typedef CMesh::VertexPointer VertexPointer; typedef CMesh::VertexIterator VertexIterator; - - typedef CMesh::FaceContainer FaceContainer; - typedef CMesh::ScalarType ScalarType; +struct MeshInfo +{ + string FileName; + int vn,fn; + bool Manifold; + int count_e,boundary_e,count_fd,count_uv,numholes; + int BEdges; + float Volume; + int numcomponents,Genus; + bool Regular,Semiregular; + bool Orientable,Oriented; + int dv; + bool SelfIntersect; +}; +void PrintAsciiInfo(MeshInfo &mi) +{ + printf("\t Mesh info:\n"); + printf(" \t M: '%s'\n\t Number of vertices: %d \n", mi.FileName.c_str(), mi.vn); + printf("\t Number of faces: %d \n", mi.fn); -void main(int argc,char ** argv) + if (!mi.Manifold) printf( "\t Manifold: NO\n"); + else printf( "\t Manifold: YES\n"); + printf("\t Number of edges: %d \n", mi.count_e); + printf("\t Number of internal edges: %d \n", mi.count_e-mi.boundary_e); + printf("\t Number of boundary edges: %i \n", mi.boundary_e); + printf("\t Number of degenerated faces: %d\n", mi.count_fd); + printf("\t Number of unreferenced vertices: %d\n",mi.count_uv); + printf("\t Number of holes/boundaries: %d \n", mi.numholes); + if( mi.Volume) printf("\t Volume: %f \n", mi.Volume); + else printf("\t Volume: UNDEFINED, mesh is either non-manifold or has holes \n"); + printf("\t Number of connected components: %d\n", mi.numcomponents); + if (mi.Manifold) printf( "\t Genus: %d \n", mi.Genus); + else printf( "\t Genus (n/a)\n"); + + if (mi.Regular) printf("\t Type of Mesh: REGULAR\n"); + else if (mi.Semiregular) printf("\t Type of Mesh: SEMIREGULAR\n"); + else printf("\t Type of Mesh: IRREGULAR\n"); + + if (!mi.Manifold) { + printf( "\t Orientable Mesh: NO\n"); + printf( "\t Oriented Mesh: NO\n"); + } else { + printf( "\t Orientable Mesh: %s\n",mi.Orientable?"Yes":"No"); + printf( "\t Oriented Mesh: %s\n",mi.Oriented?"Yes":"No"); + } + + printf( "\t Number of duplicated vertices found: %d\n",mi.dv); + printf( "\t Self Intersection: %s\n",mi.SelfIntersect?"Yes":"No"); + +} + +void PrintXMLInfo(MeshInfo &mi) +{ + XMLTree doc; + doc.initializeMain(); + + char s[256]; + sprintf(s,"%d",mi.vn); doc.addNode(s, VALUE_INTEGER, "Number of Vertices"); + sprintf(s,"%d",mi.fn); doc.addNode(s, VALUE_INTEGER, "Number of Faces"); + + if(mi.Manifold) doc.addNode("No", VALUE_BOOL,"Manifold"); + else doc.addNode("Yes", VALUE_BOOL,"Manifold"); + + sprintf(s,"%d",mi.count_e); doc.addNode(s, VALUE_INTEGER,"Number of Edges"); + sprintf(s,"%d",mi.count_fd); doc.addNode(s, VALUE_INTEGER,"Number of Degenerated Faces"); + sprintf(s,"%d",mi.count_uv); doc.addNode(s, VALUE_INTEGER,"Number of unreferenced vertices"); + sprintf(s,"%d",mi.numholes); doc.addNode(s, VALUE_INTEGER,"Number of Holes"); + sprintf(s,"%d",mi.BEdges); doc.addNode(s, VALUE_INTEGER,"Number of Border Edges"); + sprintf(s,"%f",mi.Volume); doc.addNode(s, VALUE_FLOAT,"Volume"); + sprintf(s,"%d",mi.numcomponents); doc.addNode(s, VALUE_INTEGER,"Number of Connected Components"); + sprintf(s,"%d",mi.Genus); doc.addNode(s, VALUE_INTEGER,"Genus"); + + if (mi.Regular) doc.addNode("REGULAR", VALUE_STRING,"Type of Mesh"); + else if (mi.Semiregular) doc.addNode("SEMIREGULAR", VALUE_STRING,"Type of Mesh"); + else doc.addNode("IRREGULAR", VALUE_STRING,"Type of Mesh"); + + if (!mi.Manifold) { + doc.addNode("NO", VALUE_STRING,"Orientable Mesh"); + doc.addNode("NO", VALUE_STRING,"Oriented Mesh"); + } else { + doc.addNode(mi.Orientable?"Yes":"No", VALUE_STRING,"Orientable Mesh"); + doc.addNode( mi.Oriented?"Yes":"No", VALUE_STRING,"Oriented Mesh"); + } + sprintf(s,"%d",mi.dv); doc.addNode(s, VALUE_INTEGER,"Duplicated Vertices"); + doc.addNode( mi.SelfIntersect?"Yes":"No", VALUE_STRING,"Self Intersection"); + + doc.finalizeMain(); + doc.printXMLTree(); + +} + +int main(int argc,char ** argv) { CMesh m; - XMLTree doc; + bool SaveFlag=false; + bool AsciiFlag=true; + bool XmlFlag=false; + + string SaveName; - - - //load the mesh - //argv[1]=(char*)"c:\\checkup\\debug\\column1m.ply"; - //argv[1] = "C:\\sf\\apps\\msvc\\trimeshinfo\\Release\\prism.off"; - //argv[1] = "C:\\sf\\apps\\msvc\\trimeshinfo\\Release\\prova1.ply"; - - // print program info + MeshInfo mi; printf("-------------------------------\n" - " TriMeshInfo V.1.01 \n" + " TriMeshInfo V.1.2 \n" " http://vcg.isti.cnr.it\n" " release date: "__DATE__"\n" "-------------------------------\n\n"); - - - - - // load input meshes. - if(argc <= 1) - { + + // load input meshes. + if(argc <= 1) { printf(MSG_ERR_N_ARGS); exit(-1); - } - - - - - OpenMesh(argv[1],m); - - doc.initializeMain(); - - printf("\t Mesh info:\n"); - printf(" \t M: '%s'\n\t Number of vertices: %d \n", argv[1], m.vn); - printf("\t Number of faces: %d \n", m.fn); - - - - /*------------XML file part ------------------*/ - char* s =new(char[25]); - sprintf(s,"%d",m.vn); - doc.addNode(s, VALUE_INTEGER,"Number of Vertices"); - sprintf(s,"%d",m.fn); - doc.addNode(s, VALUE_INTEGER, "Number of Faces"); - - /*--------------------------------------------*/ - - - - if(m.HasPerFaceColor()||m.HasPerVertexColor()) - { - Color4b Color=m.C(); - printf( "\t Object color(4b): %f %f %f \n", Color[0], Color[1], Color[2]); - - /*------------XML file part ------------------*/ - - sprintf(s,"%f %f %f ",Color[0], Color[1], Color[2]); - doc.addNode(s, VALUE_FLOAT,"Colors"); - /*--------------------------------------------*/ } - + mi.FileName=argv[1]; + + for(int i=3; i < argc;) + { + if(argv[i][0]=='-') + switch(argv[i][1]) + { + case 'o' : SaveFlag=true; SaveName=argv[i][2]; break; + case 'x' : if(argv[i][2]=='y') { XmlFlag = true; printf("Enable XML Printing\n"); } + else { XmlFlag = false; printf("Disable XML Printing\n"); } break; + case 'a' : if(argv[i][2]=='y') { AsciiFlag = true; printf("Enable Ascii Printing\n"); } + else { AsciiFlag = false; printf("Disable Ascii Printing\n"); } break; + default : printf(MSG_ERR_INVALID_OPTION, argv[i]); + exit(0); + } + i++; + } + + OpenMesh(mi.FileName.c_str(),m); + mi.vn=m.vn; mi.fn=m.fn; vcg::tri::UpdateTopology::FaceFace(m); // IS MANIFOLD - - tri::Clean::Initialize(m); - - - - bool Manifold = tri::Clean::IsComplexManifold(m); - - if (!Manifold) - { - printf( "\t Manifold: NO\n"); - - /*------------XML file part ------------------*/ - - s = "No"; - doc.addNode(s, VALUE_BOOL,"Manifold"); - - /*--------------------------------------------*/ - } - else - { - - printf( "\t Manifold: YES\n"); - - /*------------XML file part ------------------*/ - s = "Yes"; - doc.addNode(s, VALUE_BOOL,"Manifold"); - /*--------------------------------------------*/ - } - + mi.Manifold = tri::Clean::IsComplexManifold(m); // COUNT EDGES - int count_e=0; - int boundary_e = 0; - tri::Clean::CountEdges(m, count_e, boundary_e); - - printf("\t Number of edges: %d \n", count_e); - printf("\t Number of internal edges: %d \n", count_e-boundary_e); - printf("\t Number of boundary edges: %i \n", boundary_e); - - /*------------XML file part ------------------*/ - s = new(char[25]); - sprintf(s,"%d",count_e); - doc.addNode(s, VALUE_INTEGER,"Number of Edges"); - - /*--------------------------------------------*/ - - + tri::Clean::CountEdges(m, mi.count_e, mi.boundary_e); // DEGENERATED FACES - - int count_fd = tri::Clean::DegeneratedFaces(m); - - printf("\t Number of degenerated faces: %d\n", count_fd); - - /*------------XML file part ------------------*/ - - sprintf(s,"%d",count_fd); - doc.addNode(s, VALUE_INTEGER,"Number of Degenerated Faces"); - - /*--------------------------------------------*/ + mi.count_fd = tri::Clean::DegeneratedFaces(m); // UNREFERENCED VERTEX - - int count_uv = tri::Clean::DetectUnreferencedVertex(m); - printf("\t Number of unreferenced vertices: %d\n",count_uv); - - /*------------XML file part ------------------*/ - - sprintf(s,"%d",count_uv); - doc.addNode(s, VALUE_INTEGER,"Number of unreferenced vertices"); - - /*--------------------------------------------*/ - + mi.count_uv = tri::Clean::DetectUnreferencedVertex(m); // HOLES COUNT - - int numholes =0 ; - if(Manifold) + if(mi.Manifold) { - numholes = tri::Clean::CountHoles(m); - printf("\t Number of holes/boundaries: %d \n", numholes); - - /*------------XML file part ------------------*/ - sprintf(s,"%d",numholes); - doc.addNode(s, VALUE_INTEGER,"Number of Holes"); - /*--------------------------------------------*/ - if(numholes>0) - { - printf("\t Edges per hole/boundary:\n\t ("); - int BEdges = tri::Clean::BorderEdges(m, numholes); - - /*------------XML file part ------------------*/ - - sprintf(s,"%d",BEdges); - doc.addNode(s, VALUE_INTEGER,"Number of Border Edges"); - - /*--------------------------------------------*/ - } - } - else - printf( "\t Number of holes: UNDEFINED, mesh is non-manifold \n"); - - - // Mesh Volume - float vol = m.Volume(); - int nuh = numholes; - if((m.Volume()!=0.)&&(Manifold)&&(numholes==0)) - { - - printf("\t Volume: %f \n", m.Volume()); - - /*------------XML file part ------------------*/ - - sprintf(s,"%f",m.Volume()); - doc.addNode(s, VALUE_FLOAT,"Volume"); - /*--------------------------------------------*/ - } - else - { - printf("\t Volume: UNDEFINED, mesh is either non-manifold or has holes \n"); - } - + mi.numholes = tri::Clean::CountHoles(m); + mi.BEdges = tri::Clean::BorderEdges(m, mi.numholes); + } + // Mesh Volume + if(mi.numholes==0) mi.Volume = m.Volume(); + // CONNECTED COMPONENTS + mi.numcomponents = tri::Clean::ConnectedComponents(m); - - int numcomponents = tri::Clean::ConnectedComponents(m); - printf("\t Number of connected components: %d\n", numcomponents); - - /*------------XML file part ------------------*/ - - sprintf(s,"%d",numcomponents); - doc.addNode(s, VALUE_INTEGER,"Number of Connected Components"); - /*--------------------------------------------*/ - - //GENUS --> 2( #components - genus ) = #vertices + #faces - #edge - #boundary_loops = eulernumber - #holes - //eulero = (mesh.vn-count_uv) - (count_e)+mesh.fn; - - - - if(Manifold) - { - printf( "\t Genus: %d \n", tri::Clean::MeshGenus(m,count_uv, numholes, numcomponents, count_e)); - - /*------------XML file part ------------------*/ - - sprintf(s,"%d",tri::Clean::MeshGenus(m,count_uv, numholes, numcomponents, count_e)); - doc.addNode(s, VALUE_INTEGER,"Genus"); - /*--------------------------------------------*/ - } - else//(!Manifold) - printf( "\t Genus: UNDEFINED, mesh is non-manifold \n"); + if(mi.Manifold) mi.Genus=tri::Clean::MeshGenus(m,mi.count_uv, mi.numholes, mi.numcomponents, mi.count_e); // REGULARITY - bool Regular=true; - bool Semiregular=true; + tri::Clean::IsRegularMesh(m, mi.Regular, mi.Semiregular); + + // ORIENTABLE E ORIENTED MESH + if (mi.Manifold) tri::Clean::IsOrientedMesh(m, mi.Oriented, mi.Orientable); - tri::Clean::IsRegularMesh(m, Regular, Semiregular); - if (Regular) - { + mi.dv = tri::Clean::RemoveDuplicateVertex(m); - printf("\t Type of Mesh: REGULAR\n"); - - /*------------XML file part ------------------*/ - s="REGULAR"; - doc.addNode(s, VALUE_STRING,"Type of Mesh"); - /*--------------------------------------------*/ - } - else if (Semiregular) - { - - printf("\t Type of Mesh: SEMIREGULAR\n"); - s="SEMIREGULAR"; - doc.addNode(s, VALUE_STRING,"Type of Mesh"); - } - else - { - - printf("\t Type of Mesh: IRREGULAR\n"); - - /*------------XML file part ------------------*/ - - s="IRREGULAR"; - doc.addNode(s, VALUE_STRING,"Type of Mesh"); - - /*--------------------------------------------*/ - } - // ORIENTABLE E ORIENTED MESH - - bool Orientable=true; - bool Oriented=true; - if (!Manifold) - { - - printf( "\t Orientable Mesh: NO\n"); - - /*------------XML file part ------------------*/ - - s="NO"; - doc.addNode(s, VALUE_STRING,"Orientable Mesh"); - /*--------------------------------------------*/ - } - else - { - tri::Clean::IsOrientedMesh(m, Oriented, Orientable); - - if (Orientable) - { - - printf( "\t Orientable Mesh: YES\n"); - - /*------------XML file part ------------------*/ - - s="YES"; - doc.addNode(s, VALUE_STRING,"Orientable Mesh"); - - /*--------------------------------------------*/ - } - else - { - - printf( "\t Orientable Mesh: NO\n"); - - /*------------XML file part ------------------*/ - - s="NO"; - doc.addNode(s, VALUE_STRING,"Orientable Mesh"); - /*--------------------------------------------*/ - } - } - if (Oriented && Manifold) - { - - printf( "\t Oriented Mesh: YES\n"); - - /*------------XML file part ------------------*/ - - s="YES"; - doc.addNode(s, VALUE_STRING,"Oriented Mesh"); - /*--------------------------------------------*/ - } - else - { - - printf( "\t Oriented Mesh: NO\n"); - - /*------------XML file part ------------------*/ - - s="NO"; - doc.addNode(s, VALUE_STRING,"Oriented Mesh"); - /*--------------------------------------------*/ - } - int dv = tri::Clean::RemoveDuplicateVertex(m); - if(dv>0) - { - - printf( "\t Number of duplicated vertices found: %d\n",dv); - - /*------------XML file part ------------------*/ - - char* s =new(char[25]); - sprintf(s,"%d",dv); - doc.addNode(s, VALUE_INTEGER,"Duplicated Vertices"); - /*--------------------------------------------*/ - } - else - { - - printf( "\t Duplicated vertices: NO\n"); - - /*------------XML file part ------------------*/ - - s="NO"; - doc.addNode(s, VALUE_STRING,"Duplicated Vertices"); - /*--------------------------------------------*/ - } // SELF INTERSECTION + mi.SelfIntersect = tri::Clean::SelfIntersections(m); - - printf("\t Model Bounding Box Diagonal: %f\n", m.bbox.Diag()); - if (tri::Clean::SelfIntersections(m)) - { - - printf( "\t Self Intersection: YES\n"); - - /*------------XML file part ------------------*/ - - s="YES"; - doc.addNode(s, VALUE_STRING,"Self Intersection"); - - /*--------------------------------------------*/ - } - else - { - - printf( "\t Self Intersection: NO\n"); - - /*------------XML file part ------------------*/ - - s="NO"; - doc.addNode(s, VALUE_STRING,"Self Intersection"); - /*--------------------------------------------*/ - } - - - - - - - string fs; - - cout<< "\t To save the file: [s/S]\n \t "; - cin>>ans; - - - if((ans == "S")||(ans == "s")) - { - cout<< "\t available formats: [ply, off, dxf, stl]"<>ans; - cout<<"\t enter filename \n \t "; - cin>>fs; - const char* filesave = fs.c_str(); - if(ans == "ply") - tri::io::ExporterPLY::Save(m, filesave); - else if(ans == "stl") - tri::io::ExporterSTL::Save(m,filesave); - else if(ans == "dxf") - tri::io::ExporterDXF::Save(m,filesave); - - else if(ans == "off") - tri::io::ExporterOFF::Save(m,filesave); - } - - cout<<"\t create XML files? [y/Y|n/N] \n \t "; - cin>>ans; - if((ans=="Y")||(ans=="y")) - { - doc.finalizeMain(); - doc.printXMLTree(); - } + if(SaveFlag) tri::io::Exporter::Save(m,SaveName.c_str()); + + if(AsciiFlag) PrintAsciiInfo(mi); + if(XmlFlag) PrintXMLInfo(mi); + return 0; }