Salome HOME
spns #28893 : add split_overconstrained_surface_edges MGCADSurf option in advanced...
[plugins/blsurfplugin.git] / src / BLSURFPlugin / BLSURFPlugin_Hypothesis.cxx
index 427b2557ddef5822241d1abbea0ed01aa1b398cd..4d4248ee1824f84123d9eda494eb4f46b09fc5e3 100644 (file)
@@ -166,6 +166,7 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, SMESH_Gen * gen, boo
                                             // but it is useful that the user can change it to disable all preprocessing options
                                             "remove_tiny_uv_edges",                        // default = 1
                                             "compute_ridges",                             // true
+                                            "split_overconstrained_surface_edges",        // default = 0
                                             "" // mark of end
       };
   const char* preCADintOptionNames[] = {    // "manifold_geometry",                        // default = 0
@@ -249,6 +250,7 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, SMESH_Gen * gen, boo
     _defaultOptionValues["remove_tiny_uv_edges"                   ] = "no";
     _defaultOptionValues["required_entities"                      ] = "respect";
     _defaultOptionValues["sewing_tolerance"                       ] = "5e-4*D";
+    _defaultOptionValues["split_overconstrained_surface_edges"    ] = "no";
     _defaultOptionValues["tags"                                   ] = "respect";
     _defaultOptionValues["compute_ridges"                         ] = "yes";
   }
@@ -830,8 +832,23 @@ CORBA::Double BLSURFPlugin_Hypothesis::GetSewingTolerance()
 {
   return ToDbl( GetPreCADOptionValue("sewing_tolerance", GET_DEFAULT()));
 }
+
+//=============================================================================
+void BLSURFPlugin_Hypothesis::SetSplitOverConstrainedSurfaceEdges( bool isOverConstrained )
+{
+  if ( GetSplitOverConstrainedSurfaceEdges() != isOverConstrained )
+  {
+    SetPreCADOptionValue("split_overconstrained_surface_edges", isOverConstrained ? "yes" : "no" );
+    NotifySubMeshesHypothesisModification();
+  }
+}
 //=============================================================================
+bool BLSURFPlugin_Hypothesis::GetSplitOverConstrainedSurfaceEdges()
+{
+  return ToBool( GetPreCADOptionValue("split_overconstrained_surface_edges", GET_DEFAULT()));
+}
 
+//=============================================================================
 void BLSURFPlugin_Hypothesis::SetTags( const std::string& howToTreat )
 {
   if ( howToTreat != "respect" && howToTreat != "ignore" && howToTreat != "clear"  )