]> SALOME platform Git repositories - plugins/blsurfplugin.git/commitdiff
Salome HOME
0022207: EDF 2182 BLSURFPLUGIN: The user is allowed to enter 0 as a global or local...
authoreap <eap@opencascade.com>
Fri, 17 May 2013 13:08:06 +0000 (13:08 +0000)
committereap <eap@opencascade.com>
Fri, 17 May 2013 13:08:06 +0000 (13:08 +0000)
Attempt No 1

src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx
src/GUI/BLSURFPlugin_msg_en.ts

index a1099f6864f292c49803003bac8f34de0e3f20b5..21786b655dad2b1895d6f46c3c22d455bcf20393 100644 (file)
@@ -533,10 +533,41 @@ bool BLSURFPluginGUI_HypothesisCreator::checkParams(QString& msg) const
         else {
           ok = false;
         }
+        if ( ok && sizeMap.toDouble() <= 0.0 )
+        {
+          msg = tr("ZERO_VALUE_OF").arg( tr("SMP_SIZEMAP_COLUMN"));
+          ok = false;
+        }
       }
     }
   }
 
+  // 22207: BLSURFPLUGIN: The user is allowed to enter 0 as a global or local size.
+  if ( ok )
+  {
+    if ( !( ok = ( myStdWidget->myPhySize->text().isEmpty() ||
+                   myStdWidget->myPhySize->text().toDouble() > 0.0 )))
+      msg = tr("ZERO_VALUE_OF").arg( tr("BLSURF_HPHYDEF"));
+  }
+  if ( ok )
+  {
+    if ( !( ok = ( myStdWidget->myMaxSize->text().isEmpty() ||
+                   myStdWidget->myMaxSize->text().toDouble() > 0.0 )))
+      msg = tr("ZERO_VALUE_OF").arg( tr("BLSURF_MAXSIZE"));
+  }
+  if ( ok )
+  {
+    if ( !( ok = ( myStdWidget->myAngleMesh->text().isEmpty() ||
+                   myStdWidget->myAngleMesh->text().toDouble() > 0.0 )))
+      msg = tr("ZERO_VALUE_OF").arg( tr("BLSURF_ANGLE_MESH"));
+  }
+  if ( ok )
+  {
+    if ( !( ok = ( myStdWidget->myChordalError->text().isEmpty() ||
+                   myStdWidget->myChordalError->text().toDouble() > 0.0 )))
+      msg = tr("ZERO_VALUE_OF").arg( tr("BLSURF_CHORDAL_ERROR"));
+  }
+
   // Enforced vertices
   // TODO
 
index 767eb12880eeb45a13989003058a48228da3fd87..6d24616ab182dd08dd7548de33f8dd7742bcdc64 100644 (file)
@@ -430,5 +430,9 @@ The smaller this distance is, the closer the mesh is to the exact surface (only
         <source>BLSURF_ENF_VER_INTERNAL_VERTICES</source>
         <translation>Use internal vertices of all faces</translation>
     </message>
+    <message>
+        <source>ZERO_VALUE_OF</source>
+        <translation>Invalid value (zero) of "%1"</translation>
+    </message>
 </context>
 </TS>