00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176 #include <iostream>
00177 #include <fstream>
00178 #include <vector>
00179 #include <string>
00180 #include <stack>
00181
00182 using namespace std;
00183
00184
00185 #include <vcg/simplex/vertex/base.h>
00186 #include <vcg/simplex/vertex/component.h>
00187
00188 #include <vcg/simplex/face/base.h>
00189 #include <vcg/simplex/face/component.h>
00190
00191 #include <vcg/complex/trimesh/base.h>
00192 #include <vcg/complex/trimesh/update/topology.h>
00193 #include <vcg/complex/trimesh/update/edges.h>
00194 #include <vcg/complex/trimesh/update/bounding.h>
00195 #include <vcg/complex/trimesh/update/flag.h>
00196 #include <vcg/complex/trimesh/clean.h>
00197 #include <vcg/space/intersection/triangle_triangle3.h>
00198
00199 #include <vcg/math/histogram.h>
00200 #include <wrap/io_trimesh/import.h>
00201 #include <wrap/io_trimesh/export.h>
00202
00203 #include <vcg/simplex/face/pos.h>
00204 #include <vcg/complex/trimesh/inertia.h>
00205
00206 #include "XMLTree.h"
00207
00208 #include <vcg/space/index/grid_static_ptr.h>
00209 #include "defs.h"
00210
00211 using namespace vcg;
00212
00213
00214 class CFace;
00215 class CEdge;
00216 class CVertex : public VertexSimp2< CVertex, CEdge, CFace, vert::VFAdj, vert::Coord3f,
00217 vert::BitFlags, vert::Normal3f > {};
00218 class CFace : public FaceSimp2< CVertex, CEdge, CFace, face::FFAdj, face::VFAdj,
00219 face::VertexRef, face::Normal3f, face::BitFlags, face::Mark > {};
00220 class CMesh : public vcg::tri::TriMesh< vector<CVertex>, vector<CFace> > {};
00221
00222 typedef CMesh::VertexPointer VertexPointer;
00223 typedef CMesh::VertexIterator VertexIterator;
00224 typedef Point3<CMesh::ScalarType> Point3x;
00225 typedef vector<Point3x> Hole;
00226
00227 typedef CMesh::VertexPointer VertexPointer;
00228 typedef CMesh::VertexIterator VertexIterator;
00229 typedef CMesh::FaceContainer FaceContainer;
00230 typedef CMesh::ScalarType ScalarType;
00231
00232 struct MeshInfo
00233 {
00234 string FileName;
00235 bool hasVNormal;
00236 bool hasFNormal;
00237 bool hasVColor;
00238 bool hasFColor;
00239 bool hasTexture;
00240 int vn,fn;
00241 bool VManifold;
00242 bool FManifold;
00243 int count_e,boundary_e,count_fd,count_uv,numholes;
00244 int BEdges;
00245 float Volume;
00246 int numcomponents,Genus;
00247 bool Regular,Semiregular;
00248 bool Orientable,Oriented;
00249 int dv;
00250 bool SelfIntersect;
00251 std::vector<CMesh::FaceType *> intersections;
00252 };
00253
00254
00255 static const int HTML_LINES = 31;
00256 static const char * HTML_TABLE[HTML_LINES]=
00257 {
00258 "<html>",
00259 " <head>",
00260 " <meta http-equiv=\"content-type\" content=\"text/html; charset=ISO-8859-1\">",
00261 " <title>description.html</title>",
00262 " </head>",
00263 " <body>",
00264 " <span style=\"font-weight: bold;\"></span>",
00265 " <h2>TriMeshInfo V.1.2 - Results</h2>",
00266 " <hr style=\"width: 100%; height: 2px;\"><br>",
00267 " <table",
00268 " style=\"width: 100%; text-align: center; margin-left: auto; margin-right: auto;\" ",
00269 " border=\"1\" cellpadding=\"2\" cellspacing=\"2\">",
00270 " <tbody>",
00271 " <tr>",
00272 " <td>Name</td>",
00273 " <td>Vertices</td>",
00274 " <td>Faces</td>",
00275 " <td>Edges</td>",
00276 " <td>Holes/<br>Boundaries</td>",
00277 " <td>Connected<br>Components</td>",
00278 " <td>Isolated<br>Vertices</td>",
00279 " <td>Duplicated<br>Vertices</td>",
00280 " <td>Self<br>Interesection</td>",
00281 " <td>Manifold</td>",
00282 " <td>Orientable/<br>Oriented</td>",
00283 " <td>Genus</td>",
00284 " </tr>",
00285 " </tbody>",
00286 " </table>",
00287 " </body>",
00288 "</html>"
00289 };
00290
00291
00292 int OpenMesh(const char *filename, CMesh &m)
00293 {
00294 printf(" Mesh loading...");
00295
00296 int mask = 0;
00297
00298 tri::io::Importer<CMesh>::LoadMask(filename,mask);
00299 int err = tri::io::Importer<CMesh>::Open(m, filename);
00300
00301 if (err)
00302 {
00303 if(tri::io::Importer<CMesh>::ErrorCritical(err))
00304 {
00305 printf("\n Error during loading %s: '%s'\n",filename,
00306 tri::io::Importer<CMesh>::ErrorMsg(err));
00307 exit(-1);
00308 }
00309 else
00310 {
00311 printf("\n Non Critical Troubles during loading %s: '%s'\n",filename,
00312 tri::io::Importer<CMesh>::ErrorMsg(err));
00313 }
00314 }
00315 else
00316 printf(" done.\n\n");
00317
00318 return mask;
00319 }
00320
00321 void initMeshInfo(MeshInfo &mi)
00322 {
00323 mi.vn = 0;
00324 mi.fn = 0;
00325 mi.hasVColor = false;
00326 mi.hasFColor = false;
00327 mi.hasFNormal = false;
00328 mi.hasVNormal = false;
00329 mi.hasTexture = false;
00330 mi.VManifold = false;
00331 mi.FManifold = false;
00332 mi.count_e = 0;
00333 mi.boundary_e = 0;
00334 mi.count_fd = 0;
00335 mi.count_uv = 0;
00336 mi.numholes = 0;
00337 mi.BEdges = 0;
00338 mi.Volume = 0;
00339 mi.numcomponents = 0;
00340 mi.Genus = 0;
00341 mi.Regular = false;
00342 mi.Semiregular = false;
00343 mi.Orientable = false;
00344 mi.Oriented = false;
00345 mi.dv = 0;
00346 mi.SelfIntersect = false;
00347
00348
00349 }
00350
00351 void PrintMeshInfo(MeshInfo &mi)
00352 {
00353 printf(" *** Mesh information ***\n\n");
00354 printf(" Mesh: '%s' \n", mi.FileName.c_str());
00355 printf(" Number of vertices: %d \n", mi.vn);
00356 printf(" Number of faces: %d \n", mi.fn);
00357 printf(" Number of edges: %d \n", mi.count_e);
00358 printf(" Number of internal edges: %d \n", mi.count_e-mi.boundary_e);
00359 printf(" Number of boundary edges: %i \n", mi.boundary_e);
00360 printf(" Number of degenerated faces: %d\n", mi.count_fd);
00361 printf(" Number of unreferenced vertices: %d\n",mi.count_uv);
00362 printf(" Number of duplicated vertices found: %d\n", mi.dv);
00363 printf(" Number of holes/boundaries: %d \n", mi.numholes);
00364
00365 if (mi.hasVNormal)
00366 printf(" Has Per-Vertex Normal: YES\n");
00367 else
00368 printf(" Has Per-Vertex Normal: NO\n");
00369
00370 if (mi.hasFNormal)
00371 printf(" Has Per-Face Normal: YES\n");
00372 else
00373 printf(" Has Per-Face Normal: NO\n");
00374
00375 if (mi.hasVColor)
00376 printf(" Has Per-Vertex Color: YES\n");
00377 else
00378 printf(" Has Per-Vertex Color: NO\n");
00379
00380 if (mi.hasFColor)
00381 printf(" Has Per-Face Color: YES\n");
00382 else
00383 printf(" Has Per-Face Color: NO\n");
00384
00385 if (mi.hasTexture)
00386 printf(" Has Texture information: YES\n");
00387 else
00388 printf(" Has Texture information: NO\n");
00389
00390 if ((mi.VManifold && mi.FManifold )&&(mi.Oriented)&&(!mi.numholes))
00391 printf(" Volume: %f \n", mi.Volume);
00392 else
00393 printf(" Volume: UNDEFINED (a closed oriented manifold is required)\n");
00394
00395 printf(" Number of connected components: %d\n", mi.numcomponents);
00396
00397
00398 if (!mi.VManifold && mi.FManifold)
00399 {
00400 printf(" Orientable Mesh: NO\n");
00401 printf(" Oriented Mesh: NO\n");
00402 }
00403 else
00404 {
00405 if (mi.Orientable)
00406 printf(" Orientable Mesh: YES\n");
00407 else
00408 printf(" Orientable Mesh: NO\n");
00409
00410 if (mi.Oriented)
00411 printf(" Oriented Mesh: YES\n");
00412 else
00413 printf(" Oriented Mesh: NO\n");
00414 }
00415
00416
00417 if (mi.VManifold && mi.FManifold )
00418 printf(" Manifold: YES\n");
00419 else
00420 printf(" Manifold: NO\n");
00421
00422
00423 if (mi.VManifold && mi.FManifold)
00424 printf(" Genus: %d \n", mi.Genus);
00425 else
00426 printf(" Genus: N/A \n");
00427
00428
00429 if (mi.Regular)
00430 printf(" Mesh Type: REGULAR\n");
00431 else if (mi.Semiregular)
00432 printf(" Mesh Type: SEMIREGULAR\n");
00433 else
00434 printf(" Mesh Type: IRREGULAR\n");
00435
00436
00437 if (mi.SelfIntersect)
00438 printf(" Self Intersection: %d\n", mi.intersections.size());
00439 else
00440 printf(" Self Intersection: NONE.\n");
00441 }
00442
00443 void SaveXMLInfo(MeshInfo &mi)
00444 {
00445 XMLTree doc;
00446 doc.initializeMain();
00447
00448 char s[256];
00449 sprintf(s,"%d",mi.vn);
00450 doc.addNode(s, VALUE_INTEGER, "Number of Vertices");
00451 sprintf(s,"%d",mi.fn);
00452 doc.addNode(s, VALUE_INTEGER, "Number of Faces");
00453
00454 if(mi.VManifold && mi.FManifold)
00455 doc.addNode("false", VALUE_BOOL,"Manifold");
00456 else
00457 doc.addNode("true", VALUE_BOOL,"Manifold");
00458
00459 sprintf(s,"%d",mi.count_e);
00460 doc.addNode(s, VALUE_INTEGER,"Number of Edges");
00461 sprintf(s,"%d",mi.count_fd);
00462 doc.addNode(s, VALUE_INTEGER,"Number of Degenerated Faces");
00463
00464 sprintf(s,"%d",mi.count_uv);
00465 doc.addNode(s, VALUE_INTEGER,"Number of unreferenced vertices");
00466 sprintf(s,"%d",mi.numholes);
00467 doc.addNode(s, VALUE_INTEGER, "Number of Holes");
00468 sprintf(s,"%d",mi.BEdges);
00469 doc.addNode(s, VALUE_INTEGER, "Number of Border Edges");
00470
00471 if (mi.hasVColor)
00472 doc.addNode("true", VALUE_BOOL, "Per-Vertex Color Information");
00473 else
00474 doc.addNode("false", VALUE_BOOL, "Per-Vertex Color Information");
00475
00476 if (mi.hasFColor)
00477 doc.addNode("true", VALUE_BOOL, "Per-Face Color Information");
00478 else
00479 doc.addNode("false", VALUE_BOOL, "Per-Face Color Information");
00480
00481 if (mi.hasVNormal)
00482 doc.addNode("true", VALUE_BOOL, "Per-Vertex Normal");
00483 else
00484 doc.addNode("false", VALUE_BOOL, "Per-Vertex Normal");
00485
00486 if (mi.hasFNormal)
00487 doc.addNode("true", VALUE_BOOL, "Per-Face Normal");
00488 else
00489 doc.addNode("false", VALUE_BOOL, "Per-Face Normal");
00490
00491 if (mi.hasTexture)
00492 doc.addNode("true", VALUE_BOOL, "Texture Information");
00493 else
00494 doc.addNode("false", VALUE_BOOL, "Texture Information");
00495
00496 sprintf(s,"%f",mi.Volume);
00497 doc.addNode(s, VALUE_FLOAT,"Volume");
00498 sprintf(s,"%d",mi.numcomponents);
00499 doc.addNode(s, VALUE_INTEGER,"Number of Connected Components");
00500 sprintf(s,"%d",mi.Genus);
00501 doc.addNode(s, VALUE_INTEGER,"Genus");
00502
00503 if (mi.Regular)
00504 doc.addNode("REGULAR", VALUE_STRING,"Type of Mesh");
00505 else if (mi.Semiregular)
00506 doc.addNode("SEMIREGULAR", VALUE_STRING,"Type of Mesh");
00507 else
00508 doc.addNode("IRREGULAR", VALUE_STRING,"Type of Mesh");
00509
00510 if (!mi.VManifold && mi.FManifold)
00511 {
00512 doc.addNode("NO", VALUE_STRING,"Orientable Mesh");
00513 doc.addNode("NO", VALUE_STRING,"Oriented Mesh");
00514 }
00515 else
00516 {
00517 doc.addNode(mi.Orientable?"Yes":"No", VALUE_STRING,"Orientable Mesh");
00518 doc.addNode(mi.Oriented?"Yes":"No", VALUE_STRING,"Oriented Mesh");
00519 }
00520
00521 sprintf(s,"%d",mi.dv);
00522 doc.addNode(s, VALUE_INTEGER,"Duplicated Vertices");
00523 doc.addNode(mi.SelfIntersect?"Yes":"No", VALUE_STRING,"Self Intersection");
00524
00525 doc.finalizeMain();
00526
00527
00528 string filename = mi.FileName;
00529
00530 int l = static_cast<int>(filename.size());
00531 int index = static_cast<int>(filename.find_first_of('.'));
00532 filename.erase(index, l - index);
00533 filename.append(".xml");
00534
00535 doc.setName(filename.c_str());
00536 doc.printXMLTree();
00537 }
00538
00539 void SaveMeshInfoHtmlTable(fstream &fout, MeshInfo &mi)
00540 {
00541 fout << " <tr>" << std::endl;
00542 fout << " <td>" << mi.FileName << "</td>" << std::endl;
00543 fout << " <td>" << mi.vn << "</td>" << std::endl;
00544 fout << " <td>" << mi.fn << "</td>" << std::endl;
00545 fout << " <td>" << mi.count_e << "</td>" << std::endl;
00546
00547 if (mi.VManifold && mi.FManifold)
00548 fout << " <td>" << mi.numholes << "</td>" << std::endl;
00549 else
00550 fout << " <td>N/A</td>" << std::endl;
00551
00552
00553 fout << " <td>" << mi.numcomponents << "</td>" << std::endl;
00554 fout << " <td>" << mi.count_uv << "</td>" << std::endl;
00555 fout << " <td>" << mi.dv << "</td>" << std::endl;
00556
00557 if (mi.SelfIntersect)
00558 fout << " <td>" << static_cast<unsigned int>(mi.intersections.size())
00559 << "</td>" << std::endl;
00560 else
00561 fout << " <td>None</td>" << std::endl;
00562
00563 if(mi.VManifold && mi.FManifold)
00564 fout << " <td>Yes</td>" << std::endl;
00565 else
00566 fout << " <td>No</td>" << std::endl;
00567
00568 if ((mi.Orientable)&&(mi.Oriented))
00569 fout << " <td>Yes / Yes</td>" << std::endl;
00570 else if ((mi.Orientable)&&(!mi.Oriented))
00571 fout << " <td>Yes / No</td>" << std::endl;
00572 else if (!mi.Orientable)
00573 fout << " <td>No / No</td>" << std::endl;
00574
00575 if (mi.VManifold && mi.FManifold)
00576 fout << " <td>" << mi.Genus << "</td>" << std::endl;
00577 else
00578 fout << " <td>N/A</td>" << std::endl;
00579
00580 fout << " </tr>" << std::endl;
00581 }
00582
00583 void SaveHtmlInfo(MeshInfo &mi)
00584 {
00585 char buff[1024];
00586 bool flagInsert = false;
00587 ifstream fin;
00588 fstream fout;
00589
00590
00591 fin.open("result.html");
00592 long pos;
00593 if (fin.is_open())
00594 {
00595 while (!fin.eof())
00596 {
00597 pos = fin.tellg();
00598 fin.getline(buff, 1024);
00599 string str(buff);
00600 if (str == " </tbody>")
00601 break;
00602 }
00603 flagInsert = true;
00604 }
00605 fin.close();
00606
00607 if (flagInsert)
00608 fout.open("result.html", ios::in | ios::out);
00609 else
00610 fout.open("result.html", ios::out);
00611
00612 if (!fout.is_open())
00613 {
00614 printf("\n Impossible to write the HTML output file.\n");
00615 }
00616 else
00617 {
00618 if (flagInsert)
00619 {
00620
00621 fout.seekp(pos, ios::beg);
00622
00623 SaveMeshInfoHtmlTable(fout, mi);
00624
00625 for (int i = HTML_LINES - 4; i < HTML_LINES; i++)
00626 fout << HTML_TABLE[i] << std::endl;
00627 }
00628 else
00629 {
00630
00631 for (int i = 0; i < HTML_LINES - 4; i++)
00632 fout << HTML_TABLE[i] << std::endl;
00633
00634 SaveMeshInfoHtmlTable(fout, mi);
00635
00636 for (int i = HTML_LINES - 4; i < HTML_LINES; i++)
00637 fout << HTML_TABLE[i] << std::endl;
00638 }
00639 }
00640
00641 fout.close();
00642 }
00643
00644 int main(int argc, char ** argv)
00645 {
00646 CMesh m;
00647 bool saveCleanMeshFlag = false;
00648 bool verboseFlag = true;
00649 bool XmlFlag= false;
00650 bool HtmlFlag = false;
00651
00652 string SaveName;
00653
00654 MeshInfo mi;
00655 initMeshInfo(mi);
00656
00657 printf("\n -------------------------------\n"
00658 " TriMeshInfo V.1.23 \n"
00659 " http://vcg.isti.cnr.it\n"
00660 " release date: "__DATE__"\n"
00661 " -------------------------------\n\n\n");
00662
00663
00664
00666
00667 if (argc <= 1)
00668 {
00669 printf(MSG_ERR_N_ARGS);
00670 exit(-1);
00671 }
00672
00673 mi.FileName = argv[1];
00674
00675 int i = 2;
00676 while (i < argc)
00677 {
00678 if (argv[i][0] == '-')
00679 {
00680 switch(argv[i][1])
00681 {
00682 case 'q' :
00683
00684 verboseFlag = false;
00685 break;
00686
00687 case 's':
00688
00689 saveCleanMeshFlag = true;
00690
00691
00692 if (i+1 >= argc)
00693 {
00694 printf(" Invalid output mesh name.\n\n");
00695 exit(-1);
00696 }
00697 else if (argv[i+1][0] != '-')
00698 SaveName = argv[i+1];
00699 else
00700 {
00701 printf(" Invalid output mesh name.\n\n");
00702 exit(-1);
00703 }
00704
00705 i++;
00706 break;
00707
00708 case 'x' :
00709
00710 XmlFlag = true;
00711 break;
00712
00713 case 'h' :
00714
00715 HtmlFlag = true;
00716 break;
00717
00718 default:
00719 printf(MSG_ERR_INVALID_OPTION, argv[i]);
00720 exit(0);
00721 break;
00722 }
00723 }
00724
00725 i++;
00726 };
00727
00728
00730
00731 int load_mask = OpenMesh(mi.FileName.c_str(), m);
00732
00733 if (load_mask & vcg::tri::io::Mask::IOM_VERTNORMAL)
00734 mi.hasVNormal = true;
00735 else
00736 mi.hasVNormal = false;
00737
00738 if (load_mask & vcg::tri::io::Mask::IOM_FACENORMAL)
00739 mi.hasFNormal = true;
00740 else
00741 mi.hasFNormal = false;
00742
00743 if (load_mask & vcg::tri::io::Mask::IOM_VERTCOLOR)
00744 mi.hasVColor = true;
00745 else
00746 mi.hasVColor = false;
00747
00748 if (load_mask & vcg::tri::io::Mask::IOM_FACECOLOR)
00749 mi.hasFColor = true;
00750 else
00751 mi.hasFColor = false;
00752
00753 if( (load_mask & vcg::tri::io::Mask::IOM_VERTTEXCOORD) ||
00754 (load_mask & vcg::tri::io::Mask::IOM_WEDGTEXCOORD) )
00755 mi.hasTexture = true;
00756 else
00757 mi.hasTexture = false;
00758
00759
00761
00762 printf(" Mesh processing...\n\n");
00763
00764
00765 mi.vn = m.vn;
00766
00767
00768 mi.fn = m.fn;
00769
00770
00771 mi.dv = tri::Clean<CMesh>::RemoveDuplicateVertex(m);
00772
00773
00774 mi.count_fd = tri::Clean<CMesh>::RemoveDegenerateFace(m);
00775 mi.count_fd += tri::Clean<CMesh>::RemoveFaceOutOfRangeArea<false>(m,0);
00776
00777
00778 mi.count_uv = tri::Clean<CMesh>::RemoveUnreferencedVertex(m);
00779
00780
00781 tri::UpdateTopology<CMesh>::FaceFace(m);
00782 tri::UpdateTopology<CMesh>::VertexFace(m);
00783
00784
00785 mi.VManifold = tri::Clean<CMesh>::IsTwoManifoldVertex(m);
00786 mi.FManifold = tri::Clean<CMesh>::IsTwoManifoldFace(m);
00787
00788
00789 tri::Clean<CMesh>::CountEdges(m, mi.count_e, mi.boundary_e);
00790
00791
00792 if(mi.VManifold && mi.FManifold)
00793 {
00794 mi.numholes = tri::Clean<CMesh>::CountHoles(m);
00795 mi.BEdges = tri::Clean<CMesh>::BorderEdges(m, mi.numholes);
00796 }
00797
00798
00799 mi.numcomponents = tri::Clean<CMesh>::ConnectedComponents(m);
00800
00801
00802 if (mi.VManifold && mi.FManifold)
00803 tri::Clean<CMesh>::IsOrientedMesh(m, mi.Oriented, mi.Orientable);
00804 else
00805 {
00806 mi.Oriented = false;
00807 mi.Orientable = false;
00808 }
00809
00810
00811 tri::UpdateTopology<CMesh>::VertexFace(m);
00812
00813
00814 if ((mi.VManifold && mi.FManifold)&&(mi.Oriented)&&(!mi.numholes))
00815 {
00816 tri::Inertia<CMesh> mm;
00817 mm.Compute(m);
00818 mi.Volume = mm.Mass();
00819
00820
00821 if (mi.Volume < 0.0)
00822 mi.Volume = -mi.Volume;
00823 }
00824
00825
00826 if(mi.VManifold && mi.FManifold)
00827 mi.Genus = tri::Clean<CMesh>::MeshGenus(m, mi.numholes,
00828 mi.numcomponents, mi.count_e);
00829
00830
00831 if (mi.VManifold && mi.FManifold)
00832 tri::Clean<CMesh>::IsRegularMesh(m, mi.Regular, mi.Semiregular);
00833 else
00834 {
00835 mi.Regular = false;
00836 mi.Semiregular = false;
00837 }
00838
00839
00840 mi.SelfIntersect = tri::Clean<CMesh>::SelfIntersections(m, mi.intersections);
00841
00842
00844
00845
00846 if(verboseFlag)
00847 PrintMeshInfo(mi);
00848
00849
00850 if(XmlFlag)
00851 SaveXMLInfo(mi);
00852
00853
00854 if (HtmlFlag)
00855 SaveHtmlInfo(mi);
00856
00857
00858 if (saveCleanMeshFlag)
00859 {
00860 printf(" Save the 'clean' mesh...");
00861 tri::io::Exporter<CMesh>::Save(m, SaveName.c_str());
00862 printf(" done.\n\n");
00863 }
00864
00865 mi.intersections.clear();
00866
00867 return 0;
00868 }
00869