From 4e68d0a445f88427ad70eb0b39d7b1ffa83b1ef7 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 17 May 2013 13:08:06 +0000 Subject: [PATCH] 0022207: EDF 2182 BLSURFPLUGIN: The user is allowed to enter 0 as a global or local size. Attempt No 1 --- src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx | 31 +++++++++++++++++++ src/GUI/BLSURFPlugin_msg_en.ts | 4 +++ 2 files changed, 35 insertions(+) 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" + -- 2.39.2