From: eap Date: Fri, 17 May 2013 13:08:06 +0000 (+0000) Subject: 0022207: EDF 2182 BLSURFPLUGIN: The user is allowed to enter 0 as a global or local... X-Git-Tag: V7_3_0a1~42 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4e68d0a445f88427ad70eb0b39d7b1ffa83b1ef7;p=plugins%2Fblsurfplugin.git 0022207: EDF 2182 BLSURFPLUGIN: The user is allowed to enter 0 as a global or local size. Attempt No 1 --- diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx index a1099f6..21786b6 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx @@ -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 diff --git a/src/GUI/BLSURFPlugin_msg_en.ts b/src/GUI/BLSURFPlugin_msg_en.ts index 767eb12..6d24616 100644 --- a/src/GUI/BLSURFPlugin_msg_en.ts +++ b/src/GUI/BLSURFPlugin_msg_en.ts @@ -430,5 +430,9 @@ The smaller this distance is, the closer the mesh is to the exact surface (only BLSURF_ENF_VER_INTERNAL_VERTICES Use internal vertices of all faces + + ZERO_VALUE_OF + Invalid value (zero) of "%1" +