-// Copyright (C) 2007-2022 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#include <SMESHDS_Mesh.hxx>
+#ifdef WIN32
+#include <filesystem>
+namespace fs = std::filesystem;
+#else
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
+#endif
/*
Netgen include files
*/
void NETGENPlugin_NETGEN_3D_SA::fillHyp(netgen_params aParams)
{
- if(_gen)
- std::cout << "_gen is set" << std::endl;
if(aParams.has_netgen_param){
NETGENPlugin_Hypothesis * hypParameters = new NETGENPlugin_Hypothesis(0, GetGen());
int &Netgen_NbOfNodes
)
{
+ MESSAGE("Writting new elements")
Ng_Mesh* Netgen_mesh = ngLib.ngMesh();
int Netgen_NbOfNodesNew = Ng_GetNP(Netgen_mesh);
int Netgen_NbOfTetra = Ng_GetNE(Netgen_mesh);
-
bool isOK = ( Netgen_NbOfTetra > 0 );
if ( isOK && !new_element_file.empty() )
{
std::string new_element_file,
bool output_mesh)
{
+ MESSAGE("Compute");
// vector of nodes in which node index == netgen ID
vector< const SMDS_MeshNode* > nodeVec;
NETGENPlugin_NetgenLibWrapper ngLib;
// Changing netgen log_file putting it next to new_element_file
fs::path netgen_log_file = fs::path(new_element_file).remove_filename() / fs::path("NETGEN.out");
+ MESSAGE("netgen ouput"<<netgen_log_file.string());
ngLib.setOutputFile(netgen_log_file.string());
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;
importNetgenParams(hypo_file, myParams);
fillHyp(myParams);
-
MESSAGE("Meshing with netgen3d");
int ret = Compute(myShape, *myMesh, myParams,
new_element_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;
SMESH_ProxyMesh::Ptr proxyMesh,
NETGENPlugin_Internals &internals,
SMESH_MesherHelper &helper,
- std::map<const SMDS_MeshElement*, tuple<bool, bool>>& listElements
+ std::map<const SMDS_MeshElement*, tuple<bool, bool>, TIDCompare>& listElements
)
{
// To remove compilation warnings
// Get orientation
// Netgen requires that all the triangle point outside
isRev = elemOrientation[elem->GetID()];
- listElements[elem] = tuple(isRev, false);
+ listElements[elem] = tuple<bool, bool>(isRev, false);
}
return false;