]> SALOME platform Git repositories - plugins/blsurfplugin.git/commitdiff
Salome HOME
spns #28893 : add split_overconstrained_surface_edges MGCADSurf option in advanced... spns/28893
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Thu, 15 Sep 2022 09:52:50 +0000 (11:52 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Thu, 15 Sep 2022 09:52:50 +0000 (11:52 +0200)
src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx
src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx
src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx
src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx
src/GUI/BLSURFPlugin_msg_en.ts
src/GUI/BLSURFPlugin_msg_fr.ts
src/GUI/BLSURFPlugin_msg_ja.ts

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"  )
index a11f284404ca22fc0690edd9caf148bfb8b2f236..982d1b7027d10172e0d0561885e4ab753355afe2 100644 (file)
@@ -220,6 +220,9 @@ public:
   void SetSewingTolerance( double tol );
   double GetSewingTolerance();
 
+  void SetSplitOverConstrainedSurfaceEdges( bool isOverConstrained );
+  bool GetSplitOverConstrainedSurfaceEdges();
+
   void SetTags( const std::string& howToTreat );
   std::string GetTags();
 
index a38fb1e86feeb9780b3c7a9038313e1b8adb6dcf..342f76ea09ee36ebc157f864d51b7318739f2793 100644 (file)
@@ -1411,6 +1411,20 @@ CORBA::Double BLSURFPlugin_Hypothesis_i::GetSewingTolerance()
   return -1;
 }
 //=============================================================================
+void BLSURFPlugin_Hypothesis_i::SetSplitOverConstrainedSurfaceEdges( CORBA::Boolean isOverConstrained )
+{
+  if ( GetSplitOverConstrainedSurfaceEdges() != isOverConstrained )
+  {
+    this->GetImpl()->SetSplitOverConstrainedSurfaceEdges(isOverConstrained);
+    SMESH::TPythonDump() << _this() << ".SetSplitOverConstrainedSurfaceEdges( " << isOverConstrained << " )";
+  }
+}
+//=============================================================================
+CORBA::Boolean BLSURFPlugin_Hypothesis_i::GetSplitOverConstrainedSurfaceEdges()
+{
+  return this->GetImpl()->GetSplitOverConstrainedSurfaceEdges();
+}
+//=============================================================================
 
 void BLSURFPlugin_Hypothesis_i::SetTags( const char* howToTreat )
 {
index a8333f3f6830220965b8d0770cffb3c18776a66c..1d8d2cda5e6dabdbfa607f70afb85b1d82bb6cc0 100644 (file)
@@ -218,6 +218,9 @@ public:
   void SetSewingTolerance( CORBA::Double tol );
   CORBA::Double GetSewingTolerance();
 
+  void SetSplitOverConstrainedSurfaceEdges( CORBA::Boolean isClosed );
+  CORBA::Boolean GetSplitOverConstrainedSurfaceEdges();
+
   void SetTags( const char* howToTreat );
   char* GetTags();
 
index 537e927db588695bb65fbaf55e2c578755f9025c..1bb5ed9c864b8c244a787ada6cd015a7e60c9776 100644 (file)
@@ -804,6 +804,10 @@ The smaller this distance is, the closer the mesh is to the exact surface (only
         <source>sewing_tolerance</source>
         <translation>Sewing tolerance</translation>
     </message>
+    <message>
+        <source>split_overconstrained_surface_edges</source>
+        <translation>Split triangles at edges</translation>
+    </message>
     <message>
         <source>tags</source>
         <translation>Tags</translation>
index 8bff08128162af57a2acd8443990f69a0c63bca7..d9b855394a66b3e4cf34cab8e40ab78b2029c5b5 100644 (file)
@@ -773,6 +773,10 @@ Plus la distance est petite, plus le maillage sera proche de la surface (disponi
         <source>sewing_tolerance</source>
         <translation>Tolérance de fusion</translation>
     </message>
+    <message>
+        <source>split_overconstrained_surface_edges</source>
+        <translation>Division triangles au bord</translation>
+    </message>
     <message>
         <source>tags</source>
         <translation>Etiquettes</translation>
index 3fb6a316077046d94417f71caea18be920dd2d97..92f61a8e6e17c9ebb660af32e9d62a7e4a002b53 100644 (file)
       <source>sewing_tolerance</source>
       <translation>繕いのトレランス</translation>
     </message>
+    <message>
+        <source>split_overconstrained_surface_edges</source>
+        <translation>三角形を分割する</translation>
+    </message>
     <message>
       <source>tags</source>
       <translation>タグ</translation>