// Pool of thread for computation
// TODO: move when parallelMesh created
aMesh.InitPoolThreads();
+ aMesh.CreateTmpFolder();
TopAbs_ShapeEnum previousShapeType = TopAbs_VERTEX;
int nbThreads = aMesh.GetNbThreads();
aMesh.wait();
aMesh.GetMeshDS()->Modified();
+ aMesh.DeleteTmpFolder();
return ret;
};
_callUp = NULL;
_meshDS->ShapeToMesh( PseudoShape() );
_subMeshHolder = new SubMeshHolder;
- // Temporary folder that will be used by parallel computation
- tmp_folder = fs::temp_directory_path()/fs::unique_path(fs::path("SMESH_%%%%-%%%%"));
- fs::create_directories(tmp_folder);
// assure unique persistent ID
if ( _document->NbMeshes() > 1 )
if(_pool)
DeletePoolThreads();
#endif
-#ifndef _DEBUG_
- fs::remove_all(tmp_folder);
-#endif
}
//================================================================================
// sort submeshes according to stored mesh order
SortByMeshOrder( theSubMeshes );
}
+
+
+//=============================================================================
+/*!
+ * \brief Build folder for parallel computation
+ */
+//=============================================================================
+void SMESH_Mesh::CreateTmpFolder()
+{
+ // Temporary folder that will be used by parallel computation
+ tmp_folder = fs::temp_directory_path()/fs::unique_path(fs::path("SMESH_%%%%-%%%%"));
+ fs::create_directories(tmp_folder);
+}
+//
+//=============================================================================
+/*!
+ * \brief Delete temporary folder used for parallel computation
+ */
+//=============================================================================
+void SMESH_Mesh::DeleteTmpFolder()
+{
+#ifndef _DEBUG_
+ fs::remove_all(tmp_folder);
+#endif
+}
bool IsParallel(){return _NbThreads > 0;}
#endif
+ void CreateTmpFolder();
+ void DeleteTmpFolder();
+
// Temporary folder used during parallel Computation
boost::filesystem::path tmp_folder;
#ifndef WIN32