#include "NETGENPlugin_Hypothesis_2D.hxx"
#include "NETGENPlugin_SimpleHypothesis_3D.hxx"
+#include <BRepBndLib.hxx>
#include <SMDS_FaceOfNodes.hxx>
#include <SMDS_LinearEdge.hxx>
#include <SMDS_MeshElement.hxx>
// Generate the mesh
// -------------------------
- _ngMesh = NULL;
+ //_ngMesh = NULL;
NETGENPlugin_ngMeshInfo initState; // it remembers size of ng mesh equal to size of Smesh
SMESH_Comment comment;
ngMesh->SetGeometry( shared_ptr<netgen::NetgenGeometry>( &occgeo, &NOOP_Deleter ));
+ ofstream MyFile("D:/plug.txt");
+ MyFile << "Before";
+ occgeo.BuildFMap();
+ MyFile << "\nAfter";
+
netgen::mparam.perfstepsstart = startWith;
netgen::mparam.perfstepsend = endWith;
std::shared_ptr<netgen::Mesh> meshPtr( ngMesh, &NOOP_Deleter );
+ MyFile << "\nGenMeshStart";
+
err = occgeo.GenerateMesh( meshPtr, netgen::mparam );
+ MyFile << "\nGenMeshEnd";
+ MyFile << err;
#else
#ifdef NETGEN_V5
#include "NETGENPlugin_Mesher.hxx"
#include "NETGENPlugin_Hypothesis_2D.hxx"
+#include <BRepBndLib.hxx>
+#include <TopExp.hxx>
#include <SMDS_MeshElement.hxx>
#include <SMDS_MeshNode.hxx>
#include <SMESHDS_Mesh.hxx>
bool NETGENPlugin_NETGEN_2D_ONLY::Compute(SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape)
{
+ ofstream File("D:/2D_ONLY.txt");
+ File << "Compute Start\t";
+
netgen::multithread.terminate = 0;
//netgen::multithread.task = "Surface meshing";
netgen::Mesh * ngMeshes[2] = { (netgen::Mesh*) ngLib._ngMesh, & ngMeshNoLocSize };
netgen::OCCGeometry occgeoComm;
+ File << "1";
// min / max sizes are set as follows:
// if ( _hypParameters )
// min and max are defined by the user
#endif
occgeoComm.face_maxh = netgen::mparam.maxh;
#ifdef NETGEN_V6
+ occgeoComm.BuildFMap();
+
netgen::OCCParameters occparam;
netgen::OCCSetLocalMeshSize( occgeoComm, *ngMeshes[0], netgen::mparam, occparam );
#else
// Loop on all FACEs
// ==================
+ File << "2";
vector< const SMDS_MeshNode* > nodeVec;
TopExp_Explorer fExp( aShape, TopAbs_FACE );
} // two attempts
} // loop on FACEs
+ File << "\tCompute End\n";
return true;
}