Further corrections

This commit is contained in:
Yoann Audouin 2022-11-09 09:18:46 +01:00
parent a11af22250
commit fe5470ba3e
2 changed files with 15 additions and 11 deletions

View 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);

View 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;