Back to index

salome-geom  6.5.0
MeasureGUI_WhatisDlg.cxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 // GEOM GEOMGUI : GUI for Geometry component
00024 // File   : MeasureGUI_WhatisDlg.cxx
00025 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
00026 //
00027 #include "MeasureGUI_WhatisDlg.h"
00028 #include "MeasureGUI_Widgets.h"
00029 
00030 #include <DlgRef.h>
00031 #include <GEOMBase.h>
00032 
00033 #include <SUIT_Session.h>
00034 #include <SUIT_ResourceMgr.h>
00035 #include <SalomeApp_Tools.h>
00036 
00037 #include <QGroupBox>
00038 #include <QScrollBar>
00039 #include <QMessageBox>
00040 
00041 class MeasureGUI_WhatisDlg::Whatis : public QGroupBox
00042 { 
00043 public:
00044   Whatis( QWidget* parent );
00045   ~Whatis();
00046 
00047   QLabel*      TextLabel1;
00048   QPushButton* PushButton1;
00049   QLineEdit*   LineEdit1;
00050   
00051   QTextEdit*   TextEdit1;
00052   
00053   QLabel*      TextLabel2;
00054   QLineEdit*   LineEdit2;
00055   QPushButton* PushButton2;
00056 };
00057 
00058 //=================================================================================
00059 // Constructs a MeasureGUI_Whatis_QTD which is a child of 'parent', with the
00060 // name 'name' and widget flags set to 'f'
00061 //=================================================================================
00062 MeasureGUI_WhatisDlg::Whatis::Whatis( QWidget* parent )
00063   : QGroupBox( parent )
00064 {
00065   QGridLayout* topLayout = new QGridLayout( this );
00066   topLayout->setMargin( 11 );
00067   topLayout->setSpacing( 6 );
00068 
00069   TextLabel1  = new QLabel( this );
00070   PushButton1 = new QPushButton( this );
00071   LineEdit1   = new QLineEdit( this );
00072   TextEdit1   = new QTextEdit( this );
00073   TextLabel2  = new QLabel( this );
00074   LineEdit2   = new QLineEdit( this);
00075   PushButton2 = new QPushButton( this );
00076 
00077   topLayout->addWidget( TextLabel1,  0, 0 );
00078   topLayout->addWidget( PushButton1, 0, 1 );
00079   topLayout->addWidget( LineEdit1,   0, 2, 1, 2 );
00080   topLayout->addWidget( TextEdit1,   1, 0, 1, 4 );
00081   topLayout->addWidget( TextLabel2 , 2, 0 );
00082   topLayout->addWidget( LineEdit2  , 2, 1, 1, 2 );
00083   topLayout->addWidget( PushButton2, 2, 3 );
00084 }
00085 
00086 //=================================================================================
00087 // Destroys the object and frees any allocated resources
00088 //=================================================================================
00089 MeasureGUI_WhatisDlg::Whatis::~Whatis()
00090 {
00091 }
00092 
00093 //=================================================================================
00094 // class    : MeasureGUI_WhatisDlg( )
00095 // purpose  : Constructs a MeasureGUI_WhatisDlg which is a child of 'parent', with the
00096 //            name 'name' and widget flags set to 'f'.
00097 //            The dialog will by default be modeless, unless you set 'modal' to
00098 //            true to construct a modal dialog.
00099 //=================================================================================
00100 MeasureGUI_WhatisDlg::MeasureGUI_WhatisDlg( GeometryGUI* GUI, QWidget* parent )
00101   : MeasureGUI_Skeleton( GUI, parent )
00102 {
00103   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
00104   QPixmap image0( resMgr->loadPixmap( "GEOM", tr( "ICON_DLG_WHATIS" ) ) );
00105   QPixmap image1( resMgr->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
00106 
00107   setWindowTitle( tr( "GEOM_WHATIS_TITLE" ) );
00108 
00109   /***************************************************************/
00110   
00111   mainFrame()->GroupConstructors->setTitle( tr( "GEOM_WHATIS" ) );
00112   mainFrame()->RadioButton1->setIcon( image0 );
00113 
00114   myGrp = new Whatis( this );
00115 
00116   myGrp->setTitle( tr( "GEOM_WHATIS_OBJECT" ) );
00117 
00118   myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) );
00119   myGrp->PushButton1->setIcon( image1 );
00120   myGrp->PushButton1->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
00121   myGrp->LineEdit1->setReadOnly( true );
00122 
00123   myGrp->TextEdit1->setReadOnly( true );
00124   // fix height to fit all text
00125   myGrp->TextEdit1->setLineWrapMode( QTextEdit::NoWrap );
00126   // myGrp->TextEdit1->setTextFormat( Qt::PlainText ); // VSR : TODO
00127   QString allLines ("\n\n\n\n\n\n\n\n\n"); // 10 lines
00128   myGrp->TextEdit1->setText( allLines );
00129   int sbHeight = myGrp->TextEdit1->horizontalScrollBar()->height();
00130   myGrp->TextEdit1->setFixedHeight( myGrp->TextEdit1->document()->size().height() + sbHeight );
00131 
00132   myGrp->TextLabel2->setText( tr( "GEOM_KIND_OF_SHAPE" ) );
00133   myGrp->LineEdit2->setReadOnly( true );
00134   myGrp->LineEdit2->setMinimumWidth( 150 );
00135   myGrp->PushButton2->setText( tr( "GEOM_PROPERTIES" ) );
00136   myGrp->PushButton2->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
00137 
00138   QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
00139   layout->setMargin( 0 ); layout->setSpacing( 6 );
00140   layout->addWidget( myGrp );
00141 
00142   // Properties dialog
00143   myParamsDlg = new QMessageBox(QMessageBox::Information, "", "", QMessageBox::Ok, this);
00144   myParamsDlg->setModal( false );
00145 
00146   /***************************************************************/
00147 
00148   myHelpFileName = "using_measurement_tools_page.html#whatis_anchor";
00149 
00150   /* Initialisation */
00151   Init();
00152 }
00153 
00154 //=================================================================================
00155 // function : ~MeasureGUI_WhatisDlg()
00156 // purpose  : Destroys the object and frees any allocated resources
00157 //=================================================================================
00158 MeasureGUI_WhatisDlg::~MeasureGUI_WhatisDlg()
00159 {
00160 }
00161 
00162 //=================================================================================
00163 // function : Init()
00164 // purpose  :
00165 //=================================================================================
00166 void MeasureGUI_WhatisDlg::Init()
00167 {
00168   mySelBtn = myGrp->PushButton1;
00169   mySelEdit = myGrp->LineEdit1;
00170 
00171   connect( myGrp->PushButton2, SIGNAL( clicked() ), this, SLOT( ClickOnProperties() ) );
00172 
00173   MeasureGUI_Skeleton::Init();
00174 }
00175 
00176 //=================================================================================
00177 // function : processObject
00178 // purpose  :
00179 //=================================================================================
00180 void MeasureGUI_WhatisDlg::processObject()
00181 {
00182   QString aText;
00183   myGrp->TextEdit1->setText( getParameters( aText ) ? aText : QString( "" ) );
00184 
00185   QString aParameters;
00186   QString aKind = getKindOfShape( aParameters );
00187   myGrp->LineEdit2->setText( aKind );
00188   myGrp->PushButton2->setEnabled( !aParameters.isEmpty());
00189   myParamsDlg->setWindowTitle(aKind + " " + tr("GEOM_PROPERTIES"));
00190   myParamsDlg->setText(aParameters);
00191   myParamsDlg->adjustSize();
00192 }
00193 
00194 //=================================================================================
00195 // function : ClickOnProperties()
00196 // purpose  :
00197 //=================================================================================
00198 void MeasureGUI_WhatisDlg::ClickOnProperties()
00199 {
00200   myParamsDlg->show();
00201 }
00202 
00203 //=================================================================================
00204 // function : getParameters
00205 // purpose  :
00206 //=================================================================================
00207 bool MeasureGUI_WhatisDlg::getParameters( QString& theText )
00208 {
00209   if ( myObj->_is_nil() )
00210     return false;
00211 
00212   GEOM::GEOM_IMeasureOperations_var anOper = GEOM::GEOM_IMeasureOperations::_narrow( getOperation() );
00213   try
00214   {
00215     theText = anOper->WhatIs( myObj );
00216   }
00217   catch( const SALOME::SALOME_Exception& e )
00218   {
00219     SalomeApp_Tools::QtCatchCorbaException( e );
00220     return false;
00221   }
00222 
00223   return anOper->IsDone();
00224 }
00225 
00226 //=================================================================================
00227 // function : getKindOfShape
00228 // purpose  :
00229 //=================================================================================
00230 QString MeasureGUI_WhatisDlg::getKindOfShape( QString& theParameters )
00231 {
00232   QString aKindStr("");
00233   theParameters = "";
00234 
00235   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
00236   int aLenPrecision = resMgr->integerValue( "Geometry", "length_precision", 6 );
00237 
00238   if ( myObj->_is_nil() )
00239     return aKindStr;
00240 
00241   GEOM::GEOM_IKindOfShape::shape_kind aKind;
00242   GEOM::ListOfLong_var anInts;
00243   GEOM::ListOfDouble_var aDbls;
00244 
00245   GEOM::GEOM_IMeasureOperations_var anOper = GEOM::GEOM_IMeasureOperations::_narrow( getOperation() );
00246 
00247   try
00248   {
00249     aKind = anOper->KindOfShape( myObj, anInts, aDbls );
00250   }
00251   catch( const SALOME::SALOME_Exception& e ) {
00252     SalomeApp_Tools::QtCatchCorbaException( e );
00253     return aKindStr;
00254   }
00255 
00256   if ( !anOper->IsDone() )
00257     return aKindStr;
00258 
00259 #define PRINT_DOUBLE(val, tol) DlgRef::PrintDoubleValue( val, tol )
00260   switch ( aKind )
00261   {
00262   case GEOM::GEOM_IKindOfShape::COMPOUND:
00263     aKindStr = tr( "GEOM_COMPOUND" );
00264     break;
00265   case GEOM::GEOM_IKindOfShape::COMPSOLID:
00266     aKindStr = tr( "GEOM_COMPOUNDSOLID" );
00267     break;
00268   case GEOM::GEOM_IKindOfShape::SHELL:
00269     aKindStr = tr( "GEOM_SHELL" );
00270     if ( anInts[0] == 1 )
00271       theParameters = tr( "GEOM_CLOSED" );
00272     else if ( anInts[0] == 2 )
00273       theParameters = tr( "GEOM_UNCLOSED" );
00274     else
00275       theParameters = tr( "GEOM_CLOSEDUNCLOSED" );
00276     break;
00277   case GEOM::GEOM_IKindOfShape::WIRE:
00278     aKindStr = tr( "GEOM_WIRE" );
00279     if ( anInts[0] == 1 )
00280       theParameters = tr( "GEOM_CLOSED" );
00281     else if ( anInts[0] == 2 )
00282       theParameters = tr( "GEOM_UNCLOSED" );
00283     else
00284       theParameters = tr( "GEOM_CLOSEDUNCLOSED" );
00285     break;
00286   // SOLIDs
00287   case GEOM::GEOM_IKindOfShape::SPHERE:
00288     aKindStr = tr( "GEOM_SPHERE" );
00289     theParameters = tr( "GEOM_CENTER" )       +
00290       "\n" +        tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00291       "\n" +        tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00292       "\n" +        tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00293       "\n" +        tr( "GEOM_DIMENSIONS" )   +
00294       "\n" +        tr( "GEOM_RADIUS" )       + PRINT_DOUBLE( aDbls[3], aLenPrecision );
00295     break;
00296   case GEOM::GEOM_IKindOfShape::CYLINDER:
00297     aKindStr = tr( "GEOM_CYLINDER" );
00298     theParameters = tr( "GEOM_CENTER" )       +
00299       "\n" +        tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00300       "\n" +        tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00301       "\n" +        tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00302       "\n" +        tr( "GEOM_AXIS" )         +
00303       "\n" +        tr( "GEOM_DX" )           + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00304       "\n" +        tr( "GEOM_DY" )           + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00305       "\n" +        tr( "GEOM_DZ" )           + PRINT_DOUBLE( aDbls[5], aLenPrecision ) +
00306       "\n" +        tr( "GEOM_DIMENSIONS" )   +
00307       "\n" +        tr( "GEOM_RADIUS" )       + PRINT_DOUBLE( aDbls[6], aLenPrecision ) +
00308       "\n" +        tr( "GEOM_HEIGHT" )       + PRINT_DOUBLE( aDbls[7], aLenPrecision );
00309     break;
00310   case GEOM::GEOM_IKindOfShape::BOX:
00311     aKindStr = tr( "GEOM_BOX" );
00312     theParameters = tr( "GEOM_CENTER") +
00313       "\n" +        tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00314       "\n" +        tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00315       "\n" +        tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00316       "\n" +        tr( "GEOM_DIMENSIONS" )   +
00317       "\n" +        "Ax :"                    + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00318       "\n" +        "Ay :"                    + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00319       "\n" +        "Az :"                    + PRINT_DOUBLE( aDbls[5], aLenPrecision );
00320     break;
00321   case GEOM::GEOM_IKindOfShape::ROTATED_BOX:
00322     aKindStr = tr( "GEOM_BOX" );
00323     theParameters = tr( "GEOM_CENTER" )         +
00324       "\n" +        tr( "GEOM_X_I" ).arg( 0 )   + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00325       "\n" +        tr( "GEOM_Y_I" ).arg( 0 )   + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00326       "\n" +        tr( "GEOM_Z_I" ).arg( 0 )   + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00327       "\nZ Axis:"                               +
00328       "\n" +        "Zx :"                      + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00329       "\n" +        "Zy :"                      + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00330       "\n" +        "Zz :"                      + PRINT_DOUBLE( aDbls[5], aLenPrecision ) +
00331       "\nX Axis:"                               +
00332       "\n" +        tr( "GEOM_X_I" ).arg( "x" ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) +
00333       "\n" +        tr( "GEOM_X_I" ).arg( "y" ) + PRINT_DOUBLE( aDbls[7], aLenPrecision ) +
00334       "\n" +        tr( "GEOM_X_I" ).arg( "z" ) + PRINT_DOUBLE( aDbls[8], aLenPrecision ) +
00335       "\nDimensions along local axes:"          +
00336       "\n" +        "Ax :"                      + PRINT_DOUBLE( aDbls[9],  aLenPrecision ) +
00337       "\n" +        "Ay :"                      + PRINT_DOUBLE( aDbls[10], aLenPrecision ) +
00338       "\n" +        "Az :"                      + PRINT_DOUBLE( aDbls[11], aLenPrecision );
00339     break;
00340   case GEOM::GEOM_IKindOfShape::TORUS:
00341     aKindStr = tr( "GEOM_TORUS" );
00342     theParameters = tr( "GEOM_CENTER" )            +
00343       "\n" +        tr( "GEOM_X_I" ).arg( 0 )      + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00344       "\n" +        tr( "GEOM_Y_I" ).arg( 0 )      + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00345       "\n" +        tr( "GEOM_Z_I" ).arg( 0 )      + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00346       "\n" +        tr( "GEOM_AXIS" )              +
00347       "\n" +        tr( "GEOM_DX" )                + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00348       "\n" +        tr( "GEOM_DY" )                + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00349       "\n" +        tr( "GEOM_DZ" )                + PRINT_DOUBLE( aDbls[5], aLenPrecision ) +
00350       "\n" +        tr( "GEOM_DIMENSIONS" )        +
00351       "\n" +        tr( "GEOM_RADIUS_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) +
00352       "\n" +        tr( "GEOM_RADIUS_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[7], aLenPrecision );
00353     break;
00354   case GEOM::GEOM_IKindOfShape::CONE:
00355     aKindStr = tr( "GEOM_CONE" );
00356     theParameters = tr( "GEOM_CENTER" )            +
00357       "\n" +        tr( "GEOM_X_I" ).arg( 0 )      + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00358       "\n" +        tr( "GEOM_Y_I" ).arg( 0 )      + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00359       "\n" +        tr( "GEOM_Z_I" ).arg( 0 )      + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00360       "\n" +        tr( "GEOM_AXIS" )              +
00361       "\n" +        tr( "GEOM_DX" )                + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00362       "\n" +        tr( "GEOM_DY" )                + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00363       "\n" +        tr( "GEOM_DZ" )                + PRINT_DOUBLE( aDbls[5], aLenPrecision ) +
00364       "\n" +        tr( "GEOM_DIMENSIONS" )        +
00365       "\n" +        tr( "GEOM_RADIUS_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) +
00366       "\n" +        tr( "GEOM_RADIUS_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[7], aLenPrecision ) +
00367       "\n" +        tr( "GEOM_HEIGHT" )            + PRINT_DOUBLE( aDbls[8], aLenPrecision );
00368     break;
00369   case GEOM::GEOM_IKindOfShape::POLYHEDRON:
00370     aKindStr = tr( "GEOM_POLYHEDRON" );
00371     break;
00372   case GEOM::GEOM_IKindOfShape::SOLID:
00373     aKindStr = tr( "GEOM_SOLID" );
00374     break;
00375   // FACEs
00376   case GEOM::GEOM_IKindOfShape::SPHERE2D:
00377     aKindStr = tr( "GEOM_SURFSPHERE" );
00378     theParameters = tr( "GEOM_CENTER" )       +
00379       "\n" +        tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00380       "\n" +        tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00381       "\n" +        tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00382       "\n" +        tr( "GEOM_DIMENSIONS" )   +
00383       "\n" +        tr( "GEOM_RADIUS" )       + PRINT_DOUBLE( aDbls[3], aLenPrecision );
00384     break;
00385   case GEOM::GEOM_IKindOfShape::CYLINDER2D:
00386     aKindStr = tr( "GEOM_SURFCYLINDER" );
00387     theParameters = tr( "GEOM_CENTER" )       +
00388       "\n" +        tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00389       "\n" +        tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00390       "\n" +        tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00391       "\n" +        tr( "GEOM_AXIS" )         +
00392       "\n" +        tr( "GEOM_DX" )           + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00393       "\n" +        tr( "GEOM_DY" )           + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00394       "\n" +        tr( "GEOM_DZ" )           + PRINT_DOUBLE( aDbls[5], aLenPrecision ) +
00395       "\n" +        tr( "GEOM_DIMENSIONS" )   +
00396       "\n" +        tr( "GEOM_RADIUS" )       + PRINT_DOUBLE( aDbls[6], aLenPrecision ) +
00397       "\n" +        tr( "GEOM_HEIGHT" )       + PRINT_DOUBLE( aDbls[7], aLenPrecision );
00398     break;
00399   case GEOM::GEOM_IKindOfShape::TORUS2D:
00400     aKindStr = tr( "GEOM_SURFTORUS" );
00401     theParameters = tr( "GEOM_CENTER" )            +
00402       "\n" +        tr( "GEOM_X_I" ).arg( 0 )      + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00403       "\n" +        tr( "GEOM_Y_I" ).arg( 0 )      + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00404       "\n" +        tr( "GEOM_Z_I" ).arg( 0 )      + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00405       "\n" +        tr( "GEOM_AXIS" )              +
00406       "\n" +        tr( "GEOM_DX" )                + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00407       "\n" +        tr( "GEOM_DY" )                + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00408       "\n" +        tr( "GEOM_DZ" )                + PRINT_DOUBLE( aDbls[5], aLenPrecision ) +
00409       "\n" +        tr( "GEOM_DIMENSIONS" )        +
00410       "\n" +        tr( "GEOM_RADIUS_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) +
00411       "\n" +        tr( "GEOM_RADIUS_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[7], aLenPrecision );
00412     break;
00413   case GEOM::GEOM_IKindOfShape::CONE2D:
00414     aKindStr = tr( "GEOM_SURFCONE" );
00415     theParameters = tr( "GEOM_CENTER" )            +
00416       "\n" +        tr( "GEOM_X_I" ).arg( 0 )      + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00417       "\n" +        tr( "GEOM_Y_I" ).arg( 0 )      + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00418       "\n" +        tr( "GEOM_Z_I" ).arg( 0 )      + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00419       "\n" +        tr( "GEOM_AXIS" )              +
00420       "\n" +        tr( "GEOM_DX" )                + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00421       "\n" +        tr( "GEOM_DY" )                + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00422       "\n" +        tr( "GEOM_DZ" )                + PRINT_DOUBLE( aDbls[5], aLenPrecision ) +
00423       "\n" +        tr( "GEOM_DIMENSIONS" )        +
00424       "\n" +        tr( "GEOM_RADIUS_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) +
00425       "\n" +        tr( "GEOM_RADIUS_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[7], aLenPrecision ) +
00426       "\n" +        tr( "GEOM_HEIGHT" )            + PRINT_DOUBLE( aDbls[8], aLenPrecision );
00427     break;
00428   case GEOM::GEOM_IKindOfShape::DISK_CIRCLE:
00429     aKindStr = tr( "GEOM_DISK_CIRCLE" );
00430     theParameters = tr( "GEOM_CENTER" )       +
00431       "\n" +        tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00432       "\n" +        tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00433       "\n" +        tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00434       "\n" +        tr( "GEOM_NORMAL" )       +
00435       "\n" +        tr( "GEOM_DX" )           + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00436       "\n" +        tr( "GEOM_DY" )           + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00437       "\n" +        tr( "GEOM_DZ" )           + PRINT_DOUBLE( aDbls[5], aLenPrecision ) +
00438       "\n" +        tr( "GEOM_DIMENSIONS" )   +
00439       "\n" +        tr( "GEOM_RADIUS" )      + PRINT_DOUBLE( aDbls[6], aLenPrecision );
00440     break;
00441   case GEOM::GEOM_IKindOfShape::DISK_ELLIPSE:
00442     aKindStr = tr( "GEOM_DISK_ELLIPSE" );
00443     theParameters = tr( "GEOM_CENTER" )         +
00444       "\n" +        tr( "GEOM_X_I" ).arg( 0 )   + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00445       "\n" +        tr( "GEOM_Y_I" ).arg( 0 )   + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00446       "\n" +        tr( "GEOM_Z_I" ).arg( 0 )   + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00447       "\n" +        tr( "GEOM_NORMAL" )         +
00448       "\n" +        tr( "GEOM_DX" )             + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00449       "\n" +        tr( "GEOM_DY" )             + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00450       "\n" +        tr( "GEOM_DZ" )             + PRINT_DOUBLE( aDbls[5], aLenPrecision ) +
00451       "\n" +        tr( "GEOM_DIMENSIONS" )     +
00452       "\n" +        tr( "GEOM_RADIUS_MAJOR" )   + PRINT_DOUBLE( aDbls[6], aLenPrecision ) +
00453       "\n" +        tr( "GEOM_RADIUS_MINOR" )   + PRINT_DOUBLE( aDbls[7], aLenPrecision );
00454     break;
00455   case GEOM::GEOM_IKindOfShape::POLYGON:
00456     aKindStr = tr( "GEOM_POLYGON" );
00457     theParameters = tr( "GEOM_CENTER" )       +
00458       "\n" +        tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00459       "\n" +        tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00460       "\n" +        tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00461       "\n" +        tr( "GEOM_NORMAL" )       +
00462       "\n" +        tr( "GEOM_DX" )           + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00463       "\n" +        tr( "GEOM_DY" )           + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00464       "\n" +        tr( "GEOM_DZ" )           + PRINT_DOUBLE( aDbls[5], aLenPrecision );
00465     break;
00466   case GEOM::GEOM_IKindOfShape::PLANE:
00467     aKindStr = tr( "GEOM_PLANE" );
00468     theParameters = tr( "GEOM_CENTER" )       +
00469       "\n" +        tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00470       "\n" +        tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00471       "\n" +        tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00472       "\n" +        tr( "GEOM_NORMAL" )       +
00473       "\n" +        tr( "GEOM_DX" )           + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00474       "\n" +        tr( "GEOM_DY" )           + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00475       "\n" +        tr( "GEOM_DZ" )           + PRINT_DOUBLE( aDbls[5], aLenPrecision );
00476     break;
00477   case GEOM::GEOM_IKindOfShape::PLANAR:
00478     aKindStr = tr( "GEOM_PLANAR_FACE" );
00479     theParameters = tr( "GEOM_CENTER" )       +
00480       "\n" +        tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00481       "\n" +        tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00482       "\n" +        tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00483       "\n" +        tr( "GEOM_NORMAL" )       +
00484       "\n" +        tr( "GEOM_DX" )           + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00485       "\n" +        tr( "GEOM_DY" )           + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00486       "\n" +        tr( "GEOM_DZ" )           + PRINT_DOUBLE( aDbls[5], aLenPrecision );
00487     break;
00488   case GEOM::GEOM_IKindOfShape::FACE:
00489     aKindStr = tr( "GEOM_FACE" );
00490     break;
00491   // EDGEs
00492   case GEOM::GEOM_IKindOfShape::CIRCLE:
00493     aKindStr = tr( "GEOM_CIRCLE" );
00494     theParameters = tr( "GEOM_CENTER" )       +
00495       "\n" +        tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00496       "\n" +        tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00497       "\n" +        tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00498       "\n" +        tr( "GEOM_NORMAL" )       +
00499       "\n" +        tr( "GEOM_DX" )           + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00500       "\n" +        tr( "GEOM_DY" )           + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00501       "\n" +        tr( "GEOM_DZ" )           + PRINT_DOUBLE( aDbls[5], aLenPrecision ) +
00502       "\n" +        tr( "GEOM_DIMENSIONS" )   +
00503       "\n" +        tr( "GEOM_RADIUS" )       + PRINT_DOUBLE( aDbls[6], aLenPrecision );
00504     break;
00505   case GEOM::GEOM_IKindOfShape::ARC_CIRCLE:
00506     aKindStr = tr( "GEOM_ARC" );
00507     theParameters = tr( "GEOM_CENTER" )           +
00508       "\n" +        tr( "GEOM_X_I" ).arg( 0 )     + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00509       "\n" +        tr( "GEOM_Y_I" ).arg( 0 )     + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00510       "\n" +        tr( "GEOM_Z_I" ).arg( 0 )     + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00511       "\n" +        tr( "GEOM_NORMAL" )           +
00512       "\n" +        tr( "GEOM_DX" )               + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00513       "\n" +        tr( "GEOM_DY" )               + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00514       "\n" +        tr( "GEOM_DZ" )               + PRINT_DOUBLE( aDbls[5], aLenPrecision ) +
00515       "\n" +        tr( "GEOM_DIMENSIONS" )       +
00516       "\n" +        tr( "GEOM_RADIUS" )           + PRINT_DOUBLE( aDbls[6], aLenPrecision ) +
00517       "\n" +        tr( "GEOM_POINT_I" ).arg( 1 ) +
00518       "\n" +        tr( "GEOM_X_I" ).arg( 1 )     + PRINT_DOUBLE( aDbls[7], aLenPrecision ) +
00519       "\n" +        tr( "GEOM_Y_I" ).arg( 1 )     + PRINT_DOUBLE( aDbls[8], aLenPrecision ) +
00520       "\n" +        tr( "GEOM_Z_I" ).arg( 1 )     + PRINT_DOUBLE( aDbls[9], aLenPrecision ) +
00521       "\n" +        tr( "GEOM_POINT_I" ).arg( 2 ) +
00522       "\n" +        tr( "GEOM_X_I" ).arg( 2 )     + PRINT_DOUBLE( aDbls[10], aLenPrecision ) +
00523       "\n" +        tr( "GEOM_Y_I" ).arg( 2 )     + PRINT_DOUBLE( aDbls[11], aLenPrecision ) +
00524       "\n" +        tr( "GEOM_Z_I" ).arg( 2 )     + PRINT_DOUBLE( aDbls[12], aLenPrecision );
00525     break;
00526   case GEOM::GEOM_IKindOfShape::ELLIPSE:
00527     aKindStr = tr( "GEOM_ELLIPSE" );
00528     theParameters = tr( "GEOM_CENTER" )         +
00529       "\n" +        tr( "GEOM_X_I" ).arg( 0 )   + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00530       "\n" +        tr( "GEOM_Y_I" ).arg( 0 )   + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00531       "\n" +        tr( "GEOM_Z_I" ).arg( 0 )   + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00532       "\n" +        tr( "GEOM_NORMAL" )         +
00533       "\n" +        tr( "GEOM_DX" )             + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00534       "\n" +        tr( "GEOM_DY" )             + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00535       "\n" +        tr( "GEOM_DZ" )             + PRINT_DOUBLE( aDbls[5], aLenPrecision ) +
00536       "\n" +        tr( "GEOM_DIMENSIONS" )     +
00537       "\n" +        tr( "GEOM_RADIUS_MAJOR" )   + PRINT_DOUBLE( aDbls[6], aLenPrecision ) +
00538       "\n" +        tr( "GEOM_RADIUS_MINOR" )   + PRINT_DOUBLE( aDbls[7], aLenPrecision );
00539     break;
00540   case GEOM::GEOM_IKindOfShape::ARC_ELLIPSE:
00541     aKindStr = tr( "GEOM_ARC_ELLIPSE" );
00542     theParameters = tr( "GEOM_CENTER" )           +
00543       "\n" +        tr( "GEOM_X_I" ).arg( 0 )     + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00544       "\n" +        tr( "GEOM_Y_I" ).arg( 0 )     + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00545       "\n" +        tr( "GEOM_Z_I" ).arg( 0 )     + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00546       "\n" +        tr( "GEOM_NORMAL" )           +
00547       "\n" +        tr( "GEOM_DX" )               + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00548       "\n" +        tr( "GEOM_DY" )               + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00549       "\n" +        tr( "GEOM_DZ" )               + PRINT_DOUBLE( aDbls[5], aLenPrecision ) +
00550       "\n" +        tr( "GEOM_DIMENSIONS" )       +
00551       "\n" +        tr( "GEOM_RADIUS_MAJOR" )     + PRINT_DOUBLE( aDbls[6], aLenPrecision ) +
00552       "\n" +        tr( "GEOM_RADIUS_MINOR" )     + PRINT_DOUBLE( aDbls[7], aLenPrecision ) +
00553       "\n" +        tr( "GEOM_POINT_I" ).arg( 1 ) +
00554       "\n" +        tr( "GEOM_X_I" ).arg( 1 )     + PRINT_DOUBLE( aDbls[8], aLenPrecision ) +
00555       "\n" +        tr( "GEOM_Y_I" ).arg( 1 )     + PRINT_DOUBLE( aDbls[9], aLenPrecision ) +
00556       "\n" +        tr( "GEOM_Z_I" ).arg( 1 )     + PRINT_DOUBLE( aDbls[10], aLenPrecision ) +
00557       "\n" +        tr( "GEOM_POINT_I" ).arg( 2 ) +
00558       "\n" +        tr( "GEOM_X_I" ).arg( 2 )     + PRINT_DOUBLE( aDbls[11], aLenPrecision ) +
00559       "\n" +        tr( "GEOM_Y_I" ).arg( 2 )     + PRINT_DOUBLE( aDbls[12], aLenPrecision ) +
00560       "\n" +        tr( "GEOM_Z_I" ).arg( 2 )     + PRINT_DOUBLE( aDbls[13], aLenPrecision );
00561     break;
00562   case GEOM::GEOM_IKindOfShape::LINE:
00563     aKindStr = tr( "GEOM_LINE" );
00564     theParameters = tr( "GEOM_POSITION" )     +
00565       "\n" +        tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00566       "\n" +        tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00567       "\n" +        tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00568       "\n" +        tr( "GEOM_DIRECTION" )    +
00569       "\n" +        tr( "GEOM_DX" )           + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00570       "\n" +        tr( "GEOM_DY" )           + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00571       "\n" +        tr( "GEOM_DZ" )           + PRINT_DOUBLE( aDbls[5], aLenPrecision );
00572     break;
00573   case GEOM::GEOM_IKindOfShape::SEGMENT:
00574     aKindStr = tr( "GEOM_SEGMENT" );
00575     theParameters = tr( "GEOM_POINT_I" ).arg( 1 ) +
00576       "\n" +        tr( "GEOM_X_I" ).arg( 1 )     + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00577       "\n" +        tr( "GEOM_Y_I" ).arg( 1 )     + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00578       "\n" +        tr( "GEOM_Z_I" ).arg( 1 )     + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
00579       "\n" +        tr( "GEOM_POINT_I" ).arg( 2 ) +
00580       "\n" +        tr( "GEOM_X_I" ).arg( 2 )     + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
00581       "\n" +        tr( "GEOM_Y_I" ).arg( 2 )     + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
00582       "\n" +        tr( "GEOM_Z_I" ).arg( 2 )     + PRINT_DOUBLE( aDbls[5], aLenPrecision );
00583     break;
00584   case GEOM::GEOM_IKindOfShape::EDGE:
00585     aKindStr = tr( "GEOM_EDGE" );
00586     break;
00587   case GEOM::GEOM_IKindOfShape::VERTEX:
00588     aKindStr = tr( "GEOM_VERTEX" );
00589     theParameters = tr( "GEOM_COORDINATES" ) +
00590       "\n" +        tr( "GEOM_X" )           + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
00591       "\n" +        tr( "GEOM_Y" )           + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
00592       "\n" +        tr( "GEOM_Z" )           + PRINT_DOUBLE( aDbls[2], aLenPrecision );
00593     break;
00594   case GEOM::GEOM_IKindOfShape::ADVANCED:
00595     {
00596       QString strid = QString( "GEOM_ADVANCED_%1" ).arg( myObj->GetType() ); 
00597       aKindStr = tr( strid.toLatin1().constData() ) == strid ? 
00598        tr( "GEOM_ADVANCED" ).arg( myObj->GetType() ) :
00599        tr( strid.toLatin1().constData() );
00600       break;
00601     }
00602   default:
00603     break;
00604   }
00605 
00606   return aKindStr;
00607 }