X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Gen.cxx;h=2d77c9966e7ec9f28313dc8fb12cba64ddcfe328;hb=b27f64c6ec32ac4adfa403bfc5d74a4df0f9f8bc;hp=1dfb1e07a07eba988d965a5ec0292e62af0b864f;hpb=78ffe50bb947811400177ee9625c1d7fcc7d24a8;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_Gen.cxx b/src/SMESH/SMESH_Gen.cxx index 1dfb1e07a..2d77c9966 100644 --- a/src/SMESH/SMESH_Gen.cxx +++ b/src/SMESH/SMESH_Gen.cxx @@ -30,6 +30,7 @@ #include "SMESH_Gen.hxx" +#include "DriverMesh.hxx" #include "SMDS_Mesh.hxx" #include "SMDS_MeshElement.hxx" #include "SMDS_MeshNode.hxx" @@ -55,6 +56,8 @@ #include using namespace std; +#include +namespace fs = boost::filesystem; // Environment variable separator #ifdef WIN32 @@ -255,14 +258,34 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh, if ( !aMesh.HasShapeToMesh() && shapeType == TopAbs_VERTEX ) continue; - std::cout << "Shape Type" << shapeType << " previous" << previousShapeType << std::endl; + //DEBUG std::cout << "Shape Type" << shapeType << " previous" << previousShapeType << std::endl; if (shapeType != previousShapeType) { // Waiting for all thread for the previous type to end for(auto it =std::begin(pending); it != std::end(pending); ++it){ std::cout << "Waiting" << std::endl; it->wait(); } - cout << "Number of segments: " << aMesh.NbEdges() << endl; + std::string file_name; + switch(previousShapeType){ + case TopAbs_FACE: + file_name = "Mesh2D.med"; + break; + case TopAbs_EDGE: + file_name = "Mesh1D.med"; + break; + case TopAbs_VERTEX: + file_name = "Mesh0D.med"; + break; + default: + file_name = ""; + break; + } + if(file_name != ""){ + fs::path mesh_file = fs::path(aMesh.tmp_folder) / fs::path(file_name); + // TODO: change mesh name + export_mesh(mesh_file.string(), aMesh, "Maillage_1"); + + } //Resetting threaded pool info previousShapeType = shapeType; pending.clear(); @@ -279,7 +302,7 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh, pending.push_back(_pool->push(parallel_compute, smToCompute, computeEvent, shapeSM, aShapeOnly, allowedSubShapes, aShapesId)); - std::cout << "Launched " << smToCompute << " shape type " << shapeType << std::endl; + //DEBUG std::cout << "Launched " << smToCompute << " shape type " << shapeType << std::endl; }