diff --git a/Geo/GModelIO_Mesh.cpp b/Geo/GModelIO_Mesh.cpp index a23f1a131a79e89f264666a5a75640aa508175af..fdc739c452ceab4090635e4a2e62f147bc5062b2 100644 --- a/Geo/GModelIO_Mesh.cpp +++ b/Geo/GModelIO_Mesh.cpp @@ -2601,7 +2601,7 @@ int GModel::readVTK(const std::string &name, bool bigEndian) Msg::Warning("VTK reader only accepts float or double datasets"); return 0; } - + printf("POINTS=%d \n", numVertices); Msg::Info("Reading %d points", numVertices); std::vector<MVertex*> vertices(numVertices); for(int i = 0 ; i < numVertices; i++){ @@ -2621,6 +2621,7 @@ int GModel::readVTK(const std::string &name, bool bigEndian) else{ if(fscanf(fp, "%lf %lf %lf", &xyz[0], &xyz[1], &xyz[2]) != 3) return 0; } + printf("Point(%d)={%g, %g, %g}; \n", i+1, xyz[0], xyz[1], xyz[2]); vertices[i] = new MVertex(xyz[0], xyz[1], xyz[2]); } @@ -2716,10 +2717,11 @@ int GModel::readVTK(const std::string &name, bool bigEndian) else if (haveLines){ if(!binary){ int v0, v1; - char line[1024], *p, *pEnd, *pEnd2; + char line[100000], *p, *pEnd, *pEnd2; int iLine = 1; int num = 0; for (int k= 0; k < numElements; k++){ + printf("*** new line =%d \n", iLine); physicals[1][iLine][1] = "centerline"; fgets(line, sizeof(line), fp); v0=(int)strtol(line, &pEnd, 10);//ignore firt line @@ -2728,6 +2730,7 @@ int GModel::readVTK(const std::string &name, bool bigEndian) while(1){ v1 = strtol(p, &pEnd, 10); if (p == pEnd ) break; + printf("Line()={%d,%d};\n", vertices[v0]->getNum(),vertices[v1]->getNum()); elements[1][iLine].push_back(new MLine(vertices[v0],vertices[v1])); p=pEnd; v0=v1;