From: nge Date: Wed, 26 Aug 2009 14:52:13 +0000 (+0000) Subject: Gradation parameter is now allowed for Physical mesh. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5a7e2f62584a6864055ee2258cee0afecd733d9a;p=plugins%2Fblsurfplugin.git Gradation parameter is now allowed for Physical mesh. --- diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx index ae1d60e..92bb519 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx @@ -51,7 +51,7 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis (int hypId, int studyId, // to desable writing boundaries //_phyMin = _phyMax = _hgeoMin = _hgeoMax = undefinedDouble(); - + const char* intOptionNames[] = { "addsurf_ivertex", @@ -122,7 +122,7 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis (int hypId, int studyId, _charOptions.insert( charOptionNames[i] ); _option2value[ charOptionNames[i++] ].clear(); } - + _sizeMap.clear(); } @@ -144,6 +144,7 @@ void BLSURFPlugin_Hypothesis::SetPhysicalMesh(PhysicalMesh thePhysicalMesh) case DefaultSize: default: _phySize = GetDefaultPhySize(); + _gradation = GetDefaultGradation(); break; } NotifySubMeshesHypothesisModification(); @@ -407,9 +408,9 @@ std::ostream & BLSURFPlugin_Hypothesis::SaveTo(std::ostream & save) << " " << (int)_physicalMesh << " " << (int)_geometricMesh << " " << _phySize - << " " << _angleMeshS - << " " << _gradation - << " " << (int)_quadAllowed + << " " << _angleMeshS + << " " << _gradation + << " " << (int)_quadAllowed << " " << (int)_decimesh; save << " " << _phyMin << " " << _phyMax @@ -448,8 +449,8 @@ std::ostream & BLSURFPlugin_Hypothesis::SaveTo(std::ostream & save) } save << " " << "__ATTRACTORS_END__"; } - - + + return save; } @@ -513,31 +514,31 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) _phyMin = val; else load.clear(std::ios::badbit | load.rdstate()); - + isOK = (load >> val); if (isOK) _phyMax = val; else load.clear(std::ios::badbit | load.rdstate()); - + isOK = (load >> val); if (isOK) _angleMeshC = val; else load.clear(std::ios::badbit | load.rdstate()); - + isOK = (load >> val); if (isOK) _hgeoMin = val; else load.clear(std::ios::badbit | load.rdstate()); - + isOK = (load >> val); if (isOK) _hgeoMax = val; else load.clear(std::ios::badbit | load.rdstate()); - + isOK = (load >> i); if (isOK) _verb = i; diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx index 4aafa29..4a75b44 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx @@ -965,22 +965,19 @@ void BLSURFPluginGUI_HypothesisCreator::onGeometricMeshChanged() { bool isCustom = (myGeometricMesh->currentIndex() == UserDefined); myAngleMeshS->setEnabled(isCustom); myAngleMeshC->setEnabled(isCustom); - myGradation->setEnabled(isCustom); myGeoMax->setEnabled(isCustom); myGeoMin->setEnabled(isCustom); if ( ! isCustom ) { - double aAngleMeshS, aGradation; + double aAngleMeshS; switch( myGeometricMesh->currentIndex() ) { case DefaultGeom: default: aAngleMeshS = 8; - aGradation = 1.1; break; } myAngleMeshS->setValue( aAngleMeshS ); myAngleMeshC->setValue( aAngleMeshS ); - myGradation->setValue( aGradation ); if ( !isDouble( myGeoMin->text(), true )) myGeoMin->setText(""); if ( !isDouble( myGeoMax->text(), true ))