]> SALOME platform Git repositories - plugins/netgenplugin.git/commitdiff
Salome HOME
Further corrections yan/parallel_mesh3
authorYoann Audouin <yoann.audouin@edf.fr>
Wed, 9 Nov 2022 08:18:46 +0000 (09:18 +0100)
committerYoann Audouin <yoann.audouin@edf.fr>
Wed, 9 Nov 2022 08:18:46 +0000 (09:18 +0100)
src/NETGENPlugin/NETGENPlugin_NETGEN_3D_Remote.cxx
src/NETGENPlugin/NETGENPlugin_NETGEN_3D_SA.cxx

index 960b86685597f991bcc6f2e2740c5cbe5e391ca7..dad9cec736807b67a08054d47cbc9fb3df995acf 100644 (file)
@@ -231,7 +231,11 @@ bool NETGENPlugin_NETGEN_3D_Remote::Compute(SMESH_Mesh&         aMesh,
 
 
   // Temporary folder for run
+#ifdef WIN32
+  fs::path tmp_folder = aMesh.tmp_folder / fs::path("Volume-%%%%-%%%%");
+#else
   fs::path tmp_folder = aMesh.tmp_folder / fs::unique_path(fs::path("Volume-%%%%-%%%%"));
+#endif
   fs::create_directories(tmp_folder);
   // Using MESH2D generated after all triangles where created.
   fs::path mesh_file=aMesh.tmp_folder / fs::path("Mesh2D.med");
@@ -249,7 +253,7 @@ bool NETGENPlugin_NETGEN_3D_Remote::Compute(SMESH_Mesh&         aMesh,
   {
     SMESH_MeshLocker myLocker(&aMesh);
     //Writing Shape
-    exportShape(shape_file.string(), aShape);
+    SMESH_DriverShape::exportShape(shape_file.string(), aShape);
 
     //Writing hypo
     netgen_params aParams;
@@ -291,16 +295,16 @@ bool NETGENPlugin_NETGEN_3D_Remote::Compute(SMESH_Mesh&         aMesh,
 
 
   // Building arguments for QProcess
-  QString program = run_mesher_exe.c_str();
+  QString program = run_mesher_exe.string().c_str();
   QStringList arguments;
   arguments << "NETGEN3D";
-  arguments << mesh_file.c_str();
-  arguments << shape_file.c_str();
-  arguments << param_file.c_str();
-  arguments << element_orientation_file.c_str();
-  arguments << new_element_file.c_str();
+  arguments << mesh_file.string().c_str();
+  arguments << shape_file.string().c_str();
+  arguments << param_file.string().c_str();
+  arguments << element_orientation_file.string().c_str();
+  arguments << new_element_file.string().c_str();
   arguments << "NONE";
-  QString out_file = log_file.c_str();
+  QString out_file = log_file.string().c_str();
   QProcess myProcess;
   myProcess.setStandardOutputFile(out_file);
 
index 685427fc214fa4bbb4c62299b32824005337ff00..55972ac83ccaf3ff5c841f74b3133d7aa800592d 100644 (file)
@@ -275,11 +275,11 @@ int NETGENPlugin_NETGEN_3D_SA::run(const std::string input_mesh_file,
 
   std::unique_ptr<SMESH_Mesh> myMesh(_gen->CreateMesh(false));
 
-  importMesh(input_mesh_file, *myMesh);
+  SMESH_DriverMesh::importMesh(input_mesh_file, *myMesh);
 
   // Importing shape
   TopoDS_Shape myShape;
-  importShape(shape_file, myShape);
+  SMESH_DriverShape::importShape(shape_file, myShape);
 
   // Importing hypothesis
   netgen_params myParams;
@@ -300,7 +300,7 @@ int NETGENPlugin_NETGEN_3D_SA::run(const std::string input_mesh_file,
 
   if(!output_mesh_file.empty()){
     std::string meshName = "MESH";
-    exportMesh(output_mesh_file, *myMesh, meshName);
+    SMESH_DriverMesh::exportMesh(output_mesh_file, *myMesh, meshName);
   }
 
   return ret;