mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-25 01:02:03 +05:00
Correct precision of double values displaying (bug 16123).
This commit is contained in:
parent
eac09dcfb0
commit
a46ed42b20
@ -328,16 +328,16 @@ void EntityGUI_SketcherDlg::Init()
|
||||
double step = SUIT_Session::session()->resourceMgr()->doubleValue( "Geometry", "SettingsGeomStep", 100.0 );
|
||||
|
||||
/* min, max, step and decimals for spin boxes */
|
||||
Group1Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
Group4Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3);
|
||||
Group4Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3);
|
||||
Group4Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
Group4Spin->SpinBox_DS->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
|
||||
Group1Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
Group4Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, DBL_DIGITS_DISPLAY);
|
||||
Group4Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, DBL_DIGITS_DISPLAY);
|
||||
Group4Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
Group4Spin->SpinBox_DS->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., DBL_DIGITS_DISPLAY);
|
||||
|
||||
/* displays Dialog */
|
||||
GroupConstructors->setEnabled(false);
|
||||
@ -438,8 +438,8 @@ void EntityGUI_SketcherDlg::PointClicked(int constructorId)
|
||||
if ( constructorId == 1 )
|
||||
{ // XY
|
||||
mySketchType = PT_ABS;
|
||||
Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_X2"));
|
||||
Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y2"));
|
||||
myX = 0.0;
|
||||
@ -454,8 +454,8 @@ void EntityGUI_SketcherDlg::PointClicked(int constructorId)
|
||||
else if ( constructorId == 0 )
|
||||
{ // DXDY
|
||||
mySketchType = PT_RELATIVE;
|
||||
Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_DX2"));
|
||||
Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_DY2"));
|
||||
myDX = 0.0;
|
||||
@ -512,8 +512,8 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId)
|
||||
myLength = 100.0;
|
||||
if ( myConstructorDirId == 2 )
|
||||
{ // Angle
|
||||
Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
|
||||
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., DBL_DIGITS_DISPLAY);
|
||||
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2"));
|
||||
Group2Spin->SpinBox_DX->SetValue(myAngle);
|
||||
Group2Spin->buttonApply->setFocus();
|
||||
@ -588,9 +588,9 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId)
|
||||
}
|
||||
else if ( myConstructorDirId == 3 )
|
||||
{ // DXDY
|
||||
Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3);
|
||||
Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3);
|
||||
Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, DBL_DIGITS_DISPLAY);
|
||||
Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, DBL_DIGITS_DISPLAY);
|
||||
Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_VX2"));
|
||||
Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_VY2"));
|
||||
myDX = 0.0;
|
||||
@ -627,9 +627,9 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId)
|
||||
if ( constructorId == 2 )
|
||||
{ // Length
|
||||
mySketchType = DIR_ANGLE_LENGTH;
|
||||
Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
|
||||
Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
|
||||
Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., DBL_DIGITS_DISPLAY);
|
||||
Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., DBL_DIGITS_DISPLAY);
|
||||
Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2"));
|
||||
Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_RADIUS2"));
|
||||
Group3Spin->TextLabel3->setText(tr("GEOM_SKETCHER_ANGLE2"));
|
||||
@ -647,8 +647,8 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId)
|
||||
if ( constructorId == 2 )
|
||||
{ // Length
|
||||
mySketchType = DIR_PER_LENGTH;
|
||||
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
|
||||
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., DBL_DIGITS_DISPLAY);
|
||||
Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2"));
|
||||
Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2"));
|
||||
myRadius = 100.0;
|
||||
@ -664,8 +664,8 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId)
|
||||
if ( constructorId == 2 )
|
||||
{ // Length
|
||||
mySketchType = DIR_TAN_LENGTH;
|
||||
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
|
||||
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., DBL_DIGITS_DISPLAY);
|
||||
Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2"));
|
||||
Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2"));
|
||||
myRadius = 100.0;
|
||||
|
@ -29,6 +29,8 @@
|
||||
#include "MeasureGUI_CenterMassDlg.h"
|
||||
#include "MeasureGUI_1Sel3LineEdit_QTD.h"
|
||||
|
||||
#include "DlgRef_SpinBox.h"
|
||||
|
||||
#include "utilities.h"
|
||||
#include "SUIT_Session.h"
|
||||
#include "SalomeApp_Application.h"
|
||||
@ -245,9 +247,9 @@ void MeasureGUI_CenterMassDlg::processObject()
|
||||
getParameters( x, y, z );
|
||||
|
||||
myGrp->LineEdit1->setText( GEOMBase::GetName( myObj ) );
|
||||
myGrp->LineEdit2->setText( QString( "%1" ).arg( x ) );
|
||||
myGrp->LineEdit3->setText( QString( "%1" ).arg( y ) );
|
||||
myGrp->LineEdit4->setText( QString( "%1" ).arg( z ) );
|
||||
myGrp->LineEdit2->setText( DlgRef_SpinBox::PrintDoubleValue( x ) );
|
||||
myGrp->LineEdit3->setText( DlgRef_SpinBox::PrintDoubleValue( y ) );
|
||||
myGrp->LineEdit4->setText( DlgRef_SpinBox::PrintDoubleValue( z ) );
|
||||
|
||||
displayPreview();
|
||||
}
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "MeasureGUI_2Sel1LineEdit_QTD.h"
|
||||
#include "GEOMBase.h"
|
||||
#include "GEOM_Displayer.h"
|
||||
#include "DlgRef_SpinBox.h"
|
||||
|
||||
#include "SUIT_Session.h"
|
||||
#include "SUIT_ViewWindow.h"
|
||||
@ -125,7 +126,6 @@ void MeasureGUI_DistanceDlg::Init()
|
||||
connect( mySelBtn2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||
|
||||
MeasureGUI_Skeleton::Init();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -163,7 +163,7 @@ void MeasureGUI_DistanceDlg::processObject()
|
||||
double aDist = 0.;
|
||||
if ( getParameters( aDist, aPnt1, aPnt2 ) )
|
||||
{
|
||||
myGrp->LineEdit3->setText( QString( "%1" ).arg( aDist ) );
|
||||
myGrp->LineEdit3->setText( DlgRef_SpinBox::PrintDoubleValue( aDist ) );
|
||||
redisplayPreview();
|
||||
}
|
||||
else
|
||||
@ -171,7 +171,6 @@ void MeasureGUI_DistanceDlg::processObject()
|
||||
myGrp->LineEdit3->setText( "" );
|
||||
erasePreview();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -257,9 +256,11 @@ SALOME_Prs* MeasureGUI_DistanceDlg::buildPrs()
|
||||
double aDist = 0.;
|
||||
gp_Pnt aPnt1( 0, 0, 0 ), aPnt2( 0, 0, 0 );
|
||||
|
||||
if ( myObj->_is_nil() || myObj2->_is_nil() || !getParameters( aDist, aPnt1, aPnt2 ) ||
|
||||
SUIT_Session::session()->activeApplication()->desktop()->activeWindow()->getViewManager()->getType()
|
||||
!= OCCViewer_Viewer::Type() )
|
||||
SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
|
||||
|
||||
if ( myObj->_is_nil() || myObj2->_is_nil() ||
|
||||
!getParameters( aDist, aPnt1, aPnt2 ) ||
|
||||
vw->getViewManager()->getType() != OCCViewer_Viewer::Type() )
|
||||
return 0;
|
||||
|
||||
try
|
||||
@ -282,7 +283,6 @@ SALOME_Prs* MeasureGUI_DistanceDlg::buildPrs()
|
||||
( aPnt1.Y() + aPnt2.Y() ) / 2,
|
||||
( aPnt1.Z() + aPnt2.Z() ) / 2 + 100 );
|
||||
|
||||
|
||||
gp_Vec va( aPnt3, aPnt1 );
|
||||
gp_Vec vb( aPnt3, aPnt2 );
|
||||
|
||||
@ -295,14 +295,11 @@ SALOME_Prs* MeasureGUI_DistanceDlg::buildPrs()
|
||||
gce_MakePln gce_MP( aPnt1, aPnt2, aPnt3 );
|
||||
Handle( Geom_Plane ) P = new Geom_Plane( gce_MP.Value() );
|
||||
|
||||
Handle( AIS_LengthDimension ) anIO = new AIS_LengthDimension(
|
||||
aVert1, aVert2, P, aDist, TCollection_ExtendedString( (Standard_CString)aLabel.latin1() ) );
|
||||
Handle( AIS_LengthDimension ) anIO = new AIS_LengthDimension
|
||||
(aVert1, aVert2, P, aDist, TCollection_ExtendedString((Standard_CString)aLabel.latin1()));
|
||||
|
||||
SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
|
||||
SOCC_Prs* aPrs = dynamic_cast<SOCC_Prs*>( ((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs( 0 ) );
|
||||
|
||||
//QAD_ViewFrame* vf = GEOM_Displayer::GetActiveView();
|
||||
//OCCViewer_Prs* aPrs = dynamic_cast<OCCViewer_Prs*>( vf->CreatePrs( 0 ) );
|
||||
SOCC_Prs* aPrs =
|
||||
dynamic_cast<SOCC_Prs*>( ((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs( 0 ) );
|
||||
|
||||
if ( aPrs )
|
||||
aPrs->AddObject( anIO );
|
||||
@ -324,17 +321,3 @@ bool MeasureGUI_DistanceDlg::isValid( QString& msg )
|
||||
{
|
||||
return MeasureGUI_Skeleton::isValid( msg ) && !myObj2->_is_nil();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -203,4 +203,3 @@ bool MeasureGUI_InertiaDlg::getParameters( gp_Mat& I,
|
||||
return getOperation()->IsDone();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -181,24 +181,3 @@ bool MeasureGUI_MaxToleranceDlg::getParameters( double& theMinFaceToler,
|
||||
return getOperation()->IsDone();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -61,7 +61,6 @@
|
||||
//=================================================================================
|
||||
// class : MeasureGUI_PointDlg()
|
||||
// purpose : Constructs a MeasureGUI_PointDlg which is a child of 'parent'
|
||||
//
|
||||
//=================================================================================
|
||||
MeasureGUI_PointDlg::MeasureGUI_PointDlg( GeometryGUI* GUI, QWidget* parent )
|
||||
: MeasureGUI_Skeleton( GUI, parent, "MeasureGUI_PointDlg" )
|
||||
@ -111,7 +110,7 @@ MeasureGUI_PointDlg::MeasureGUI_PointDlg( GeometryGUI* GUI, QWidget* parent )
|
||||
//=================================================================================
|
||||
// function : ~MeasureGUI_PointDlg()
|
||||
// purpose : Destroys the object and frees any allocated resources
|
||||
//======================myX->setReadOnly( true );===========================================================
|
||||
//=================================================================================
|
||||
MeasureGUI_PointDlg::~MeasureGUI_PointDlg()
|
||||
{
|
||||
}
|
||||
@ -206,23 +205,3 @@ void MeasureGUI_PointDlg::SelectionIntoArgument()
|
||||
myZ->setText( "" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "GEOM_Displayer.h"
|
||||
#include "GEOMImpl_Types.hxx"
|
||||
#include "GEOMBase.h"
|
||||
#include "DlgRef_SpinBox.h"
|
||||
|
||||
#include "SalomeApp_Tools.h"
|
||||
#include "utilities.h"
|
||||
@ -148,9 +149,9 @@ void MeasureGUI_PropertiesDlg::processObject()
|
||||
}
|
||||
else
|
||||
{
|
||||
myGrp->LineEdit2->setText( QString( "%1" ).arg( aLength ) );
|
||||
myGrp->LineEdit3->setText( QString( "%1" ).arg( anArea ) );
|
||||
myGrp->LineEdit4->setText( QString( "%1" ).arg( aVolume ) );
|
||||
myGrp->LineEdit2->setText( DlgRef_SpinBox::PrintDoubleValue( aLength ) );
|
||||
myGrp->LineEdit3->setText( DlgRef_SpinBox::PrintDoubleValue( anArea ) );
|
||||
myGrp->LineEdit4->setText( DlgRef_SpinBox::PrintDoubleValue( aVolume ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -200,24 +201,3 @@ SALOME_Prs* MeasureGUI_PropertiesDlg::buildPrs()
|
||||
return getDisplayer()->BuildPrs( aResult );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -103,9 +103,9 @@ void OperationGUI_ArchimedeDlg::Init()
|
||||
double SpecificStep1 = 0.1;
|
||||
double SpecificStep2 = 0.01;
|
||||
/* min, max, myStep and decimals for spin boxes & initial values */
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, myStep, 3);
|
||||
GroupPoints->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep1, 3);
|
||||
GroupPoints->SpinBox_DZ->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep2, 3);
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, myStep, DBL_DIGITS_DISPLAY);
|
||||
GroupPoints->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep1, DBL_DIGITS_DISPLAY);
|
||||
GroupPoints->SpinBox_DZ->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep2, DBL_DIGITS_DISPLAY);
|
||||
|
||||
GroupPoints->SpinBox_DX->SetValue( 100.0 );
|
||||
GroupPoints->SpinBox_DY->SetValue( 1.0 );
|
||||
|
@ -146,7 +146,7 @@ OperationGUI_ChamferDlg::OperationGUI_ChamferDlg(GeometryGUI* theGeometryGUI, QW
|
||||
double SpecificStep = 10.0;
|
||||
QMap< int, DlgRef_SpinBox* >::iterator anIter;
|
||||
for ( anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter )
|
||||
anIter.data()->RangeStepAndValidator( 0.001, COORD_MAX, SpecificStep, 3 );
|
||||
anIter.data()->RangeStepAndValidator( 0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY );
|
||||
|
||||
setHelpFileName("chamfer.htm");
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
// File : OperationGUI_ClippingDlg.cxx
|
||||
// Author : Michael Zorin
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
// $Header$
|
||||
|
||||
#include "OperationGUI_ClippingDlg.h"
|
||||
#include "DlgRef_SpinBox.h"
|
||||
@ -41,8 +41,6 @@
|
||||
#include <V3d_View.hxx>
|
||||
#include <V3d.hxx>
|
||||
|
||||
//#include <V3d_Plane.hxx>
|
||||
|
||||
// QT Includes
|
||||
#include <qapplication.h>
|
||||
#include <qgroupbox.h>
|
||||
@ -109,8 +107,8 @@ OperationGUI_ClippingDlg::OperationGUI_ClippingDlg(GeometryGUI* theGeometryGUI,
|
||||
Layout1->addWidget( GroupArguments, 2, 0 );
|
||||
|
||||
/* Initialisations */
|
||||
SpinBox_Near->RangeStepAndValidator( COORD_MIN, COORD_MAX, 10.0, 3 );
|
||||
SpinBox_Far->RangeStepAndValidator( COORD_MIN, COORD_MAX, 10.0, 3 );
|
||||
SpinBox_Near->RangeStepAndValidator( COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY );
|
||||
SpinBox_Far->RangeStepAndValidator( COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY );
|
||||
|
||||
/* signals and slots connections */
|
||||
connect( buttonOk , SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||
|
@ -105,9 +105,9 @@ OperationGUI_FilletDlg::OperationGUI_FilletDlg(GeometryGUI* theGeometryGUI, QWid
|
||||
/***************************************************************/
|
||||
|
||||
double SpecificStep = 10.0;
|
||||
Group1->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, 3);
|
||||
Group2->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, 3);
|
||||
Group3->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, 3);
|
||||
Group1->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
||||
Group2->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
||||
Group3->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
||||
|
||||
setHelpFileName("fillet.htm");
|
||||
|
||||
|
@ -124,13 +124,13 @@ void TransformationGUI_MultiRotationDlg::Init()
|
||||
double SpecificStep1 = 5;
|
||||
double SpecificStep2 = 1;
|
||||
/* min, max, step and decimals for spin boxes & initial values */
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep2, 3);
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep2, 10);
|
||||
GroupPoints->SpinBox_DX->SetValue(myNbTimes1);
|
||||
|
||||
GroupDimensions->SpinBox_DX1->RangeStepAndValidator(COORD_MIN, COORD_MAX, SpecificStep1, 3);
|
||||
GroupDimensions->SpinBox_DY1->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep2, 3);
|
||||
GroupDimensions->SpinBox_DX2->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupDimensions->SpinBox_DY2->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep2, 3);
|
||||
GroupDimensions->SpinBox_DX1->RangeStepAndValidator(COORD_MIN, COORD_MAX, SpecificStep1, DBL_DIGITS_DISPLAY);
|
||||
GroupDimensions->SpinBox_DY1->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep2, 10);
|
||||
GroupDimensions->SpinBox_DX2->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupDimensions->SpinBox_DY2->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep2, 10);
|
||||
GroupDimensions->SpinBox_DX1->SetValue(myAng);
|
||||
GroupDimensions->SpinBox_DY1->SetValue(myNbTimes1);
|
||||
GroupDimensions->SpinBox_DX2->SetValue(myStep);
|
||||
|
@ -130,15 +130,15 @@ void TransformationGUI_MultiTranslationDlg::Init()
|
||||
|
||||
double SpecificStep = 1;
|
||||
/* min, max, step and decimals for spin boxes & initial values */
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupPoints->SpinBox_DY->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep, 3);
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupPoints->SpinBox_DY->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep, 10);
|
||||
GroupPoints->SpinBox_DX->SetValue(myStepU);
|
||||
GroupPoints->SpinBox_DY->SetValue(myNbTimesU);
|
||||
|
||||
GroupDimensions->SpinBox_DX1->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupDimensions->SpinBox_DY1->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep, 3);
|
||||
GroupDimensions->SpinBox_DX2->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupDimensions->SpinBox_DY2->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep, 3);
|
||||
GroupDimensions->SpinBox_DX1->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupDimensions->SpinBox_DY1->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep, 10);
|
||||
GroupDimensions->SpinBox_DX2->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupDimensions->SpinBox_DY2->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep, 10);
|
||||
GroupDimensions->SpinBox_DX1->SetValue(myStepU);
|
||||
GroupDimensions->SpinBox_DY1->SetValue(myNbTimesU);
|
||||
GroupDimensions->SpinBox_DX2->SetValue(myStepV);
|
||||
@ -182,7 +182,6 @@ void TransformationGUI_MultiTranslationDlg::Init()
|
||||
connect(myGeomGUI->getApp()->selectionMgr(),
|
||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
|
||||
|
||||
initName( tr( "GEOM_MULTITRANSLATION" ) );
|
||||
ConstructorsClicked( 0 );
|
||||
}
|
||||
@ -281,9 +280,11 @@ void TransformationGUI_MultiTranslationDlg::SelectionIntoArgument()
|
||||
myEditCurrentArgument->setText("");
|
||||
|
||||
if (IObjectCount() != 1) {
|
||||
if(myEditCurrentArgument == GroupPoints->LineEdit1 || myEditCurrentArgument == GroupDimensions->LineEdit1)
|
||||
if (myEditCurrentArgument == GroupPoints->LineEdit1 ||
|
||||
myEditCurrentArgument == GroupDimensions->LineEdit1)
|
||||
myBase = GEOM::GEOM_Object::_nil();
|
||||
else if(myEditCurrentArgument == GroupPoints->LineEdit2 || myEditCurrentArgument == GroupDimensions->LineEdit2)
|
||||
else if (myEditCurrentArgument == GroupPoints->LineEdit2 ||
|
||||
myEditCurrentArgument == GroupDimensions->LineEdit2)
|
||||
myVectorU = GEOM::GEOM_Object::_nil();
|
||||
else if (myEditCurrentArgument == GroupDimensions->LineEdit3)
|
||||
myVectorV = GEOM::GEOM_Object::_nil();
|
||||
@ -297,9 +298,11 @@ void TransformationGUI_MultiTranslationDlg::SelectionIntoArgument()
|
||||
if ( !testResult || CORBA::is_nil( aSelectedObject ) || !GEOMBase::IsShape( aSelectedObject ) )
|
||||
return;
|
||||
|
||||
if(myEditCurrentArgument == GroupPoints->LineEdit1 || myEditCurrentArgument == GroupDimensions->LineEdit1)
|
||||
if (myEditCurrentArgument == GroupPoints->LineEdit1 ||
|
||||
myEditCurrentArgument == GroupDimensions->LineEdit1)
|
||||
myBase = aSelectedObject;
|
||||
else if(myEditCurrentArgument == GroupPoints->LineEdit2 || myEditCurrentArgument == GroupDimensions->LineEdit2)
|
||||
else if (myEditCurrentArgument == GroupPoints->LineEdit2 ||
|
||||
myEditCurrentArgument == GroupDimensions->LineEdit2)
|
||||
myVectorU = aSelectedObject;
|
||||
else if (myEditCurrentArgument == GroupDimensions->LineEdit3)
|
||||
myVectorV = aSelectedObject;
|
||||
@ -318,7 +321,6 @@ void TransformationGUI_MultiTranslationDlg::SetEditCurrentArgument()
|
||||
{
|
||||
QPushButton* send = (QPushButton*)sender();
|
||||
|
||||
|
||||
if(send == GroupPoints->PushButton1) {
|
||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||
globalSelection( GEOM_ALLSHAPES );
|
||||
|
@ -108,9 +108,7 @@ void TransformationGUI_OffsetDlg::Init()
|
||||
double step = 1;
|
||||
|
||||
/* min, max, step and decimals for spin boxes & initial values */
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupPoints->SpinBox_DX->setPrecision(5);
|
||||
//@ GroupPoints->SpinBox_DX->setDblPrecision(1e-05);
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupPoints->SpinBox_DX->SetValue(1e-05);
|
||||
|
||||
// Activate Create a Copy mode
|
||||
@ -131,7 +129,6 @@ void TransformationGUI_OffsetDlg::Init()
|
||||
initName( tr( "GEOM_OFFSET" ) );
|
||||
|
||||
globalSelection( GEOM_ALLSHAPES );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -295,19 +292,19 @@ bool TransformationGUI_OffsetDlg::execute( ObjectList& objects )
|
||||
|
||||
GEOM::GEOM_Object_var anObj;
|
||||
|
||||
|
||||
if (GroupPoints->CheckButton1->isChecked() || IsPreview())
|
||||
for (int i = 0; i < myObjects.length(); i++)
|
||||
{
|
||||
|
||||
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->OffsetShapeCopy( myObjects[i], GetOffset() );
|
||||
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
|
||||
OffsetShapeCopy( myObjects[i], GetOffset() );
|
||||
if ( !anObj->_is_nil() )
|
||||
objects.push_back( anObj._retn() );
|
||||
}
|
||||
else
|
||||
for (int i = 0; i < myObjects.length(); i++)
|
||||
{
|
||||
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->OffsetShape( myObjects[i], GetOffset() );
|
||||
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
|
||||
OffsetShape( myObjects[i], GetOffset() );
|
||||
if ( !anObj->_is_nil() )
|
||||
objects.push_back( anObj._retn() );
|
||||
}
|
||||
|
@ -88,10 +88,11 @@ TransformationGUI_RotationDlg::TransformationGUI_RotationDlg
|
||||
|
||||
Layout1->addWidget(GroupPoints, 2, 0);
|
||||
/***************************************************************/
|
||||
|
||||
double anAngle = 0;
|
||||
double SpecificStep = 5;
|
||||
/* min, max, step and decimals for spin boxes & initial values */
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, SpecificStep, 3);
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
||||
GroupPoints->SpinBox_DX->SetValue(anAngle);
|
||||
|
||||
// Activate Create a Copy mode
|
||||
@ -413,14 +414,16 @@ bool TransformationGUI_RotationDlg::execute( ObjectList& objects )
|
||||
if (toCreateCopy)
|
||||
for (int i = 0; i < myObjects.length(); i++)
|
||||
{
|
||||
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->RotateCopy( myObjects[i], myAxis, GetAngle() * PI180 );
|
||||
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
|
||||
RotateCopy( myObjects[i], myAxis, GetAngle() * PI180 );
|
||||
if ( !anObj->_is_nil() )
|
||||
objects.push_back( anObj._retn() );
|
||||
}
|
||||
else
|
||||
for (int i = 0; i < myObjects.length(); i++)
|
||||
{
|
||||
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->Rotate( myObjects[i], myAxis, GetAngle() * PI180 );
|
||||
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
|
||||
Rotate( myObjects[i], myAxis, GetAngle() * PI180 );
|
||||
if ( !anObj->_is_nil() )
|
||||
objects.push_back( anObj._retn() );
|
||||
}
|
||||
@ -432,14 +435,16 @@ bool TransformationGUI_RotationDlg::execute( ObjectList& objects )
|
||||
if (toCreateCopy)
|
||||
for (int i = 0; i < myObjects.length(); i++)
|
||||
{
|
||||
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->RotateThreePointsCopy( myObjects[i], myCentPoint, myPoint1, myPoint2 );
|
||||
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
|
||||
RotateThreePointsCopy( myObjects[i], myCentPoint, myPoint1, myPoint2 );
|
||||
if ( !anObj->_is_nil() )
|
||||
objects.push_back( anObj._retn() );
|
||||
}
|
||||
else
|
||||
for (int i = 0; i < myObjects.length(); i++)
|
||||
{
|
||||
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->RotateThreePoints( myObjects[i], myCentPoint, myPoint1, myPoint2 );
|
||||
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
|
||||
RotateThreePoints( myObjects[i], myCentPoint, myPoint1, myPoint2 );
|
||||
if ( !anObj->_is_nil() )
|
||||
objects.push_back( anObj._retn() );
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ TransformationGUI_ScaleDlg::TransformationGUI_ScaleDlg(GeometryGUI* theGeometryG
|
||||
double aFactor = 2.0;
|
||||
double SpecificStep = 0.5;
|
||||
/* min, max, step and decimals for spin boxes & initial values */
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, SpecificStep, 3);
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
||||
GroupPoints->SpinBox_DX->SetValue(aFactor);
|
||||
|
||||
// Activate Create a Copy mode
|
||||
@ -311,14 +311,16 @@ bool TransformationGUI_ScaleDlg::execute( ObjectList& objects )
|
||||
if (GroupPoints->CheckButton1->isChecked() || IsPreview())
|
||||
for (int i = 0; i < myObjects.length(); i++)
|
||||
{
|
||||
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->ScaleShapeCopy( myObjects[i], myPoint, GetFactor() );
|
||||
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
|
||||
ScaleShapeCopy( myObjects[i], myPoint, GetFactor() );
|
||||
if ( !anObj->_is_nil() )
|
||||
objects.push_back( anObj._retn() );
|
||||
}
|
||||
else
|
||||
for (int i = 0; i < myObjects.length(); i++)
|
||||
{
|
||||
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->ScaleShape( myObjects[i], myPoint, GetFactor() );
|
||||
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
|
||||
ScaleShape( myObjects[i], myPoint, GetFactor() );
|
||||
if ( !anObj->_is_nil() )
|
||||
objects.push_back( anObj._retn() );
|
||||
}
|
||||
|
@ -124,9 +124,9 @@ void TransformationGUI_TranslationDlg::Init()
|
||||
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
|
||||
|
||||
/* min, max, step and decimals for spin boxes & initial values */
|
||||
GroupPoints->SpinBox1->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupPoints->SpinBox2->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupPoints->SpinBox3->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupPoints->SpinBox1->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupPoints->SpinBox2->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupPoints->SpinBox3->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
|
||||
GroupPoints->SpinBox1->SetValue(0.0);
|
||||
GroupPoints->SpinBox2->SetValue(0.0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user