GEOM: It should be forbidden creation of primitives with zero dimensions.

This commit is contained in:
dmv 2008-10-28 08:30:34 +00:00
parent bce23c1f18
commit 3cc8f2aece
3 changed files with 7 additions and 7 deletions

View File

@ -123,9 +123,9 @@ void PrimitiveGUI_BoxDlg::Init()
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
/* min, max, step and decimals for spin boxes */
GroupDimensions->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupDimensions->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupDimensions->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupDimensions->SpinBox_DZ->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY);
double initValue = 200.0;
GroupDimensions->SpinBox_DX->SetValue(initValue);

View File

@ -128,10 +128,10 @@ void PrimitiveGUI_ConeDlg::Init()
/* min, max, step and decimals for spin boxes & initial values */
GroupPoints->SpinBox_DX->RangeStepAndValidator(0.000, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupPoints->SpinBox_DY->RangeStepAndValidator(0.000, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupPoints->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupPoints->SpinBox_DZ->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.000, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.000, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupDimensions->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupDimensions->SpinBox_DZ->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY);
double aRadius1(100.0), aRadius2(0.0), aHeight(300.0);
GroupPoints->SpinBox_DX->SetValue(aRadius1);

View File

@ -127,11 +127,11 @@ void PrimitiveGUI_CylinderDlg::Init()
/* First constructor : radius */
GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY);
/* First constructor : algebric height */
GroupPoints->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupPoints->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY);
/* Second constructor : radius */
GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY);
/* Second constructor : algebric height */
GroupDimensions->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupPoints->SpinBox_DX->SetValue(100.0);
GroupPoints->SpinBox_DY->SetValue(300.0);