From fe5470ba3e3d4800c490455070f2b1120bce5bd8 Mon Sep 17 00:00:00 2001 From: Yoann Audouin Date: Wed, 9 Nov 2022 09:18:46 +0100 Subject: [PATCH] Further corrections --- .../NETGENPlugin_NETGEN_3D_Remote.cxx | 20 +++++++++++-------- .../NETGENPlugin_NETGEN_3D_SA.cxx | 6 +++--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_Remote.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_Remote.cxx index 960b866..dad9cec 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_Remote.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_Remote.cxx @@ -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); diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_SA.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_SA.cxx index 685427f..55972ac 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_SA.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_SA.cxx @@ -275,11 +275,11 @@ int NETGENPlugin_NETGEN_3D_SA::run(const std::string input_mesh_file, std::unique_ptr 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;