+ *
+ */
+//=============================================================================
+NETGENPlugin_RemesherHypothesis_2D::
+NETGENPlugin_RemesherHypothesis_2D (int hypId, SMESH_Gen * gen)
+ : NETGENPlugin_Hypothesis(hypId, gen),
+ _ridgeAngle ( DefaultRidgeAngle() ),
+ _edgeCornerAngle ( DefaultEdgeCornerAngle() ),
+ _chartAngle ( DefaultChartAngle() ),
+ _outerChartAngle ( DefaultOuterChartAngle() ),
+ _restHChartDistFactor ( DefaultRestHChartDistFactor() ),
+ _restHChartDistEnable ( DefaultRestHChartDistEnable() ),
+ _restHLineLengthFactor ( DefaultRestHLineLengthFactor() ),
+ _restHLineLengthEnable ( DefaultRestHLineLengthEnable() ),
+ _restHCloseEdgeFactor ( DefaultRestHCloseEdgeFactor() ),
+ _restHCloseEdgeEnable ( DefaultRestHCloseEdgeEnable() ),
+ _restHSurfCurvFactor ( DefaultRestHSurfCurvFactor() ),
+ _restHSurfCurvEnable ( DefaultRestHSurfCurvEnable() ),
+ _restHEdgeAngleFactor ( DefaultRestHEdgeAngleFactor() ),
+ _restHEdgeAngleEnable ( DefaultRestHEdgeAngleEnable() ),
+ _restHSurfMeshCurvFactor( DefaultRestHSurfMeshCurvFactor()),
+ _restHSurfMeshCurvEnable( DefaultRestHSurfMeshCurvEnable()),
+ _keepExistingEdges ( DefaultKeepExistingEdges() ),
+ _makeGroupsOfSurfaces ( DefaultMakeGroupsOfSurfaces() ),
+ _fixedEdgeGroupID ( -1 ),
+ _loadOnCancel ( false )
+{
+ _name = "NETGEN_RemesherParameters_2D";
+ _param_algo_dim = 2;
+}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetRidgeAngle( double angle )
+{
+ if ( _ridgeAngle != angle )
+ {
+ _ridgeAngle = angle;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetEdgeCornerAngle
+//purpose :
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetEdgeCornerAngle( double angle )
+{
+ if ( _edgeCornerAngle != angle )
+ {
+ _edgeCornerAngle = angle;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetChartAngle
+//purpose :
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetChartAngle( double angle )
+{
+ if ( _chartAngle != angle )
+ {
+ _chartAngle = angle;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetOuterChartAngle
+//purpose :
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetOuterChartAngle( double angle )
+{
+ if ( _outerChartAngle != angle )
+ {
+ _outerChartAngle = angle;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetRestHChartDistFactor
+//purpose :
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetRestHChartDistFactor( double f )
+{
+ if ( _restHChartDistFactor != f )
+ {
+ _restHChartDistFactor = f;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetRestHChartDistEnable
+//purpose :
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetRestHChartDistEnable( bool enable )
+{
+ if ( _restHChartDistEnable != enable )
+ {
+ _restHChartDistEnable = enable;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetRestHLineLengthFactor
+//purpose :
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetRestHLineLengthFactor( double f )
+{
+ if ( _restHLineLengthFactor != f )
+ {
+ _restHLineLengthFactor = f;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetRestHLineLengthEnable
+//purpose :
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetRestHLineLengthEnable( bool enable )
+{
+ if ( _restHLineLengthEnable != enable )
+ {
+ _restHLineLengthEnable = enable;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetRestHCloseEdgeFactor
+//purpose :
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetRestHCloseEdgeFactor( double f )
+{
+ if ( _restHCloseEdgeFactor != f )
+ {
+ _restHCloseEdgeFactor = f;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetRestHCloseEdgeEnable
+//purpose :
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetRestHCloseEdgeEnable( bool enable )
+{
+ if ( _restHCloseEdgeEnable != enable )
+ {
+ _restHCloseEdgeEnable = enable;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetRestHSurfCurvFactor
+//purpose :
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetRestHSurfCurvFactor( double f )
+{
+ if ( _restHSurfCurvFactor != f )
+ {
+ _restHSurfCurvFactor = f;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetRestHSurfCurvEnable
+//purpose :
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetRestHSurfCurvEnable( bool enable )
+{
+ if ( _restHSurfCurvEnable != enable )
+ {
+ _restHSurfCurvEnable = enable;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetRestHEdgeAngleFactor
+//purpose :
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetRestHEdgeAngleFactor( double f )
+{
+ if ( _restHEdgeAngleFactor != f )
+ {
+ _restHEdgeAngleFactor = f;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetRestHEdgeAngleEnable
+//purpose :
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetRestHEdgeAngleEnable( bool enable )
+{
+ if ( _restHEdgeAngleEnable != enable )
+ {
+ _restHEdgeAngleEnable = enable;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetRestHSurfMeshCurvFactor
+//purpose :
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetRestHSurfMeshCurvFactor( double f )
+{
+ if ( _restHSurfMeshCurvFactor != f )
+ {
+ _restHSurfMeshCurvFactor = f;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetRestHSurfMeshCurvEnable
+//purpose :
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetRestHSurfMeshCurvEnable( bool enable )
+{
+ if ( _restHSurfMeshCurvEnable != enable )
+ {
+ _restHSurfMeshCurvEnable = enable;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetKeepExistingEdges
+//purpose :
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetKeepExistingEdges( bool toKeep )
+{
+ if ( _keepExistingEdges != toKeep )
+ {
+ _keepExistingEdges = toKeep;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetMakeGroupsOfSurfaces
+//purpose :
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetMakeGroupsOfSurfaces( bool toMake )
+{
+ if ( _makeGroupsOfSurfaces != toMake )
+ {
+ _makeGroupsOfSurfaces = toMake;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetFixedEdgeGroup
+//purpose : Set a group of edges whose nodes must not be moved
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetFixedEdgeGroup( const SMESH_Group* edgeGroup )
+{
+ int id = edgeGroup ? edgeGroup->GetID() : -1;
+ if ( id != _fixedEdgeGroupID )
+ {
+ _fixedEdgeGroupID = id;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetLoadMeshOnCancel
+//purpose : allow getting a current mesh existing upon CancelCompute()
+//=======================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D::SetLoadMeshOnCancel( bool toLoad )
+{
+ if ( toLoad != _loadOnCancel )
+ {
+ _loadOnCancel = toLoad;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : GetFixedEdgeGroup
+//purpose : Return a group of edges whose nodes must not be moved
+//=======================================================================
+
+SMESH_Group*
+NETGENPlugin_RemesherHypothesis_2D::GetFixedEdgeGroup( const SMESH_Mesh& mesh ) const
+{
+ SMESH_Group* group = mesh.GetGroup( _fixedEdgeGroupID );
+ if ( group && group->GetGroupDS()->GetType() != SMDSAbs_Edge )
+ group = NULL;
+
+ return group;
+}
+
+//=============================================================================
+/*!
+ *