Salome HOME
updated copyright message
[plugins/blsurfplugin.git] / src / GUI / BLSURFPluginGUI_StdWidget.cxx
index d4fbc767419a4400f519c2be503c4dcf598f57c1..9375f929b94a3e717c508bbc79a0ac84c211837e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2023  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -43,19 +43,29 @@ BLSURFPluginGUI_StdWidget::BLSURFPluginGUI_StdWidget( QWidget* parent, Qt::Windo
   myPhySize->RangeStepAndValidator(0, COORD_MAX, 10.0, "length_precision");
   myMinSize->RangeStepAndValidator(0, COORD_MAX, 10.0, "length_precision");
   myMaxSize->RangeStepAndValidator(0, COORD_MAX, 10.0, "length_precision");
-  myGradation->RangeStepAndValidator(1.1, COORD_MAX, 0.1, "length_precision");
+  myGradation->RangeStepAndValidator(1.0, COORD_MAX, 0.1, "length_precision");
+  myVolumeGradation->RangeStepAndValidator(1.0, COORD_MAX, 0.1, "length_precision");
   myAngleMesh->RangeStepAndValidator(0, 90, 0.5, "angular_precision");
   myChordalError->RangeStepAndValidator(0, COORD_MAX, 0.1, "length_precision");
   myAnisotropicRatio->RangeStepAndValidator(0, COORD_MAX, 0.1, "length_precision");
-  myTinyEdgeLength->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, "length_precision");
+  myTinyEdgeLength->RangeStepAndValidator(0, COORD_MAX, 0.1, "length_precision");
+  myTinyEdgeOptimisLength->RangeStepAndValidator(0, COORD_MAX, 0.1, "length_precision");
+  myCorrectSurfaceIntersectionMaxCost->RangeStepAndValidator(0, COORD_MAX, 1);
   myBadElementAspectRatio->RangeStepAndValidator(0, COORD_MAX, 1000, "length_precision");
+  mySurfaceProximityRatio->RangeStepAndValidator(1, COORD_MAX, 1, "length_precision");
+  myVolumeProximityRatio->RangeStepAndValidator(1, COORD_MAX, 1, "length_precision");
   myMinSize->setText("");
   myMaxSize->setText("");
   myAngleMesh->setText("");
   myChordalError->setText("");
   myAnisotropicRatio->setText("");
   myTinyEdgeLength->setText("");
+  myTinyEdgeOptimisLength->setText("");
+  myCorrectSurfaceIntersectionMaxCost->setText("");
   myBadElementAspectRatio->setText("");
+  myButtonGroupElementType->setId(myRadioButtonTriangles, Triangles);
+  myButtonGroupElementType->setId(myRadioButtonQuadrangleDominant, QuadrangleDominant);
+  myButtonGroupElementType->setId(myRadioButtonQuadrangles, Quadrangles);
 }
 
 BLSURFPluginGUI_StdWidget::~BLSURFPluginGUI_StdWidget()
@@ -66,36 +76,17 @@ void BLSURFPluginGUI_StdWidget::onPhysicalMeshChanged() {
   bool isPhysicalGlobalSize = (myPhysicalMesh->currentIndex() == PhysicalGlobalSize);
   bool isPhysicalLocalSize  = (myPhysicalMesh->currentIndex() == PhysicalLocalSize);
   bool isCustom             = (isPhysicalGlobalSize || isPhysicalLocalSize) ;
-  bool geomIsCustom         = (myGeometricMesh->currentIndex() != DefaultGeom);
-  bool isQuadAllowed        = (myAllowQuadrangles->isChecked() );
 
-  myGradation->setEnabled( !isQuadAllowed && ( !isPhysicalGlobalSize || geomIsCustom ));
   myPhySize->setEnabled(isCustom);
   myPhySizeRel->setEnabled(isCustom);
-
-  if ( !isCustom ) {
-    if ( myGeometricMesh->currentIndex() == DefaultGeom ) {
-      myGeometricMesh->setCurrentIndex( GeometricalGlobalSize );
-      onGeometricMeshChanged();
-    }
-  }
 }
 
 void BLSURFPluginGUI_StdWidget::onGeometricMeshChanged() {
   bool isCustom            = (myGeometricMesh->currentIndex() != DefaultGeom);
-  bool isPhysicalLocalSize = (myPhysicalMesh->currentIndex() == PhysicalLocalSize);
-  bool isQuadAllowed       = (myAllowQuadrangles->isChecked() );
 
-  GeomParamsGroupBox->setEnabled(isCustom);
-  myGradation->setEnabled( !isQuadAllowed && ( isCustom || isPhysicalLocalSize ));
+  myAngleMesh->setEnabled( isCustom );
+  myChordalError->setEnabled( isCustom );
 
-  if ( ! isCustom ) {
-    //  hphy_flag = 0 and hgeo_flag = 0 is not allowed (spec)
-    if ( myPhysicalMesh->currentIndex() == DefaultSize ) {
-      myPhysicalMesh->setCurrentIndex( PhysicalGlobalSize );
-      onPhysicalMeshChanged();
-    }
-  }
 }
 
 void BLSURFPluginGUI_StdWidget::resizeWidgets() {
@@ -142,25 +133,3 @@ void BLSURFPluginGUI_StdWidget::onEditingFinished() {
     spinBox->setText("");
   }
 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-