X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FNETGENPlugin%2FNETGENPlugin_Mesher.hxx;fp=src%2FNETGENPlugin%2FNETGENPlugin_Mesher.hxx;h=af7d9716651f256757bd8059d5b03648032eec7d;hb=e0e2b32c557f598632abab301ff3b38817588b67;hp=48ea1ec6f03edb6755e5d0a36460855748b16471;hpb=acbb35b4c3ff446320464c86cfbfe9e6909ee2ae;p=plugins%2Fnetgenplugin.git diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.hxx b/src/NETGENPlugin/NETGENPlugin_Mesher.hxx index 48ea1ec..af7d971 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.hxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.hxx @@ -58,6 +58,8 @@ class TopoDS_Shape; namespace netgen { class OCCGeometry; class Mesh; + class MeshingParameters; + extern MeshingParameters mparam; } //============================================================================= /*! @@ -92,12 +94,19 @@ struct NETGENPLUGIN_EXPORT NETGENPlugin_NetgenLibWrapper void setMesh( nglib::Ng_Mesh* mesh ); nglib::Ng_Mesh* ngMesh() { return (nglib::Ng_Mesh*)(void*)_ngMesh; } + + static int GenerateMesh(netgen::OCCGeometry& occgeo, int startWith, int endWith, - netgen::Mesh* & ngMesh); + netgen::Mesh* & ngMesh, netgen::MeshingParameters & mparam); int GenerateMesh(netgen::OCCGeometry& occgeo, int startWith, int endWith ) { - return GenerateMesh( occgeo, startWith, endWith, _ngMesh ); + + return GenerateMesh( occgeo, startWith, endWith, _ngMesh, netgen::mparam ); } + static int GenerateMesh(netgen::OCCGeometry& occgeo, int startWith, int endWith, + netgen::Mesh* & ngMesh){ + return GenerateMesh(occgeo, startWith, endWith, ngMesh, netgen::mparam); + }; static void CalcLocalH( netgen::Mesh * ngMesh ); static void RemoveTmpFiles(); @@ -119,7 +128,7 @@ struct NETGENPLUGIN_EXPORT NETGENPlugin_NetgenLibWrapper */ //============================================================================= -class NETGENPLUGIN_EXPORT NETGENPlugin_Mesher +class NETGENPLUGIN_EXPORT NETGENPlugin_Mesher { public: // ---------- PUBLIC METHODS ---------- @@ -130,6 +139,7 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_Mesher void SetSelfPointer( NETGENPlugin_Mesher ** ptr ); void SetParameters(const NETGENPlugin_Hypothesis* hyp); + void SetParameters(const NETGENPlugin_Hypothesis* hyp, netgen::MeshingParameters &mparams); void SetParameters(const NETGENPlugin_SimpleHypothesis_2D* hyp); void SetParameters(const StdMeshers_ViscousLayers* hyp ); void SetViscousLayers2DAssigned(bool isAssigned) { _isViscousLayers2D = isAssigned; } @@ -201,6 +211,7 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_Mesher const bool overrideMinH=true); void SetDefaultParameters(); + void SetDefaultParameters(netgen::MeshingParameters &mparams); static SMESH_ComputeErrorPtr ReadErrors(const std::vector< const SMDS_MeshNode* >& nodeVec); @@ -272,7 +283,7 @@ public: bool isShapeToPrecompute(const TopoDS_Shape& s); // 2D meshing - // edges + // edges bool hasInternalEdges() const { return !_e2face.empty(); } bool isInternalEdge( int id ) const { return _e2face.count( id ); } const std::map& getEdgesAndVerticesWithFaces() const { return _e2face; }