#define OCCGEOMETRY
#endif
#include <occgeom.hpp>
+#include <ngexception.hpp>
namespace nglib {
#include <nglib.h>
}
*/
//=============================================================================
-NETGENPlugin_NETGEN_3D::NETGENPlugin_NETGEN_3D(int hypId, int studyId,
- SMESH_Gen* gen)
- : SMESH_3D_Algo(hypId, studyId, gen)
+NETGENPlugin_NETGEN_3D::NETGENPlugin_NETGEN_3D(int hypId, SMESH_Gen* gen)
+ : SMESH_3D_Algo(hypId, gen)
{
_name = "NETGEN_3D";
_shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID);// 1 bit /shape type
{
aMesher.SetParameters( _hypParameters );
- if ( !_hypParameters->GetLocalSizesAndEntries().empty() )
+ if ( !_hypParameters->GetLocalSizesAndEntries().empty() ||
+ !_hypParameters->GetMeshSizeFile().empty() )
{
if ( ! &ngMesh->LocalHFunction() )
{
ngMesh->SetLocalH( pmin, pmax, _hypParameters->GetGrowthRate() );
}
aMesher.SetLocalSize( occgeo, *ngMesh );
+
+ try {
+ ngMesh->LoadLocalMeshSize( netgen::mparam.meshsizefilename );
+ } catch (netgen::NgException & ex) {
+ return error( COMPERR_BAD_PARMETERS, ex.What() );
+ }
}
if ( !_hypParameters->GetOptimize() )
endWith = netgen::MESHCONST_MESHVOLUME;