Salome HOME
23340: [CEA 1945] The option Process 3D topology is missing in the dialog box
authoreap <eap@opencascade.com>
Thu, 8 Sep 2016 11:03:57 +0000 (14:03 +0300)
committereap <eap@opencascade.com>
Thu, 8 Sep 2016 11:03:57 +0000 (14:03 +0300)
src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx
src/GUI/BLSURFPlugin_msg_en.ts
src/GUI/BLSURFPlugin_msg_fr.ts

index d7c494fe82affda5bc5019f76a29ac3301dded6d..b32b2d2deeb29b2e28774fe93afc0513e4b36fc0 100644 (file)
@@ -141,6 +141,7 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, int studyId, SMESH_G
                                             "remove_duplicate_cad_faces",               // default = 1
                                             // "create_tag_on_collision",                  // default = 1
                                             "debug",                                    // default = 0 
+                                            "process_3d_topology",                      // default = 1
                                             // "remove_tiny_edges",                        // default = 0
                                             "" // mark of end
       };
@@ -206,6 +207,7 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, int studyId, SMESH_G
   _defaultOptionValues["rectify_jacobian"                       ] = "yes";
   _defaultOptionValues["respect_geometry"                       ] = "yes";
   _defaultOptionValues["tiny_edge_avoid_surface_intersections"  ] = "yes";
+  _defaultOptionValues["process_3d_topology"                    ] = "no";
   _defaultOptionValues["closed_geometry"                        ] = "no";
   _defaultOptionValues["debug"                                  ] = "no";
   _defaultOptionValues["discard_input_topology"                 ] = "no";
@@ -686,8 +688,7 @@ std::string BLSURFPlugin_Hypothesis::GetTags()
 //=============================================================================
 void BLSURFPlugin_Hypothesis::SetPreCADMergeEdges(bool theVal)
 {
-  if (theVal != _preCADMergeEdges) {
-//     SetTopology(PreCAD);
+  if (theVal != ToBool( GetPreCADOptionValue("merge_edges", GET_DEFAULT()))) {
     _preCADMergeEdges = theVal;
     SetPreCADOptionValue("merge_edges", theVal ? "yes" : "no" );
     NotifySubMeshesHypothesisModification();
@@ -698,7 +699,6 @@ void BLSURFPlugin_Hypothesis::SetPreCADMergeEdges(bool theVal)
 void BLSURFPlugin_Hypothesis::SetPreCADRemoveTinyUVEdges(bool theVal)
 {
   if (theVal != _preCADRemoveTinyUVEdges) {
-//     SetTopology(PreCAD);
     _preCADRemoveTinyUVEdges = theVal;
     NotifySubMeshesHypothesisModification();
   }
@@ -707,8 +707,7 @@ void BLSURFPlugin_Hypothesis::SetPreCADRemoveTinyUVEdges(bool theVal)
 //=============================================================================
 void BLSURFPlugin_Hypothesis::SetPreCADRemoveDuplicateCADFaces(bool theVal)
 {
-  if (theVal != _preCADRemoveDuplicateCADFaces) {
-    //     SetTopology(PreCAD);
+  if (theVal != ToBool( GetPreCADOptionValue("remove_duplicate_cad_faces", GET_DEFAULT()))) {
     _preCADRemoveDuplicateCADFaces = theVal;
     SetPreCADOptionValue("remove_duplicate_cad_faces", theVal ? "yes" : "no" );
     NotifySubMeshesHypothesisModification();
@@ -718,10 +717,9 @@ void BLSURFPlugin_Hypothesis::SetPreCADRemoveDuplicateCADFaces(bool theVal)
 //=============================================================================
 void BLSURFPlugin_Hypothesis::SetPreCADProcess3DTopology(bool theVal)
 {
-  if (theVal != _preCADProcess3DTopology) {
-    //     SetTopology(PreCAD);
+  if (theVal != ToBool( GetPreCADOptionValue("process_3d_topology", GET_DEFAULT()))) {
     _preCADProcess3DTopology = theVal;
-    AddPreCADOption("process_3d_topology", theVal ? "yes" : "no" );
+    SetPreCADOptionValue("process_3d_topology", theVal ? "yes" : "no" );
     NotifySubMeshesHypothesisModification();
   }
 }
@@ -729,8 +727,7 @@ void BLSURFPlugin_Hypothesis::SetPreCADProcess3DTopology(bool theVal)
 //=============================================================================
 void BLSURFPlugin_Hypothesis::SetPreCADDiscardInput(bool theVal)
 {
-  if (theVal != _preCADDiscardInput) {
-    //     SetTopology(PreCAD);
+  if (theVal != ToBool( GetPreCADOptionValue("discard_input_topology", GET_DEFAULT()))) {
     _preCADDiscardInput = theVal;
     SetPreCADOptionValue("discard_input_topology", theVal ? "yes" : "no" );
     NotifySubMeshesHypothesisModification();
@@ -750,10 +747,9 @@ bool BLSURFPlugin_Hypothesis::HasPreCADOptions(const BLSURFPlugin_Hypothesis* hy
            ToBool( hyp->GetPreCADOptionValue("discard_input_topology"    , &orDefault )) ||
            ToBool( hyp->GetPreCADOptionValue("merge_edges"               , &orDefault )) ||
            ToBool( hyp->GetPreCADOptionValue("remove_duplicate_cad_faces", &orDefault )) ||
-           ToBool( hyp->GetPreCADOption     ("process_3d_topology")      , &isOk       ) ||
+           ToBool( hyp->GetPreCADOptionValue("process_3d_topology"       , &orDefault )) ||
            ToBool( hyp->GetPreCADOption     ("manifold_geometry")        , &isOk       ) ||
-           hyp->GetPreCADOptionValue("sewing_tolerance") != "5e-4*D"                     ||
-           hyp->GetPreCADProcess3DTopology() );
+           hyp->GetPreCADOptionValue("sewing_tolerance") != "5e-4*D" );
 }
 
 //=============================================================================
@@ -2485,7 +2481,8 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) {
           break;
         }
       }
-      value.resize(len - 2); //cut off "%#"
+      if ( value[ len - 1] == '#' )
+        value.resize(len - 2); //cut off "%#"
     }
   }
 
@@ -2538,7 +2535,8 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) {
           break;
         }
       }
-      value.resize(len - 2); //cut off "%#"
+      if ( value[ len - 1] == '#' )
+        value.resize(len - 2); //cut off "%#"
       _customOption2value[optName] = value;
     }
   }
@@ -2591,7 +2589,8 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) {
           break;
         }
       }
-      value.resize(len - 2); //cut off "%#"
+      if ( value[ len - 1] == '#' )
+        value.resize(len - 2); //cut off "%#"
     }
   }
 
index fda49de1d8aa839978cc28e7d70e4d8da489841a..94feeb526189d501256f569e27fb016c84d507d9 100644 (file)
@@ -637,6 +637,10 @@ The smaller this distance is, the closer the mesh is to the exact surface (only
         <source>merge_edges</source>
         <translation>Merge edges</translation>
     </message>
+    <message>
+        <source>process_3d_topology</source>
+        <translation>Process 3D topology</translation>
+    </message>
     <message>
         <source>periodic_tolerance</source>
         <translation>Periodic tolerance</translation>
index ca4435fe93c9f983a998c14d83f54a5032df30d4..9a54905132fe94ce0fb52442f1a9c16231267f07 100755 (executable)
@@ -633,6 +633,10 @@ Plus la distance est petite, plus le maillage sera proche de la surface (disponi
         <source>discard_input_topology</source>
         <translation>discard_input_topology</translation>
     </message>
+    <message>
+        <source>process_3d_topology</source>
+        <translation>Nettoyer la CAO</translation>
+    </message>
     <message>
         <source>merge_edges</source>
         <translation>Fusion des arĂȘtes</translation>