**************************************************/
-class QDoubleValidator;
-
//
// BEGIN EnforcedTreeWidgetDelegate
//
const QStyleOptionViewItem & option ,
const QModelIndex & index ) const
{
-// QLineEdit *editor = new QLineEdit(parent);
if (index.column() == ENF_VER_X_COLUMN || \
index.column() == ENF_VER_Y_COLUMN || \
index.column() == ENF_VER_Z_COLUMN)
editor->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
return editor;
}
-// editor->setValidator(new QDoubleValidator(parent));
else
{
QLineEdit *editor = new QLineEdit(parent);
return editor;
}
-// return editor;
}
void EnforcedTreeWidgetDelegate::setEditorData(QWidget *editor,
index.column() == ENF_VER_Z_COLUMN) {
SMESHGUI_SpinBox *lineEdit = static_cast<SMESHGUI_SpinBox*>(editor);
lineEdit->setText(value);
-// lineEdit->editor()->setText(value);
}
else {
QLineEdit *lineEdit = static_cast<QLineEdit*>(editor);
void EnforcedTreeWidgetDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const
{
-// QLineEdit *lineEdit = static_cast<QLineEdit*>(editor);
-
if (index.column() == ENF_VER_X_COLUMN || \
index.column() == ENF_VER_Y_COLUMN || \
index.column() == ENF_VER_Z_COLUMN)
if (! vertexExists(model, index, value)) {
model->setData(index, value, Qt::EditRole);
}
-// MESSAGE("Value " << value.toString().toStdString() << " was set at index(" << index.row() << "," << index.column() << ")");
}
/* TODO GROUPS
else if (index.column() == ENF_VER_GROUP_COLUMN) {
QModelIndex parent = index.parent();
int row = index.row();
int col = index.column();
-
+
if (parent.isValid()) {
if (col == ENF_VER_X_COLUMN || col == ENF_VER_Y_COLUMN || col == ENF_VER_Z_COLUMN) {
double x, y, z;
x = parent.child(row, ENF_VER_X_COLUMN).data(Qt::EditRole).toDouble();
y = parent.child(row, ENF_VER_Y_COLUMN).data(Qt::EditRole).toDouble();
}
- // MESSAGE("Checking for existing vertex " << x << ", " << y << "," << z);
int nbChildren = model->rowCount(parent);
for (int i = 0 ; i < nbChildren ; i++) {
if (i != row) {
double childX = parent.child(i, ENF_VER_X_COLUMN).data(Qt::EditRole).toDouble();
double childY = parent.child(i, ENF_VER_Y_COLUMN).data(Qt::EditRole).toDouble();
double childZ = parent.child(i, ENF_VER_Z_COLUMN).data(Qt::EditRole).toDouble();
-// MESSAGE("Vertex: " << childX << ", " << childY << "," << childZ);
if ((childX == x) && (childY == y) && (childZ == z)) {
-// MESSAGE("Found !");
exists = true;
break;
}
PyRun_SimpleString("from math import *");
PyGILState_Release(gstate);
-
+
}
BLSURFPluginGUI_HypothesisCreator::~BLSURFPluginGUI_HypothesisCreator()
* */
GeomSelectionTools* BLSURFPluginGUI_HypothesisCreator::getGeomSelectionTool()
{
-// MESSAGE("BLSURFPluginGUI_HypothesisCreator::getGeomSelectionTool");
BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this;
_PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
-// MESSAGE("aStudy->StudyId(): " << aStudy->StudyId());
if (that->GeomToolSelected == NULL || that->GeomToolSelected->getMyStudy() != aStudy) {
-// MESSAGE("GeomToolSelected is created");
that->GeomToolSelected = new GeomSelectionTools(aStudy);
}
-// else
-// MESSAGE("GeomToolSelected already exists");
-// MESSAGE("that->GeomToolSelected->getMyStudy()->StudyId(): " << that->GeomToolSelected->getMyStudy()->StudyId());
return that->GeomToolSelected;
}
GEOM::GEOM_Gen_var BLSURFPluginGUI_HypothesisCreator::getGeomEngine()
{
return GeometryGUI::GetGeomGen();
-// GEOM::GEOM_Gen_var _geomEngine = NULL;
-// SalomeApp_Application* anApp = getGeomSelectionTool()->GetSalomeApplication();
-// if (anApp) {
-// MESSAGE("Got Application");
-// Engines::Component_var component = anApp->lcc()->FindOrLoad_Component( "FactoryServer","GEOM" );
-// _geomEngine = GEOM::GEOM_Gen::_narrow(component);
-// }
-// return _geomEngine;
-}
-
-namespace {
- inline bool isDouble( const QString& theText, const bool emptyOK=false ) {
- QString str = theText.trimmed();
- bool isOk = true;
- if ( !str.isEmpty() )
- str.toDouble(&isOk);
- else
- isOk = emptyOK;
- return isOk;
- }
}
{
MESSAGE("BLSURFPluginGUI_HypothesisCreator::checkParams");
bool ok = true;
-// if ( !isDouble( myPhySize->text(), false )) {
-// if ( myPhySize->text().isEmpty() )
-// myPhySize->setText(tr("OBLIGATORY_VALUE"));
-// myPhySize->selectAll();
-// ok = false;
-// }
-// if ( !isDouble( myPhyMin->text(), true )) {
-// myPhyMin->selectAll();
-// ok = false;
-// }
-// if ( !isDouble( myPhyMax->text(), true )) {
-// myPhyMax->selectAll();
-// ok = false;
-// }
-// if ( !isDouble( myGeoMin->text(), true )) {
-// myGeoMin->selectAll();
-// ok = false;
-// }
-// if ( !isDouble( myGeoMin->text(), true )) {
-// myGeoMin->selectAll();
-// ok = false;
-// }
+
if ( ok )
{
myOptionTable->setFocus();
// Enforced vertices
// TODO
-
+
return ok;
}
QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame()
{
MESSAGE("BLSURFPluginGUI_HypothesisCreator::buildFrame");
-
+
QFrame* fr = new QFrame( 0 );
QVBoxLayout* lay = new QVBoxLayout( fr );
lay->setMargin( 5 );
#endif
myAllowQuadrangles = new QCheckBox( tr( "BLSURF_ALLOW_QUADRANGLES" ), myStdGroup );
myDecimesh = new QCheckBox( tr( "BLSURF_DECIMESH" ), myStdGroup );
-
+
// ADD WIDGETS (STANDARD TAB)
int row = 0;
if( isCreation() ) {
QPushButton* addBtn = new QPushButton( tr( "ADD_OPTION"), myAdvGroup );
addBtn->setMenu( new QMenu() );
QPushButton* rmBtn = new QPushButton( tr( "REMOVE_OPTION"), myAdvGroup );
-
-
+
+
// ADD WIDGETS (ADVANCED TAB)
anAdvLayout->addWidget( new QLabel( tr( "BLSURF_TOPOLOGY" ), myAdvGroup ), 0, 0, 1, 1 );
anAdvLayout->addWidget( myTopology, 0, 1, 1, 1 );
line2->setFrameShape(QFrame::HLine);
line2->setFrameShadow(QFrame::Sunken);
removeButton = new QPushButton(tr("BLSURF_SM_REMOVE"),mySmpGroup);
-
-
+
+
// ADD WIDGETS (SIZEMAP TAB)
anSmpLayout->addWidget(mySizeMapTable, SMP_POINT_BTN, 0, SMP_NB_LINES+1, 1);
// anSmpLayout->addWidget(addAttractorButton, SMP_ATTRACTOR_BTN, 1, 1, 1);
// Enforced vertices parameters
myEnfGroup = new QWidget();
QGridLayout* anEnfLayout = new QGridLayout(myEnfGroup);
-//
+//
// myEnforcedVertexWidget = new DlgBlSurfHyp_Enforced(myEnfGroup);
// anEnfLayout->addWidget(myEnforcedVertexWidget);
// MESSAGE("Creating DlgBlSurfHyp_Enforced widget instance");
// myEnforcedVertexWidget = new DlgBlSurfHyp_Enforced();
-
+
myEnforcedTreeWidget = new QTreeWidget(myEnfGroup);
myEnforcedTreeWidget->setColumnCount( ENF_VER_NB_COLUMNS );
myEnforcedTreeWidget->setSortingEnabled(true);
shapeTypes1.Add( TopAbs_COMPOUND );
shapeTypes2.Add( TopAbs_VERTEX );
shapeTypes2.Add( TopAbs_COMPOUND );
-
+
SMESH_NumberFilter* faceFilter = new SMESH_NumberFilter("GEOM", TopAbs_FACE, 0, shapeTypes1);
myEnfFaceWdg = new StdMeshersGUI_ObjectReferenceParamWdg( faceFilter, 0, /*multiSel=*/true);
myEnfFaceWdg->SetDefaultText("Select Faces", "QLineEdit { color: grey }");
-
- SMESH_NumberFilter* vertexFilter = new SMESH_NumberFilter("GEOM", TopAbs_SHAPE, 1, TopAbs_VERTEX);
+
+ SMESH_NumberFilter* vertexFilter = new SMESH_NumberFilter("GEOM", TopAbs_SHAPE, 1, shapeTypes2);
myEnfVertexWdg = new StdMeshersGUI_ObjectReferenceParamWdg( vertexFilter, 0, /*multiSel=*/true);
myEnfVertexWdg->SetDefaultText("Select Vertices", "QLineEdit { color: grey }");
-
+
myEnfVertexWdg->AvoidSimultaneousSelection(myEnfFaceWdg);
-
+
QLabel* myXCoordLabel = new QLabel( tr( "BLSURF_ENF_VER_X_LABEL" ), myEnfGroup );
myXCoord = new SMESHGUI_SpinBox(myEnfGroup);
myXCoord->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
-
+
QLabel* myYCoordLabel = new QLabel( tr( "BLSURF_ENF_VER_Y_LABEL" ), myEnfGroup );
myYCoord = new SMESHGUI_SpinBox(myEnfGroup);
myYCoord->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
-
+
QLabel* myZCoordLabel = new QLabel( tr( "BLSURF_ENF_VER_Z_LABEL" ), myEnfGroup );
myZCoord = new SMESHGUI_SpinBox(myEnfGroup);
myZCoord->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
QLabel* myGroupNameLabel = new QLabel( tr( "BLSURF_ENF_VER_GROUP_LABEL" ), myEnfGroup );
myGroupName = new QLineEdit(myEnfGroup);
*/
-
+
addVertexButton = new QPushButton(tr("BLSURF_ENF_VER_VERTEX"),myEnfGroup);
// QFrame *line = new QFrame(myEnfGroup);
// line->setFrameShape(QFrame::HLine);
myGlobalGroupName = new QLineEdit(makeGroupsCheck);
aGroupLayout->addWidget(myGlobalGroupName);
*/
-
-
+
+
anEnfLayout->addWidget(myEnforcedTreeWidget, 0, 0, ENF_VER_NB_LINES+1, 1);
// FACE AND VERTEX SELECTION
anEnfLayout->addWidget(myEnfFaceWdg, ENF_VER_FACE, 1, 1, 2);
anEnfLayout->addWidget(myEnfVertexWdg, ENF_VER_VERTEX, 1, 1, 2);
-
+
anEnfLayout->addWidget(myXCoordLabel, ENF_VER_X_COORD, 1, 1, 1);
anEnfLayout->addWidget(myXCoord, ENF_VER_X_COORD, 2, 1, 1);
anEnfLayout->addWidget(myYCoordLabel, ENF_VER_Y_COORD, 1, 1, 1);
/* TODO GROUPS
anEnfLayout->addWidget(makeGroupsCheck, ENF_VER_GROUP_CHECK, 1, 1, 2);
*/
-
+
// ---
tab->insertTab( STD_TAB, myStdGroup, tr( "SMESH_ARGUMENTS" ) );
tab->insertTab( ADV_TAB, myAdvGroup, tr( "BLSURF_ADV_ARGS" ) );
/* TODO GROUPS
QString groupName = item->data(ENF_VER_GROUP_COLUMN, Qt::EditRole).toString();
*/
-
+
QTreeWidgetItem* parent = item->parent();
if (parent) {
QString shapeName = parent->data(ENF_VER_NAME_COLUMN, Qt::EditRole).toString();
{
if ( CORBA::is_nil( getGeomEngine() ) && !GeometryGUI::InitGeomGen() )
return ;
-
+
BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this;
GEOM::GEOM_IMeasureOperations_var measureOp = getGeomEngine()->GetIMeasureOperations( that->getGeomSelectionTool()->getMyStudy()->StudyId() );
if (CORBA::is_nil(measureOp))
return;
-
- for (int i=0; i<nbSelEnfVertex; i++)
+
+ myEnfVertex = myEnfVertexWdg->GetObject< GEOM::GEOM_Object >(nbSelEnfVertex-1);
+ CORBA::Double x,y,z;
+ x = y = z = 0.;
+ measureOp->PointCoordinates (myEnfVertex, x, y, z);
+ if ( measureOp->IsDone() )
{
- myEnfVertex = myEnfVertexWdg->GetObject< GEOM::GEOM_Object >(i);
- CORBA::Double x,y,z;
- x = y = z = 0.;
- measureOp->PointCoordinates (myEnfVertex, x, y, z);
- if ( measureOp->IsDone() )
- {
- myXCoord->SetValue(x);
- myYCoord->SetValue(y);
- myZCoord->SetValue(z);
- }
+ myXCoord->SetValue(x);
+ myYCoord->SetValue(y);
+ myZCoord->SetValue(z);
}
}
}
}
if (okToCreate) {
MESSAGE("In " << theFaceName << " vertex with coords " << x << ", " << y << ", " << z<< " is created");
-
+
QTreeWidgetItem *vertexItem = new QTreeWidgetItem( theItem);
vertexItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled);
int vertexIndex=1;
void BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices() {
// MESSAGE("BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices");
- BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this;
-
+ BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this;
+
that->getGeomSelectionTool()->selectionMgr()->clearFilters();
myEnfFaceWdg->deactivateSelection();
myEnfVertexWdg->deactivateSelection();
-
+
for (int column = 0; column < myEnforcedTreeWidget->columnCount(); ++column)
myEnforcedTreeWidget->resizeColumnToContents(column);
-
+
// Vertex selection
int selEnfFace = myEnfFaceWdg->NbObjects();
int selEnfVertex = myEnfVertexWdg->NbObjects();
bool coordsEmpty = (myXCoord->text().isEmpty()) || (myYCoord->text().isEmpty()) || (myZCoord->text().isEmpty());
-
+
if (selEnfFace == 0)
return;
-
+
if ((selEnfVertex == 0) && coordsEmpty)
return;
string entry, shapeName;
-
+
for (int i = 0 ; i < selEnfFace ; i++) {
myEnfFace = myEnfFaceWdg->GetObject< GEOM::GEOM_Object >(i);
entry = myEnfFace->GetStudyEntry();
shapeName = myEnfFace->GetName();
-
+
// // TODO GROUPS
// std::string groupName = myGroupName->text().toStdString();
// if (makeGroupsCheck->isChecked())
// groupName = myGlobalGroupName->text().toStdString();
-//
+//
// if (boost::trim_copy(groupName) == "")
// groupName = "";
}
}
}
-
+
// TopAbs_ShapeEnum shapeType;
// GeomSelectionTools* myGeomToolSelected = that->getGeomSelectionTool();
// LightApp_SelectionMgr* mySel = myGeomToolSelected->selectionMgr();
// }
for (int column = 0; column < myEnforcedTreeWidget->columnCount(); ++column)
myEnforcedTreeWidget->resizeColumnToContents(column);
-
+
if ( myPhysicalMesh->currentIndex() != SizeMap ) {
myPhysicalMesh->setCurrentIndex( SizeMap );
onPhysicalMeshChanged();
}
for (int column = 0; column < myEnforcedTreeWidget->columnCount(); ++column)
myEnforcedTreeWidget->resizeColumnToContents(column);
-
+
// update widgets
that->onPhysicalMeshChanged();
that->onGeometricMeshChanged();
// MESSAGE("mySMPShapeTypeMap[" << myAttractorList[0].toStdString() << "] = " << that->mySMPShapeTypeMap[myAttractorList[0]]);
}
}
-
+
// Enforced vertices
h_data.coordsList.clear();
h_data.entryCoordsListMap.clear();
h_data.groupNameEnfVertexListMap.clear();
// h_data.enfVertexGroupNameMap.clear();
*/
-
+
BLSURFPlugin::TEntryCoordsListMap_var entryCoordsListMap = h->GetAllCoordsByFace();
MESSAGE("entryCoordsListMap->length() = " << entryCoordsListMap->length());
for ( int i = 0;i<entryCoordsListMap->length(); ++i ) {
std::string entry = entryCoordsListMap[i].entry.in();
BLSURFPlugin::TEnfVertexList_var vertexList = h->GetEnforcedVerticesEntry(entry.c_str());
-
+
TEnfVertexCoordsList& coordsList = h_data.entryCoordsListMap[entry];
/* TODO GROUPS
std::string groupName = "";
*/
for (int j=0 ; j<vertexList->length(); ++j) {
BLSURFPlugin::TEnfVertexCoords _coords = vertexList[j].coords;
-
+
TEnfVertexCoords coords;
coords.push_back(_coords[0]);
coords.push_back(_coords[1]);
coords.push_back(_coords[2]);
coordsList.insert(coords);
h_data.coordsList.insert(coords);
-
+
TEnfVertex& enfVertex = h_data.coordsEnfVertexMap[coords];
-
+
enfVertex.name = vertexList[j].name.in();
enfVertex.coords = coords;
enfVertex.faceEntries.insert(entry);
h_data.entryCoordsListMap.erase(entry);
}
}
-
+
return true;
}
h->SetAngleMeshC( h_data.myAngleMeshC );
}
#ifdef WITH_SIZE_BOUNDARIES
-// if ( !isDouble( h_data.myPhyMin ))
-// h->SetPhyMin( -1 );
-// else if ( h->GetPhyMin() != h_data.myPhyMin.toDouble() )
-// h->SetPhyMin( h_data.myPhyMin.toDouble() );
-// if ( !isDouble( h_data.myPhyMax ))
-// h->SetPhyMax( -1 );
-// else if ( h->GetPhyMax() != h_data.myPhyMax.toDouble() )
-// h->SetPhyMax( h_data.myPhyMax.toDouble() );
-// if ( !isDouble( h_data.myGeoMin ))
-// h->SetGeoMin( -1 );
-// else if ( h->GetGeoMin() != h_data.myGeoMin.toDouble() )
-// h->SetGeoMin( h_data.myGeoMin.toDouble() );
-// if ( !isDouble( h_data.myGeoMax ))
-// h->SetGeoMax( -1 );
-// else if ( h->GetGeoMax() != h_data.myGeoMax.toDouble() )
-// h->SetGeoMax( h_data.myGeoMax.toDouble() );
if (h_data.myPhyMin > 0)
h->SetPhyMin( h_data.myPhyMin );
if (h_data.myPhyMax > 0)
h->SetGeoMax( h_data.myGeoMax );
#endif
- //printf("storeParamsToHypo():myOptions->length()=%d\n",myOptions->length());
h->SetOptionValues( myOptions ); // is set in checkParams()
BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this;
h->SetSizeMapEntry( entry.toLatin1().constData(), fullSizeMap.toLatin1().constData() );
}
}
-
+
// Enforced vertices
bool ret;
int hypNbVertex;
/* TODO GROUPS
std::string groupName = "";
*/
-
+
TEntryCoordsListMap::const_iterator evmIt = h_data.entryCoordsListMap.begin();
-
+
BLSURFPlugin::TEntryCoordsListMap_var allCoordsByFace = h->GetAllCoordsByFace();
hypNbVertex = allCoordsByFace->length();
-
+
// All enforced vertices were deleted
if (evmIt == h_data.entryCoordsListMap.end() && hypNbVertex!=0)
h->ClearAllEnforcedVertices();
h->UnsetEnforcedVerticesEntry(entry.c_str());
}
}
-
+
// One or several enforced vertices are added or removed for a specific entry
TEnfVertexCoordsList coordsFromHyp;
BLSURFPlugin::TEnfVertexList_var hypCoordsList;
MESSAGE("Error vertex not found");
throw std::runtime_error("Error vertex not found");
}
-
+
enfVertex = it->second;
x = enfVertex.coords[0];
y = enfVertex.coords[1];
ret = h->SetEnforcedVertexEntry( entry.c_str(), x, y, z, enfVertex.name.c_str() );
else
ret = h->SetEnforcedVertexEntryWithPoint( entry.c_str(), enfVertex.geomEntry.c_str(), enfVertex.name.c_str(), x, y, z );
-
+
/* TODO GROUPS
groupName = enfVertex.grpName;
h->SetEnforcedVertexEntryWithGroup( entry.c_str(), x, y, z, groupName.c_str() );
*/
-
+
if (coordsFromHyp.find(coords) != coordsFromHyp.end()) {
MESSAGE("Coords "<<x<<", "<<y<<", "<<z<<" must not be deleted")
coordsFromHyp.erase(coords);
}
}
-
+
// Remove old vertices
coordsToRemove = coordsFromHyp.begin();
for ( ; coordsToRemove!=coordsFromHyp.end() ; ++coordsToRemove) {
x = coords[0];
y = coords[1];
z = coords[2];
-
+
it = h_data.coordsEnfVertexMap.find(coords);
if (it == h_data.coordsEnfVertexMap.end()) {
MESSAGE("Error vertex not found");
h_data.coordsList.clear();
h_data.entryCoordsListMap.clear();
h_data.coordsEnfVertexMap.clear();
-
+
int nbEnforcedShapes = myEnforcedTreeWidget->topLevelItemCount();
int nbEnforcedVertices = 0;
std::string groupName = "";
coords.push_back(childValueZ);
evs.insert(coords);
h_data.coordsList.insert(coords);
-
+
TEnfVertex enfVertex;
enfVertex.name = childName;
enfVertex.coords = coords;
enfVertex.faceEntries.insert(entry);
enfVertex.geomEntry = vertexEntry;
-
+
/* TODO GROUPS
groupName = child->data(ENF_VER_GROUP_COLUMN,Qt::EditRole).toString().toStdString();
enfVertex.grpName = groupName;
-
+
// Group
if (makeGroupsCheck->isChecked())
groupName = myGlobalGroupName->text().toStdString();
bool isSizeMap = (myPhysicalMesh->currentIndex() == SizeMap);
bool isCustom = (isPhysicalUserDefined || isSizeMap) ;
bool geomIsCustom = (myGeometricMesh->currentIndex() == UserDefined);
-
+
myGradation->setEnabled(!isPhysicalUserDefined || geomIsCustom);
myPhySize->setEnabled(isCustom);
myPhyMax->setEnabled(isCustom);
myPhyMin->setEnabled(isCustom);
if ( !myGradation->isEnabled())
-// myGradation->setValue( 1.1 );
myGradation->SetValue( 1.1 );
if ( !isCustom ) {
-// QString aPhySize = "";
-// switch( myPhysicalMesh->currentIndex() ) {
-// case DefaultSize:
-// default:
-// aPhySize = "10";
-// break;
-// }
-// myPhySize->setText( aPhySize );
-// if ( !isDouble( myPhyMin->text(), true ))
-// myPhyMin->setText("");
-// if ( !isDouble( myPhyMax->text(), true ))
-// myPhyMax->setText("");
if ( myGeometricMesh->currentIndex() == DefaultGeom ) {
myGeometricMesh->setCurrentIndex( UserDefined );
onGeometricMeshChanged();
MESSAGE("BLSURFPluginGUI_HypothesisCreator::onGeometricMeshChanged");
bool isCustom = (myGeometricMesh->currentIndex() == UserDefined);
bool phyIsSizemap = (myPhysicalMesh->currentIndex() == SizeMap);
-
+
myAngleMeshS->setEnabled(isCustom);
myAngleMeshC->setEnabled(isCustom);
myGradation->setEnabled(isCustom || phyIsSizemap);
myGradation->SetValue( 1.1 );
if ( ! isCustom ) {
-// double aAngleMeshS;
-// switch( myGeometricMesh->currentIndex() ) {
-// case DefaultGeom:
-// default:
-// aAngleMeshS = 8;
-// break;
-// }
-// myAngleMeshS->SetValue( aAngleMeshS );
-// myAngleMeshC->SetValue( aAngleMeshS );
-// if ( !isDouble( myGeoMin->text(), true ))
-// myGeoMin->setText("");
-// if ( !isDouble( myGeoMax->text(), true ))
-// myGeoMax->setText("");
// hphy_flag = 0 and hgeo_flag = 0 is not allowed (spec)
if ( myPhysicalMesh->currentIndex() == DefaultSize ) {
myPhysicalMesh->setCurrentIndex( PhysicalUserDefined );