+void BLSURFPlugin_Hypothesis::SetEnforceCadEdgesSize( bool toEnforce )
+{
+ if ( GetEnforceCadEdgesSize() != toEnforce )
+ {
+ SetOptionValue( "enforce_cad_edge_sizes", toEnforce ? "yes" : "no" );
+ NotifySubMeshesHypothesisModification();
+ }
+}
+//=============================================================================
+bool BLSURFPlugin_Hypothesis::GetEnforceCadEdgesSize()
+{
+ return ToBool( GetOptionValue( "enforce_cad_edge_sizes" ), GET_DEFAULT() );
+}
+//=============================================================================
+
+void BLSURFPlugin_Hypothesis::SetJacobianRectificationRespectGeometry( bool allowRectification )
+{
+ if ( GetJacobianRectificationRespectGeometry() != allowRectification )
+ {
+ SetOptionValue("jacobian_rectification_respect_geometry", allowRectification ? "yes" : "no" );
+ NotifySubMeshesHypothesisModification();
+ }
+}
+//=============================================================================
+bool BLSURFPlugin_Hypothesis::GetJacobianRectificationRespectGeometry()
+{
+ return ToBool( GetOptionValue("jacobian_rectification_respect_geometry", GET_DEFAULT()));
+}
+//=============================================================================
+
+void BLSURFPlugin_Hypothesis::SetJacobianRectification( bool allowRectification )
+{
+ if ( GetJacobianRectification() != allowRectification )
+ {
+ SetOptionValue( "rectify_jacobian", allowRectification ? "yes" : "no" );
+ NotifySubMeshesHypothesisModification();
+ }
+}
+//=============================================================================
+bool BLSURFPlugin_Hypothesis::GetJacobianRectification()
+{
+ return ToBool( GetOptionValue("rectify_jacobian", GET_DEFAULT()));
+}
+//=============================================================================
+
+void BLSURFPlugin_Hypothesis::SetMaxNumberOfPointsPerPatch( int nb )
+ throw (std::invalid_argument)
+{
+ if ( nb < 0 )
+ throw std::invalid_argument( SMESH_Comment("Invalid number of points: ") << nb );
+
+ if ( GetMaxNumberOfPointsPerPatch() != nb )
+ {
+ SetOptionValue("max_number_of_points_per_patch", SMESH_Comment( nb ));
+ NotifySubMeshesHypothesisModification();
+ }
+}
+//=============================================================================
+int BLSURFPlugin_Hypothesis::GetMaxNumberOfPointsPerPatch()
+{
+ return ToInt( GetOptionValue("max_number_of_points_per_patch", GET_DEFAULT()));
+}
+//=============================================================================
+
+void BLSURFPlugin_Hypothesis::SetRespectGeometry( bool toRespect )
+{
+ if ( GetRespectGeometry() != toRespect )
+ {
+ SetOptionValue("respect_geometry", toRespect ? "yes" : "no" );
+ NotifySubMeshesHypothesisModification();
+ }
+}
+//=============================================================================
+bool BLSURFPlugin_Hypothesis::GetRespectGeometry()
+{
+ return ToBool( GetOptionValue( "respect_geometry", GET_DEFAULT()));
+}
+//=============================================================================
+
+void BLSURFPlugin_Hypothesis::SetTinyEdgesAvoidSurfaceIntersections( bool toAvoidIntersection )
+{
+ if ( GetTinyEdgesAvoidSurfaceIntersections() != toAvoidIntersection )
+ {
+ SetOptionValue("tiny_edge_avoid_surface_intersections", toAvoidIntersection ? "yes" : "no" );
+ NotifySubMeshesHypothesisModification();
+ }
+}
+//=============================================================================
+bool BLSURFPlugin_Hypothesis::GetTinyEdgesAvoidSurfaceIntersections()
+{
+ return ToBool( GetOptionValue("tiny_edge_avoid_surface_intersections", GET_DEFAULT()));
+}
+//=============================================================================
+
+void BLSURFPlugin_Hypothesis::SetClosedGeometry( bool isClosed )
+{
+ if ( GetClosedGeometry() != isClosed )
+ {
+ SetPreCADOptionValue("closed_geometry", isClosed ? "yes" : "no" );
+ NotifySubMeshesHypothesisModification();
+ }
+}
+//=============================================================================
+bool BLSURFPlugin_Hypothesis::GetClosedGeometry()
+{
+ return ToBool( GetPreCADOptionValue( "closed_geometry", GET_DEFAULT()));
+}
+//=============================================================================
+
+void BLSURFPlugin_Hypothesis::SetDebug( bool isDebug )
+{
+ if ( GetDebug() != isDebug )
+ {
+ SetPreCADOptionValue("debug", isDebug ? "yes" : "no" );
+ NotifySubMeshesHypothesisModification();
+ }
+}
+//=============================================================================
+bool BLSURFPlugin_Hypothesis::GetDebug()
+{
+ return ToBool( GetPreCADOptionValue("debug", GET_DEFAULT()));
+}
+//=============================================================================
+
+void BLSURFPlugin_Hypothesis::SetPeriodicTolerance( CORBA::Double tol )
+ throw (std::invalid_argument)
+{
+ if ( tol <= 0 )
+ throw std::invalid_argument( SMESH_Comment("Invalid tolerance: ") << tol );
+ if ( GetPeriodicTolerance() != tol )
+ {
+ SetPreCADOptionValue("periodic_tolerance", SMESH_Comment( tol ) );
+ NotifySubMeshesHypothesisModification();
+ }
+}
+//=============================================================================
+double BLSURFPlugin_Hypothesis::GetPeriodicTolerance()
+{
+ return ToDbl( GetPreCADOptionValue( "periodic_tolerance", GET_DEFAULT()));
+}
+//=============================================================================
+
+void BLSURFPlugin_Hypothesis::SetRequiredEntities( const std::string& howToTreat )
+ throw (std::invalid_argument)
+{
+ if ( howToTreat != "respect" && howToTreat != "ignore" && howToTreat != "clear" )
+ throw std::invalid_argument
+ ( SMESH_Comment("required_entities must be in ['respect','ignore','clear'] "));
+
+ if ( GetRequiredEntities() != howToTreat )
+ {
+ SetPreCADOptionValue("required_entities", howToTreat );
+ NotifySubMeshesHypothesisModification();
+ }
+}
+//=============================================================================
+std::string BLSURFPlugin_Hypothesis::GetRequiredEntities()
+{
+ return GetPreCADOptionValue("required_entities", GET_DEFAULT());
+}
+//=============================================================================
+
+void BLSURFPlugin_Hypothesis::SetSewingTolerance( CORBA::Double tol )
+ throw (std::invalid_argument)
+{
+ if ( tol <= 0 )
+ throw std::invalid_argument( SMESH_Comment("Invalid tolerance: ") << tol );
+ if ( GetSewingTolerance() != tol )
+ {
+ SetPreCADOptionValue("sewing_tolerance", SMESH_Comment( tol ) );
+ NotifySubMeshesHypothesisModification();
+ }
+}
+//=============================================================================
+CORBA::Double BLSURFPlugin_Hypothesis::GetSewingTolerance()
+{
+ return ToDbl( GetPreCADOptionValue("sewing_tolerance", GET_DEFAULT()));
+}
+//=============================================================================
+
+void BLSURFPlugin_Hypothesis::SetTags( const std::string& howToTreat )
+ throw (std::invalid_argument)
+{
+ if ( howToTreat != "respect" && howToTreat != "ignore" && howToTreat != "clear" )
+ throw std::invalid_argument
+ ( SMESH_Comment("'tags' must be in ['respect','ignore','clear'] "));
+
+ if ( GetTags() != howToTreat )
+ {
+ SetPreCADOptionValue("tags", howToTreat );
+ NotifySubMeshesHypothesisModification();
+ }
+}
+//=============================================================================
+std::string BLSURFPlugin_Hypothesis::GetTags()
+{
+ return GetPreCADOptionValue("tags", GET_DEFAULT());
+}
+//=============================================================================
+void BLSURFPlugin_Hypothesis::SetPreCADMergeEdges(bool theVal)
+{