32 #include "DGtal/base/Common.h"
34 #include "DGtal/shapes/fromPoints/MeshFromPoints.h"
35 #include "DGtal/io/readers/MeshReader.h"
37 #include "DGtal/helpers/StdDefs.h"
39 #include "ConfigTest.h"
44 using namespace DGtal;
91 unsigned int nbok = 0;
96 std::string filenameOFF = testPath +
"samples/box.off";
98 bool importOK = a3DMesh << filenameOFF;
100 nbok += importOK ? 1 : 0;
105 bool isWellImported = (a3DMesh.
nbVertex()==8) && (a3DMesh.
nbFaces()==6) && (aFace.size()==4) && (aFace.at(0)==0);
106 nbok+=isWellImported? 1: 0;
109 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
110 <<
"true == true" << std::endl;
114 std::string filenameOFS = testPath +
"samples/testMesh.ofs";
116 bool importOK2= a3DMesh2 << filenameOFS;
117 nbok += importOK2 ? 1 : 0;
121 bool isWellImported2 = (a3DMesh2.
nbVertex()==32) && (a3DMesh2.
nbFaces()==60) && (aFace2.size()==3) && (aFace2.at(0)==0);
122 nbok+=isWellImported2? 1: 0;
125 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
126 <<
"true == true" << std::endl;
142 int main(
int argc,
char** argv )
146 for (
int i = 0; i < argc; ++i )
150 bool res = testMeshReader();
151 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;