]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
GEOM: It should be forbidden creation of primitives with zero dimensions.
authordmv <dmv@opencascade.com>
Tue, 28 Oct 2008 08:30:34 +0000 (08:30 +0000)
committerdmv <dmv@opencascade.com>
Tue, 28 Oct 2008 08:30:34 +0000 (08:30 +0000)
src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx

index 4ff84badbada16883695d387d4715eb24d4d7060..cd2b32852aa39af0c9e1a3aed6e299ddbbf5bb64 100644 (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);
index e2ad901fe6f69f1bc29e6e6dadfcb8c6a09ae2b9..9b69d4ff3316517c490be5bb34413260b5b8dbfa 100644 (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);
index 82de95d33dc6382d17149cc4defea6ce66bfd004..8d25d29d2c017893ad361b204d81e3944ec824bc 100644 (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);