Additional fix for issue 0020626: EDF 1200 GEOM: the discretisation of the circles in the OCC viewer is too rough

This commit is contained in:
ouv 2010-02-03 11:05:16 +00:00
parent dcd2885db2
commit b7e3214ee5
5 changed files with 13 additions and 10 deletions

View File

@ -636,6 +636,7 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
// IMP 0020626 // IMP 0020626
double aDC = aResMgr->doubleValue("Geometry", "deflection_coeff", 0.001); 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); AISShape->SetOwnDeviationCoefficient(aDC);
} }
} }

View File

@ -1600,10 +1600,10 @@ void GeometryGUI::createPreferences()
setPreferenceProperty( step, "precision", 3 ); setPreferenceProperty( step, "precision", 3 );
// Set property for deflection value for spinboxes // 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, "max", 1.0 );
setPreferenceProperty( defl, "step", 1.0e-04 ); setPreferenceProperty( defl, "step", 1.0e-04 );
setPreferenceProperty( defl, "precision", 10 ); setPreferenceProperty( defl, "precision", 6 );
// Set property vertex marker type // Set property vertex marker type
QList<QVariant> aMarkerTypeIndicesList; QList<QVariant> aMarkerTypeIndicesList;

View File

@ -47,6 +47,9 @@
#include "SALOMEconfig.h" #include "SALOMEconfig.h"
#include CORBA_CLIENT_HEADER(SALOMEDS) #include CORBA_CLIENT_HEADER(SALOMEDS)
// minimum allowed value for deflection coefficient
#define DEFLECTION_MIN 1e-06
typedef QMap<QString, GEOMGUI*> GUIMap; typedef QMap<QString, GEOMGUI*> GUIMap;
class QDialog; class QDialog;

View File

@ -26,7 +26,7 @@
#include "GEOMToolsGUI_DeflectionDlg.h" #include "GEOMToolsGUI_DeflectionDlg.h"
#include <GeometryGUI.h> #include <GeometryGUI.h>
#include <LightApp_Application.h> #include <LightApp_Application.h>
#include <SalomeApp_DoubleSpinBox.h> #include <QtxDoubleSpinBox.h>
#include <SUIT_MessageBox.h> #include <SUIT_MessageBox.h>
#include <SUIT_ResourceMgr.h> #include <SUIT_ResourceMgr.h>
@ -71,11 +71,10 @@ GEOMToolsGUI_DeflectionDlg::GEOMToolsGUI_DeflectionDlg (QWidget* parent)
TextLabel1->setText(tr("GEOM_DEFLECTION")); TextLabel1->setText(tr("GEOM_DEFLECTION"));
GroupC1Layout->addWidget(TextLabel1, 0, 0); GroupC1Layout->addWidget(TextLabel1, 0, 0);
//SpinBox = new SalomeApp_DoubleSpinBox (/*min*/1.0e-07, /*max*/1.0, /*step*/1.0e-04, GroupC1); SpinBox = new QtxDoubleSpinBox (GroupC1);
SpinBox = new SalomeApp_DoubleSpinBox (GroupC1); SpinBox->setPrecision( 6 );
SpinBox->setPrecision( 10 ); SpinBox->setDecimals( 6 );
SpinBox->setDecimals( 10 ); SpinBox->setRange( DEFLECTION_MIN, 1.0 );
SpinBox->setRange( 1.0e-07, 1.0 );
SpinBox->setSingleStep( 1.0e-04 ); SpinBox->setSingleStep( 1.0e-04 );
//SpinBox->setMinimum(1.0e-07); //SpinBox->setMinimum(1.0e-07);
//SpinBox->setMaximum(1.0); //SpinBox->setMaximum(1.0);

View File

@ -30,7 +30,7 @@
#include <QDialog> #include <QDialog>
class SalomeApp_DoubleSpinBox; class QtxDoubleSpinBox;
//================================================================================= //=================================================================================
// class : GEOMToolsGUI_DeflectionDlg // class : GEOMToolsGUI_DeflectionDlg
@ -54,7 +54,7 @@ private:
void keyPressEvent( QKeyEvent* ); void keyPressEvent( QKeyEvent* );
private: private:
SalomeApp_DoubleSpinBox* SpinBox; QtxDoubleSpinBox* SpinBox;
QString myHelpFileName; QString myHelpFileName;
}; };