X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FNETGENPlugin%2FNETGENPlugin_Hypothesis.cxx;fp=src%2FNETGENPlugin%2FNETGENPlugin_Hypothesis.cxx;h=fe4c2eeae63b139c4a7459ef02af4ecccac5212e;hb=e1a0d0a23f4ae76cef3888df02e448877ebb8d19;hp=42ea851db7469ddb1808dfcb15944b342e9c4ec2;hpb=7d8f8a32b54f9da2f0261ce8fdd2c3ba38525ba8;p=plugins%2Fnetgenplugin.git diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx index 42ea851..fe4c2ee 100644 --- a/src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx @@ -247,6 +247,20 @@ void NETGENPlugin_Hypothesis::UnsetLocalSizeOnEntry(const std::string& entry) NotifySubMeshesHypothesisModification(); } +//============================================================================= +/*! + * + */ +//============================================================================= +void NETGENPlugin_Hypothesis::SetMeshSizeFile(const std::string& fileName) +{ + if ( fileName != _meshSizeFile ) + { + _meshSizeFile = fileName; + NotifySubMeshesHypothesisModification(); + } +} + //============================================================================= /*! * @@ -347,6 +361,8 @@ ostream & NETGENPlugin_Hypothesis::SaveTo(ostream & save) save << " " << _surfaceCurvature; save << " " << _fuseEdges; + save << " " << _meshSizeFile.size() << " " << _meshSizeFile; + return save; } @@ -432,19 +448,34 @@ istream & NETGENPlugin_Hypothesis::LoadFrom(istream & load) if ( !hasLocalSize && !option_or_sm.empty() ) _minSize = atof( option_or_sm.c_str() ); + else + load >> _minSize; - isOK = static_cast( load >> _quadAllowed ); - if ( !isOK ) + isOK = static_cast( load >> is ); + if ( isOK ) + _quadAllowed = (bool) is; + else _quadAllowed = GetDefaultQuadAllowed(); - isOK = static_cast( load >> _surfaceCurvature ); - if ( !isOK ) + isOK = static_cast( load >> is ); + if ( isOK ) + _surfaceCurvature = (bool) is; + else _surfaceCurvature = GetDefaultSurfaceCurvature(); - isOK = static_cast( load >> _fuseEdges ); - if ( !isOK ) + isOK = static_cast( load >> is ); + if ( isOK ) + _fuseEdges = (bool) is; + else _fuseEdges = GetDefaultFuseEdges(); + isOK = static_cast( load >> is >> std::ws ); // size of meshSizeFile + if ( isOK && is > 0 ) + { + _meshSizeFile.resize( is ); + load.get( &_meshSizeFile[0], is+1 ); + } + return load; }