]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Additional fix for issue 0020626: EDF 1200 GEOM: the discretisation of the circles...
authorouv <ouv@opencascade.com>
Wed, 3 Feb 2010 11:05:16 +0000 (11:05 +0000)
committerouv <ouv@opencascade.com>
Wed, 3 Feb 2010 11:05:16 +0000 (11:05 +0000)
src/GEOMGUI/GEOM_Displayer.cxx
src/GEOMGUI/GeometryGUI.cxx
src/GEOMGUI/GeometryGUI.h
src/GEOMToolsGUI/GEOMToolsGUI_DeflectionDlg.cxx
src/GEOMToolsGUI/GEOMToolsGUI_DeflectionDlg.h

index 6e3be0c5a1990a36b666578114084d9efee5274a..dae3ea1d9174cebc33151616841f899cab7ac792 100644 (file)
@@ -636,6 +636,7 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
 
             // IMP 0020626
             double aDC = aResMgr->doubleValue("Geometry", "deflection_coeff", 0.001);
+            aDC = std::max( aDC, DEFLECTION_MIN ); // to avoid to small values of the coefficient
             AISShape->SetOwnDeviationCoefficient(aDC);
           }
         }
index fd461f03b5d5d2d1aee49c5d43eb6714323fae98..aa628f194b49574739db33794319458c989359ab 100644 (file)
@@ -1600,10 +1600,10 @@ void GeometryGUI::createPreferences()
   setPreferenceProperty( step, "precision", 3 );
 
   // Set property for deflection value for spinboxes
-  setPreferenceProperty( defl, "min", 1.0e-07 );
+  setPreferenceProperty( defl, "min", DEFLECTION_MIN );
   setPreferenceProperty( defl, "max", 1.0 );
   setPreferenceProperty( defl, "step", 1.0e-04 );
-  setPreferenceProperty( defl, "precision", 10 );
+  setPreferenceProperty( defl, "precision", 6 );
 
   // Set property vertex marker type
   QList<QVariant> aMarkerTypeIndicesList;
index 91728932b60f73db9e2161ccbc76741d37ed465a..249359762b11c8ca05366cc67d85e052f6323122 100644 (file)
@@ -47,6 +47,9 @@
 #include "SALOMEconfig.h"
 #include CORBA_CLIENT_HEADER(SALOMEDS)
 
+// minimum allowed value for deflection coefficient
+#define DEFLECTION_MIN 1e-06
+
 typedef QMap<QString, GEOMGUI*> GUIMap;
 
 class QDialog;
index 8f240d26b3c2959947b46b911298c63bf95d94c7..715c22dee0c042eb5ab2713268f3ba82cabf905c 100644 (file)
@@ -26,7 +26,7 @@
 #include "GEOMToolsGUI_DeflectionDlg.h"
 #include <GeometryGUI.h>
 #include <LightApp_Application.h>
-#include <SalomeApp_DoubleSpinBox.h>
+#include <QtxDoubleSpinBox.h>
 
 #include <SUIT_MessageBox.h>
 #include <SUIT_ResourceMgr.h>
@@ -71,11 +71,10 @@ GEOMToolsGUI_DeflectionDlg::GEOMToolsGUI_DeflectionDlg (QWidget* parent)
   TextLabel1->setText(tr("GEOM_DEFLECTION"));
   GroupC1Layout->addWidget(TextLabel1, 0, 0);
 
-  //SpinBox = new SalomeApp_DoubleSpinBox (/*min*/1.0e-07, /*max*/1.0, /*step*/1.0e-04, GroupC1);
-  SpinBox = new SalomeApp_DoubleSpinBox (GroupC1);
-  SpinBox->setPrecision( 10 );
-  SpinBox->setDecimals( 10 );
-  SpinBox->setRange( 1.0e-07, 1.0 );
+  SpinBox = new QtxDoubleSpinBox (GroupC1);
+  SpinBox->setPrecision( 6 );
+  SpinBox->setDecimals( 6 );
+  SpinBox->setRange( DEFLECTION_MIN, 1.0 );
   SpinBox->setSingleStep( 1.0e-04 );
   //SpinBox->setMinimum(1.0e-07);
   //SpinBox->setMaximum(1.0);
index 30c2821cbb1641fafdf74449f6a32a37ad07813d..39bb8cc7e75754f57584e3b5ed4e8b45d290260c 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <QDialog>
 
-class SalomeApp_DoubleSpinBox;
+class QtxDoubleSpinBox;
 
 //=================================================================================
 // class    : GEOMToolsGUI_DeflectionDlg
@@ -54,7 +54,7 @@ private:
  void       keyPressEvent( QKeyEvent* );
 
 private:
SalomeApp_DoubleSpinBox*  SpinBox;
QtxDoubleSpinBox*         SpinBox;
  QString                   myHelpFileName;
 };