From c48cfadada2d5626dbdfdd73d09cba5c6b42f1ae Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 20 Sep 2010 11:57:23 +0000 Subject: [PATCH] 0020979: EDF 1168 GEOM: non coherence of display of decimal values --- src/BasicGUI/BasicGUI_PointDlg.cxx | 8 +- src/DlgRef/DlgRef.cxx | 28 +- src/MeasureGUI/Makefile.am | 2 +- src/MeasureGUI/MeasureGUI_AngleDlg.cxx | 4 +- src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx | 16 +- src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx | 9 +- src/MeasureGUI/MeasureGUI_DistanceDlg.cxx | 11 +- src/MeasureGUI/MeasureGUI_InertiaDlg.cxx | 25 +- src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx | 16 +- src/MeasureGUI/MeasureGUI_PointDlg.cxx | 8 +- src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx | 8 +- src/MeasureGUI/MeasureGUI_WhatisDlg.cxx | 337 +++++++++--------- 12 files changed, 248 insertions(+), 224 deletions(-) diff --git a/src/BasicGUI/BasicGUI_PointDlg.cxx b/src/BasicGUI/BasicGUI_PointDlg.cxx index aae91ce3b..6fe83b1e4 100644 --- a/src/BasicGUI/BasicGUI_PointDlg.cxx +++ b/src/BasicGUI/BasicGUI_PointDlg.cxx @@ -899,9 +899,11 @@ bool BasicGUI_PointDlg::execute( ObjectList& objects ) if ( GEOMBase::GetShape( anObj, aShape ) && !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) { gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) ); - myX->setText( DlgRef::PrintDoubleValue( aPnt.X() ) ); - myY->setText( DlgRef::PrintDoubleValue( aPnt.Y() ) ); - myZ->setText( DlgRef::PrintDoubleValue( aPnt.Z() ) ); + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); + int aPrecision = resMgr->integerValue( "Geometry", "length_precision", 6 ); + myX->setText( DlgRef::PrintDoubleValue( aPnt.X(), aPrecision ) ); + myY->setText( DlgRef::PrintDoubleValue( aPnt.Y(), aPrecision ) ); + myZ->setText( DlgRef::PrintDoubleValue( aPnt.Z(), aPrecision ) ); } else { myX->setText( "" ); diff --git a/src/DlgRef/DlgRef.cxx b/src/DlgRef/DlgRef.cxx index 94c2ece07..9bd1c3fb3 100644 --- a/src/DlgRef/DlgRef.cxx +++ b/src/DlgRef/DlgRef.cxx @@ -781,12 +781,12 @@ QString DlgRef::PrintDoubleValue( double theValue, int thePrecision ) if ( qAbs(theValue) < prec ) return "0"; - QString aRes = QLocale().toString( theValue, 'g', qAbs( thePrecision ) ); + QString aRes = QLocale().toString( theValue, thePrecision >= 0 ? 'f' : 'g', qAbs( thePrecision ) ); if ( prec > 0 ) { int p = 0; while ( p < thePrecision ) { - QString aRes = QLocale().toString( theValue, 'g', qAbs( p++ ) ); + QString aRes = QLocale().toString( theValue, thePrecision >= 0 ? 'f' : 'g', qAbs( p++ ) ); double v = aRes.toDouble(); double err = qAbs( theValue - v ); if ( err > 0 && err <= prec ) @@ -795,21 +795,19 @@ QString DlgRef::PrintDoubleValue( double theValue, int thePrecision ) } // remove trailing zeroes - QString delim( QLocale().decimalPoint() ); - int idx = aRes.lastIndexOf( delim ); - if ( idx == -1 ) - return aRes; + QRegExp expre( QString( "(%1|%2)[+-]?[0-9]+$" ).arg( QLocale().exponential().toLower(), + QLocale().exponential().toUpper() ) ); - QString iPart = aRes.left( idx ); - QString fPart = aRes.mid( idx + 1 ); - - while ( !fPart.isEmpty() && fPart.at( fPart.length() - 1 ) == '0' ) - fPart.remove( fPart.length() - 1, 1 ); + int idx = aRes.indexOf( expre ); + QString aResExp = ""; + if ( idx >= 0 ) { + aResExp = aRes.mid( idx ); + aRes = aRes.left( idx ); + } - aRes = iPart; - if ( !fPart.isEmpty() ) - aRes += delim + fPart; + if ( aRes.contains( QLocale().decimalPoint() ) ) + aRes.remove( QRegExp( QString( "(\\%1|0)0*$" ).arg( QLocale().decimalPoint() ) ) ); - return aRes; + return aRes == "-0" ? QString( "0" ) : aRes + aResExp; } diff --git a/src/MeasureGUI/Makefile.am b/src/MeasureGUI/Makefile.am index d495ab36b..e555d2d2f 100644 --- a/src/MeasureGUI/Makefile.am +++ b/src/MeasureGUI/Makefile.am @@ -118,5 +118,5 @@ libMeasureGUI_la_CPPFLAGS = \ libMeasureGUI_la_LDFLAGS = \ $(CAS_LDFLAGS) -lTKGeomBase \ - ../GEOMBase/libGEOMBase.la + ../GEOMBase/libGEOMBase.la ../DlgRef/libDlgRef.la diff --git a/src/MeasureGUI/MeasureGUI_AngleDlg.cxx b/src/MeasureGUI/MeasureGUI_AngleDlg.cxx index e59a4498e..b49a52284 100644 --- a/src/MeasureGUI/MeasureGUI_AngleDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_AngleDlg.cxx @@ -196,7 +196,9 @@ void MeasureGUI_AngleDlg::processObject() double anAngle = 0.; if (getParameters(anAngle)) { - myGrp->LineEdit3->setText(DlgRef::PrintDoubleValue(anAngle)); + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); + int aPrecision = resMgr->integerValue( "Geometry", "angle_precision", 6 ); + myGrp->LineEdit3->setText(DlgRef::PrintDoubleValue(anAngle, aPrecision)); redisplayPreview(); } else { diff --git a/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx b/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx index 5794fae1f..501517307 100644 --- a/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx @@ -30,6 +30,7 @@ #include "GeometryGUI.h" #include +#include #include #include @@ -143,14 +144,17 @@ void MeasureGUI_BndBoxDlg::processObject() myGrp->LineEdit32->setText( "" ); } else { - myGrp->LineEdit11->setText( tr( "%1" ).arg( aXMin, 12, 'f', 6 ) ); - myGrp->LineEdit12->setText( tr( "%1" ).arg( aXMax, 12, 'f', 6 ) ); + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); + int aPrecision = resMgr->integerValue( "Geometry", "length_precision", 6 ); - myGrp->LineEdit21->setText( tr( "%1" ).arg( aYMin, 12, 'f', 6 ) ); - myGrp->LineEdit22->setText( tr( "%1" ).arg( aYMax, 12, 'f', 6 ) ); + myGrp->LineEdit11->setText( DlgRef::PrintDoubleValue( aXMin, aPrecision ) ); + myGrp->LineEdit12->setText( DlgRef::PrintDoubleValue( aXMax, aPrecision ) ); - myGrp->LineEdit31->setText( tr( "%1" ).arg( aZMin, 12, 'f', 6 ) ); - myGrp->LineEdit32->setText( tr( "%1" ).arg( aZMax, 12, 'f', 6 ) ); + myGrp->LineEdit21->setText( DlgRef::PrintDoubleValue( aYMin, aPrecision ) ); + myGrp->LineEdit22->setText( DlgRef::PrintDoubleValue( aYMax, aPrecision ) ); + + myGrp->LineEdit31->setText( DlgRef::PrintDoubleValue( aZMin, aPrecision ) ); + myGrp->LineEdit32->setText( DlgRef::PrintDoubleValue( aZMax, aPrecision ) ); } } diff --git a/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx b/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx index 451743a53..b4a909c68 100644 --- a/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx @@ -244,9 +244,12 @@ void MeasureGUI_CenterMassDlg::processObject() getParameters( x, y, z ); myGrp->LineEdit1->setText( GEOMBase::GetName( myObj ) ); - myGrp->LineEdit2->setText( DlgRef::PrintDoubleValue( x ) ); - myGrp->LineEdit3->setText( DlgRef::PrintDoubleValue( y ) ); - myGrp->LineEdit4->setText( DlgRef::PrintDoubleValue( z ) ); + + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); + int aPrecision = resMgr->integerValue( "Geometry", "length_precision", 6 ); + myGrp->LineEdit2->setText( DlgRef::PrintDoubleValue( x, aPrecision ) ); + myGrp->LineEdit3->setText( DlgRef::PrintDoubleValue( y, aPrecision ) ); + myGrp->LineEdit4->setText( DlgRef::PrintDoubleValue( z, aPrecision ) ); displayPreview(); } diff --git a/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx b/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx index 3be5f624a..baf8a5897 100644 --- a/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx @@ -180,12 +180,15 @@ void MeasureGUI_DistanceDlg::processObject() gp_Pnt aPnt1, aPnt2; double aDist = 0.; if (getParameters(aDist, aPnt1, aPnt2)) { - myGrp->LineEdit3->setText(DlgRef::PrintDoubleValue(aDist)); + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); + int aPrecision = resMgr->integerValue( "Geometry", "length_precision", 6 ); + + myGrp->LineEdit3->setText(DlgRef::PrintDoubleValue(aDist, aPrecision)); gp_XYZ aVec = aPnt2.XYZ() - aPnt1.XYZ(); - myGrp->LineEdit4->setText(DlgRef::PrintDoubleValue(aVec.X())); - myGrp->LineEdit5->setText(DlgRef::PrintDoubleValue(aVec.Y())); - myGrp->LineEdit6->setText(DlgRef::PrintDoubleValue(aVec.Z())); + myGrp->LineEdit4->setText(DlgRef::PrintDoubleValue(aVec.X(), aPrecision)); + myGrp->LineEdit5->setText(DlgRef::PrintDoubleValue(aVec.Y(), aPrecision)); + myGrp->LineEdit6->setText(DlgRef::PrintDoubleValue(aVec.Z(), aPrecision)); redisplayPreview(); } diff --git a/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx b/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx index 9d2c323c4..f6beab88a 100644 --- a/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx @@ -28,6 +28,7 @@ #include "MeasureGUI_Widgets.h" #include +#include #include @@ -142,21 +143,21 @@ void MeasureGUI_InertiaDlg::processObject() myGrp->LineEdit43->setText( "" ); } else { - myGrp->LineEdit11->setText( QString( "%1" ).arg( aMat( 1, 1 ), 12, 'e', 4 ) ); - myGrp->LineEdit12->setText( QString( "%1" ).arg( aMat( 1, 2 ), 12, 'e', 4 ) ); - myGrp->LineEdit13->setText( QString( "%1" ).arg( aMat( 1, 3 ), 12, 'e', 4 ) ); + myGrp->LineEdit11->setText( DlgRef::PrintDoubleValue( aMat( 1, 1 ), -6 ) ); + myGrp->LineEdit12->setText( DlgRef::PrintDoubleValue( aMat( 1, 2 ), -6 ) ); + myGrp->LineEdit13->setText( DlgRef::PrintDoubleValue( aMat( 1, 3 ), -6 ) ); - myGrp->LineEdit21->setText( QString( "%1" ).arg( aMat( 2, 1 ), 12, 'e', 4 ) ); - myGrp->LineEdit22->setText( QString( "%1" ).arg( aMat( 2, 2 ), 12, 'e', 4 ) ); - myGrp->LineEdit23->setText( QString( "%1" ).arg( aMat( 2, 3 ), 12, 'e', 4 ) ); + myGrp->LineEdit21->setText( DlgRef::PrintDoubleValue( aMat( 2, 1 ), -6 ) ); + myGrp->LineEdit22->setText( DlgRef::PrintDoubleValue( aMat( 2, 2 ), -6 ) ); + myGrp->LineEdit23->setText( DlgRef::PrintDoubleValue( aMat( 2, 3 ), -6 ) ); - myGrp->LineEdit31->setText( QString( "%1" ).arg( aMat( 3, 1 ), 12, 'e', 4 ) ); - myGrp->LineEdit32->setText( QString( "%1" ).arg( aMat( 3, 2 ), 12, 'e', 4 ) ); - myGrp->LineEdit33->setText( QString( "%1" ).arg( aMat( 3, 3 ), 12, 'e', 4 ) ); + myGrp->LineEdit31->setText( DlgRef::PrintDoubleValue( aMat( 3, 1 ), -6 ) ); + myGrp->LineEdit32->setText( DlgRef::PrintDoubleValue( aMat( 3, 2 ), -6 ) ); + myGrp->LineEdit33->setText( DlgRef::PrintDoubleValue( aMat( 3, 3 ), -6 ) ); - myGrp->LineEdit41->setText( QString( "%1" ).arg( anIXYZ.X(), 12, 'e', 4 ) ); - myGrp->LineEdit42->setText( QString( "%1" ).arg( anIXYZ.Y(), 12, 'e', 4 ) ); - myGrp->LineEdit43->setText( QString( "%1" ).arg( anIXYZ.Z(), 12, 'e', 4 ) ); + myGrp->LineEdit41->setText( DlgRef::PrintDoubleValue( anIXYZ.X(), -6 ) ); + myGrp->LineEdit42->setText( DlgRef::PrintDoubleValue( anIXYZ.Y(), -6 ) ); + myGrp->LineEdit43->setText( DlgRef::PrintDoubleValue( anIXYZ.Z(), -6 ) ); } } diff --git a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx index b9a04fd2a..f3a6d0d46 100644 --- a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx @@ -26,6 +26,7 @@ // #include "MeasureGUI_MaxToleranceDlg.h" #include "MeasureGUI_Widgets.h" +#include "DlgRef.h" #include #include @@ -131,14 +132,17 @@ void MeasureGUI_MaxToleranceDlg::processObject() double invalidMin = RealLast(); double invalidMax = -RealLast(); - myGrp->LineEdit11->setText( aMinFaceToler != invalidMin ? QString( "%1" ).arg( aMinFaceToler, 5, 'e', 8 ) : QString("") ); - myGrp->LineEdit12->setText( aMaxFaceToler != invalidMax ? QString( "%1" ).arg( aMaxFaceToler, 5, 'e', 8 ) : QString("") ); + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); + int aPrecision = resMgr->integerValue( "Geometry", "len_tol_precision", -9); - myGrp->LineEdit21->setText( aMinEdgeToler != invalidMin ? QString( "%1" ).arg( aMinEdgeToler, 5, 'e', 8 ) : QString("") ); - myGrp->LineEdit22->setText( aMaxEdgeToler != invalidMax ? QString( "%1" ).arg( aMaxEdgeToler, 5, 'e', 8 ) : QString("") ); + myGrp->LineEdit11->setText( aMinFaceToler != invalidMin ? DlgRef::PrintDoubleValue( aMinFaceToler, aPrecision ) : QString("") ); + myGrp->LineEdit12->setText( aMaxFaceToler != invalidMax ? DlgRef::PrintDoubleValue( aMaxFaceToler, aPrecision ) : QString("") ); - myGrp->LineEdit31->setText( aMinVertexToler != invalidMin ? QString( "%1" ).arg( aMinVertexToler, 5, 'e', 8 ) : QString("") ); - myGrp->LineEdit32->setText( aMaxVertexToler != invalidMax ? QString( "%1" ).arg( aMaxVertexToler, 5, 'e', 8 ) : QString("") ); + myGrp->LineEdit21->setText( aMinEdgeToler != invalidMin ? DlgRef::PrintDoubleValue( aMinEdgeToler, aPrecision ) : QString("") ); + myGrp->LineEdit22->setText( aMaxEdgeToler != invalidMax ? DlgRef::PrintDoubleValue( aMaxEdgeToler, aPrecision ) : QString("") ); + + myGrp->LineEdit31->setText( aMinVertexToler != invalidMin ? DlgRef::PrintDoubleValue( aMinVertexToler, aPrecision ) : QString("") ); + myGrp->LineEdit32->setText( aMaxVertexToler != invalidMax ? DlgRef::PrintDoubleValue( aMaxVertexToler, aPrecision ) : QString("") ); } //================================================================================= diff --git a/src/MeasureGUI/MeasureGUI_PointDlg.cxx b/src/MeasureGUI/MeasureGUI_PointDlg.cxx index c7ea535f0..c7064a96b 100644 --- a/src/MeasureGUI/MeasureGUI_PointDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_PointDlg.cxx @@ -172,9 +172,11 @@ void MeasureGUI_PointDlg::SelectionIntoArgument() if ( !aPoint.IsNull() ) { gp_Pnt aPnt = BRep_Tool::Pnt( aPoint ); myGrp->LineEdit1->setText( aName ); - myGrp->LineEdit2->setText( DlgRef::PrintDoubleValue( aPnt.X() ) ); - myGrp->LineEdit3->setText( DlgRef::PrintDoubleValue( aPnt.Y() ) ); - myGrp->LineEdit4->setText( DlgRef::PrintDoubleValue( aPnt.Z() ) ); + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); + int aPrecision = resMgr->integerValue( "Geometry", "length_precision", 6 ); + myGrp->LineEdit2->setText( DlgRef::PrintDoubleValue( aPnt.X(), aPrecision ) ); + myGrp->LineEdit3->setText( DlgRef::PrintDoubleValue( aPnt.Y(), aPrecision ) ); + myGrp->LineEdit4->setText( DlgRef::PrintDoubleValue( aPnt.Z(), aPrecision ) ); } } catch( ... ) diff --git a/src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx b/src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx index 861658e28..9621487ed 100644 --- a/src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx @@ -139,9 +139,11 @@ void MeasureGUI_PropertiesDlg::processObject() myGrp->LineEdit4->setText( "" ); } else { - myGrp->LineEdit2->setText( DlgRef::PrintDoubleValue( aLength ) ); - myGrp->LineEdit3->setText( DlgRef::PrintDoubleValue( anArea ) ); - myGrp->LineEdit4->setText( DlgRef::PrintDoubleValue( aVolume ) ); + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); + int aPrecision = resMgr->integerValue( "Geometry", "length_precision", 6 ); + myGrp->LineEdit2->setText( DlgRef::PrintDoubleValue( aLength, aPrecision ) ); + myGrp->LineEdit3->setText( DlgRef::PrintDoubleValue( anArea, aPrecision ) ); + myGrp->LineEdit4->setText( DlgRef::PrintDoubleValue( aVolume, aPrecision ) ); } } diff --git a/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx b/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx index 04f91fb9e..b0d9695d6 100644 --- a/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx @@ -232,6 +232,9 @@ QString MeasureGUI_WhatisDlg::getKindOfShape( QString& theParameters ) QString aKindStr(""); theParameters = ""; + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); + int aLenPrecision = resMgr->integerValue( "Geometry", "length_precision", 6 ); + if ( myObj->_is_nil() ) return aKindStr; @@ -253,7 +256,7 @@ QString MeasureGUI_WhatisDlg::getKindOfShape( QString& theParameters ) if ( !anOper->IsDone() ) return aKindStr; -#define PRINT_DOUBLE(val) QString(" %1").arg( DlgRef::PrintDoubleValue( val ) ) +#define PRINT_DOUBLE(val, tol) DlgRef::PrintDoubleValue( val, tol ) switch ( aKind ) { case GEOM::GEOM_IKindOfShape::COMPOUND: @@ -284,84 +287,84 @@ QString MeasureGUI_WhatisDlg::getKindOfShape( QString& theParameters ) case GEOM::GEOM_IKindOfShape::SPHERE: aKindStr = tr( "GEOM_SPHERE" ); theParameters = tr( "GEOM_CENTER" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_DIMENSIONS" ) + - "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[3] ); + "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::CYLINDER: aKindStr = tr( "GEOM_CYLINDER" ); theParameters = tr( "GEOM_CENTER" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_AXIS" ) + - "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + - "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + - "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ) + "\n" + tr( "GEOM_DIMENSIONS" ) + - "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[6] ) + - "\n" + tr( "GEOM_HEIGHT" ) + PRINT_DOUBLE( aDbls[7] ); + "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) + + "\n" + tr( "GEOM_HEIGHT" ) + PRINT_DOUBLE( aDbls[7], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::BOX: aKindStr = tr( "GEOM_BOX" ); theParameters = tr( "GEOM_CENTER") + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_DIMENSIONS" ) + - "\n" + "Ax :" + PRINT_DOUBLE( aDbls[3] ) + - "\n" + "Ay :" + PRINT_DOUBLE( aDbls[4] ) + - "\n" + "Az :" + PRINT_DOUBLE( aDbls[5] ); + "\n" + "Ax :" + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + "Ay :" + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + "Az :" + PRINT_DOUBLE( aDbls[5], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::ROTATED_BOX: aKindStr = tr( "GEOM_BOX" ); theParameters = tr( "GEOM_CENTER" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\nZ Axis:" + - "\n" + "Zx :" + PRINT_DOUBLE( aDbls[3] ) + - "\n" + "Zy :" + PRINT_DOUBLE( aDbls[4] ) + - "\n" + "Zz :" + PRINT_DOUBLE( aDbls[5] ) + + "\n" + "Zx :" + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + "Zy :" + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + "Zz :" + PRINT_DOUBLE( aDbls[5], aLenPrecision ) + "\nX Axis:" + - "\n" + tr( "GEOM_X_I" ).arg( "x" ) + PRINT_DOUBLE( aDbls[6] ) + - "\n" + tr( "GEOM_X_I" ).arg( "y" ) + PRINT_DOUBLE( aDbls[7] ) + - "\n" + tr( "GEOM_X_I" ).arg( "z" ) + PRINT_DOUBLE( aDbls[8] ) + + "\n" + tr( "GEOM_X_I" ).arg( "x" ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) + + "\n" + tr( "GEOM_X_I" ).arg( "y" ) + PRINT_DOUBLE( aDbls[7], aLenPrecision ) + + "\n" + tr( "GEOM_X_I" ).arg( "z" ) + PRINT_DOUBLE( aDbls[8], aLenPrecision ) + "\nDimensions along local axes:" + - "\n" + "Ax :" + PRINT_DOUBLE( aDbls[9] ) + - "\n" + "Ay :" + PRINT_DOUBLE( aDbls[10] ) + - "\n" + "Az :" + PRINT_DOUBLE( aDbls[11] ); + "\n" + "Ax :" + PRINT_DOUBLE( aDbls[9], aLenPrecision ) + + "\n" + "Ay :" + PRINT_DOUBLE( aDbls[10], aLenPrecision ) + + "\n" + "Az :" + PRINT_DOUBLE( aDbls[11], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::TORUS: aKindStr = tr( "GEOM_TORUS" ); theParameters = tr( "GEOM_CENTER" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_AXIS" ) + - "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + - "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + - "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ) + "\n" + tr( "GEOM_DIMENSIONS" ) + - "\n" + tr( "GEOM_RADIUS_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[6] ) + - "\n" + tr( "GEOM_RADIUS_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[7] ); + "\n" + tr( "GEOM_RADIUS_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) + + "\n" + tr( "GEOM_RADIUS_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[7], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::CONE: aKindStr = tr( "GEOM_CONE" ); theParameters = tr( "GEOM_CENTER" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_AXIS" ) + - "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + - "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + - "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ) + "\n" + tr( "GEOM_DIMENSIONS" ) + - "\n" + tr( "GEOM_RADIUS_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[6] ) + - "\n" + tr( "GEOM_RADIUS_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[7] ) + - "\n" + tr( "GEOM_HEIGHT" ) + PRINT_DOUBLE( aDbls[8] ); + "\n" + tr( "GEOM_RADIUS_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) + + "\n" + tr( "GEOM_RADIUS_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[7], aLenPrecision ) + + "\n" + tr( "GEOM_HEIGHT" ) + PRINT_DOUBLE( aDbls[8], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::POLYHEDRON: aKindStr = tr( "GEOM_POLYHEDRON" ); @@ -373,114 +376,114 @@ QString MeasureGUI_WhatisDlg::getKindOfShape( QString& theParameters ) case GEOM::GEOM_IKindOfShape::SPHERE2D: aKindStr = tr( "GEOM_SURFSPHERE" ); theParameters = tr( "GEOM_CENTER" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_DIMENSIONS" ) + - "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[3] ); + "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::CYLINDER2D: aKindStr = tr( "GEOM_SURFCYLINDER" ); theParameters = tr( "GEOM_CENTER" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_AXIS" ) + - "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + - "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + - "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ) + "\n" + tr( "GEOM_DIMENSIONS" ) + - "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[6] ) + - "\n" + tr( "GEOM_HEIGHT" ) + PRINT_DOUBLE( aDbls[7] ); + "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) + + "\n" + tr( "GEOM_HEIGHT" ) + PRINT_DOUBLE( aDbls[7], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::TORUS2D: aKindStr = tr( "GEOM_SURFTORUS" ); theParameters = tr( "GEOM_CENTER" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_AXIS" ) + - "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + - "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + - "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ) + "\n" + tr( "GEOM_DIMENSIONS" ) + - "\n" + tr( "GEOM_RADIUS_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[6] ) + - "\n" + tr( "GEOM_RADIUS_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[7] ); + "\n" + tr( "GEOM_RADIUS_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) + + "\n" + tr( "GEOM_RADIUS_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[7], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::CONE2D: aKindStr = tr( "GEOM_SURFCONE" ); theParameters = tr( "GEOM_CENTER" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_AXIS" ) + - "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + - "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + - "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ) + "\n" + tr( "GEOM_DIMENSIONS" ) + - "\n" + tr( "GEOM_RADIUS_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[6] ) + - "\n" + tr( "GEOM_RADIUS_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[7] ) + - "\n" + tr( "GEOM_HEIGHT" ) + PRINT_DOUBLE( aDbls[8] ); + "\n" + tr( "GEOM_RADIUS_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) + + "\n" + tr( "GEOM_RADIUS_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[7], aLenPrecision ) + + "\n" + tr( "GEOM_HEIGHT" ) + PRINT_DOUBLE( aDbls[8], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::DISK_CIRCLE: aKindStr = tr( "GEOM_DISK_CIRCLE" ); theParameters = tr( "GEOM_CENTER" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_NORMAL" ) + - "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + - "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + - "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ) + "\n" + tr( "GEOM_DIMENSIONS" ) + - "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[6] ); + "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::DISK_ELLIPSE: aKindStr = tr( "GEOM_DISK_ELLIPSE" ); theParameters = tr( "GEOM_CENTER" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_NORMAL" ) + - "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + - "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + - "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ) + "\n" + tr( "GEOM_DIMENSIONS" ) + - "\n" + tr( "GEOM_RADIUS_MAJOR" ) + PRINT_DOUBLE( aDbls[6] ) + - "\n" + tr( "GEOM_RADIUS_MINOR" ) + PRINT_DOUBLE( aDbls[7] ); + "\n" + tr( "GEOM_RADIUS_MAJOR" ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) + + "\n" + tr( "GEOM_RADIUS_MINOR" ) + PRINT_DOUBLE( aDbls[7], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::POLYGON: aKindStr = tr( "GEOM_POLYGON" ); theParameters = tr( "GEOM_CENTER" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_NORMAL" ) + - "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + - "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + - "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ); + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::PLANE: aKindStr = tr( "GEOM_PLANE" ); theParameters = tr( "GEOM_CENTER" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_NORMAL" ) + - "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + - "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + - "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ); + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::PLANAR: aKindStr = tr( "GEOM_PLANAR_FACE" ); theParameters = tr( "GEOM_CENTER" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_NORMAL" ) + - "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + - "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + - "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ); + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::FACE: aKindStr = tr( "GEOM_FACE" ); @@ -489,94 +492,94 @@ QString MeasureGUI_WhatisDlg::getKindOfShape( QString& theParameters ) case GEOM::GEOM_IKindOfShape::CIRCLE: aKindStr = tr( "GEOM_CIRCLE" ); theParameters = tr( "GEOM_CENTER" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_NORMAL" ) + - "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + - "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + - "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ) + "\n" + tr( "GEOM_DIMENSIONS" ) + - "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[6] ); + "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::ARC_CIRCLE: aKindStr = tr( "GEOM_ARC" ); theParameters = tr( "GEOM_CENTER" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_NORMAL" ) + - "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + - "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + - "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ) + "\n" + tr( "GEOM_DIMENSIONS" ) + - "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[6] ) + + "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) + "\n" + tr( "GEOM_POINT_I" ).arg( 1 ) + - "\n" + tr( "GEOM_X_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[7] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[8] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[9] ) + + "\n" + tr( "GEOM_X_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[7], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[8], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[9], aLenPrecision ) + "\n" + tr( "GEOM_POINT_I" ).arg( 2 ) + - "\n" + tr( "GEOM_X_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[10] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[11] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[12] ); + "\n" + tr( "GEOM_X_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[10], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[11], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[12], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::ELLIPSE: aKindStr = tr( "GEOM_ELLIPSE" ); theParameters = tr( "GEOM_CENTER" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_NORMAL" ) + - "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + - "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + - "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ) + "\n" + tr( "GEOM_DIMENSIONS" ) + - "\n" + tr( "GEOM_RADIUS_MAJOR" ) + PRINT_DOUBLE( aDbls[6] ) + - "\n" + tr( "GEOM_RADIUS_MINOR" ) + PRINT_DOUBLE( aDbls[7] ); + "\n" + tr( "GEOM_RADIUS_MAJOR" ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) + + "\n" + tr( "GEOM_RADIUS_MINOR" ) + PRINT_DOUBLE( aDbls[7], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::ARC_ELLIPSE: aKindStr = tr( "GEOM_ARC_ELLIPSE" ); theParameters = tr( "GEOM_CENTER" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_NORMAL" ) + - "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + - "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + - "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ) + "\n" + tr( "GEOM_DIMENSIONS" ) + - "\n" + tr( "GEOM_RADIUS_MAJOR" ) + PRINT_DOUBLE( aDbls[6] ) + - "\n" + tr( "GEOM_RADIUS_MINOR" ) + PRINT_DOUBLE( aDbls[7] ) + + "\n" + tr( "GEOM_RADIUS_MAJOR" ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) + + "\n" + tr( "GEOM_RADIUS_MINOR" ) + PRINT_DOUBLE( aDbls[7], aLenPrecision ) + "\n" + tr( "GEOM_POINT_I" ).arg( 1 ) + - "\n" + tr( "GEOM_X_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[8] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[9] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[10] ) + + "\n" + tr( "GEOM_X_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[8], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[9], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[10], aLenPrecision ) + "\n" + tr( "GEOM_POINT_I" ).arg( 2 ) + - "\n" + tr( "GEOM_X_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[11] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[12] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[13] ); + "\n" + tr( "GEOM_X_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[11], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[12], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[13], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::LINE: aKindStr = tr( "GEOM_LINE" ); theParameters = tr( "GEOM_POSITION" ) + - "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_DIRECTION" ) + - "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + - "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + - "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ); + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::SEGMENT: aKindStr = tr( "GEOM_SEGMENT" ); theParameters = tr( "GEOM_POINT_I" ).arg( 1 ) + - "\n" + tr( "GEOM_X_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_X_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) + "\n" + tr( "GEOM_POINT_I" ).arg( 2 ) + - "\n" + tr( "GEOM_X_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[3] ) + - "\n" + tr( "GEOM_Y_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[4] ) + - "\n" + tr( "GEOM_Z_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[5] ); + "\n" + tr( "GEOM_X_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) + + "\n" + tr( "GEOM_Y_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + + "\n" + tr( "GEOM_Z_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::EDGE: aKindStr = tr( "GEOM_EDGE" ); @@ -584,9 +587,9 @@ QString MeasureGUI_WhatisDlg::getKindOfShape( QString& theParameters ) case GEOM::GEOM_IKindOfShape::VERTEX: aKindStr = tr( "GEOM_VERTEX" ); theParameters = tr( "GEOM_COORDINATES" ) + - "\n" + tr( "GEOM_X" ) + PRINT_DOUBLE( aDbls[0] ) + - "\n" + tr( "GEOM_Y" ) + PRINT_DOUBLE( aDbls[1] ) + - "\n" + tr( "GEOM_Z" ) + PRINT_DOUBLE( aDbls[2] ); + "\n" + tr( "GEOM_X" ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) + + "\n" + tr( "GEOM_Y" ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) + + "\n" + tr( "GEOM_Z" ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ); break; case GEOM::GEOM_IKindOfShape::ADVANCED: { -- 2.39.2