]> SALOME platform Git repositories - plugins/ghs3dplugin.git/commitdiff
Salome HOME
22608: [CEA 1158] GHS3DPLUGIN default optimization level
authoreap <eap@opencascade.com>
Mon, 23 Jun 2014 14:50:19 +0000 (18:50 +0400)
committereap <eap@opencascade.com>
Mon, 23 Jun 2014 14:50:19 +0000 (18:50 +0400)
src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx

index c79236509e1f7bfdad609f58c72e77bc55d261f8..646362dd3dd234d963183e2c0085a6b743e57939 100644 (file)
@@ -1510,18 +1510,22 @@ std::string GHS3DPlugin_Hypothesis::CommandToRun(const GHS3DPlugin_Hypothesis* h
         cmd += " -c 1";
     }
   }
+  const bool toCreateNewNodes = ( p0 && ( !hyp || hyp->myToCreateNewNodes ));
 
   // optimization level
-  if ( o && hyp && !useBndRecovery ) {
+  if ( o && hyp && !useBndRecovery && toCreateNewNodes ) {
     if ( hyp->myOptimizationLevel >= 0 && hyp->myOptimizationLevel < 5 ) {
       const char* level[] = { "none" , "light" , "standard" , "standard+" , "strong" };
       cmd += " -o ";
       cmd += level[ hyp->myOptimizationLevel ];
     }
   }
+  if ( !toCreateNewNodes ) {
+    cmd += " -o none"; // issue 22608
+  }
 
   // to create internal nodes
-  if ( p0 && hyp && !hyp->myToCreateNewNodes ) {
+  if ( p0 && !toCreateNewNodes ) {
     cmd += " -p0";
   }