-// 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
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()
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() {
myMinSize->setMinimumWidth( max_width+50 );
myMaxSize->setMinimumWidth( max_width+50 );
// Geometrical parameters
- metrics1 = myAngleMesh->font();
- metrics2 = myChordalError->font();
+ metrics1 = QFontMetrics(myAngleMesh->font());
+ metrics2 = QFontMetrics(myChordalError->font());
width1 = metrics1.width(myAngleMesh->GetString());
width2 = metrics2.width(myChordalError->GetString());
max_width = max(width1,width2);
myAngleMesh->setMinimumWidth( max_width+50 );
myChordalError->setMinimumWidth( max_width+50 );
// Other parameters
- metrics1 = myAnisotropicRatio->font();
- metrics2 = myTinyEdgeLength->font();
- metrics3 = myBadElementAspectRatio->font();
+ metrics1 = QFontMetrics(myAnisotropicRatio->font());
+ metrics2 = QFontMetrics(myTinyEdgeLength->font());
+ metrics3 = QFontMetrics(myBadElementAspectRatio->font());
width1 = metrics1.width(myAnisotropicRatio->GetString());
width2 = metrics2.width(myTinyEdgeLength->GetString());
width3 = metrics3.width(myBadElementAspectRatio->GetString());
spinBox->setText("");
}
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-