Salome HOME
sources v1.2
[modules/geom.git] / src / GEOMGUI / GeometryGUI_RotationDlg.cxx
1 //  GEOM GEOMGUI : GUI for Geometry component
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
6 //  This library is free software; you can redistribute it and/or 
7 //  modify it under the terms of the GNU Lesser General Public 
8 //  License as published by the Free Software Foundation; either 
9 //  version 2.1 of the License. 
10 // 
11 //  This library is distributed in the hope that it will be useful, 
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
14 //  Lesser General Public License for more details. 
15 // 
16 //  You should have received a copy of the GNU Lesser General Public 
17 //  License along with this library; if not, write to the Free Software 
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : GeometryGUI_RotationDlg.cxx
25 //  Author : Lucien PIGNOLONI
26 //  Module : GEOM
27 //  $Header$
28
29 using namespace std;
30 #include "GeometryGUI_RotationDlg.h"
31
32 #include "GeometryGUI.h"
33 #include "QAD_Application.h"
34 #include "QAD_Desktop.h"
35 #include "QAD_Config.h"
36 #include "utilities.h"
37
38 #include <BRepAdaptor_Curve.hxx>
39
40 #include <qbuttongroup.h>
41 #include <qcheckbox.h>
42 #include <qgroupbox.h>
43 #include <qlabel.h>
44 #include <qlineedit.h>
45 #include <qpushbutton.h>
46 #include <qradiobutton.h>
47 #include <qlayout.h>
48 #include <qvariant.h>
49 #include <qtooltip.h>
50 #include <qwhatsthis.h>
51 #include <qimage.h>
52 #include <qvalidator.h>
53 #include <qpixmap.h>
54
55
56 //=================================================================================
57 // class    : GeometryGUI_RotationDlg()
58 // purpose  : Constructs a GeometryGUI_RotationDlg which is a child of 'parent', with the 
59 //            name 'name' and widget flags set to 'f'.
60 //            The dialog will by default be modeless, unless you set 'modal' to
61 //            TRUE to construct a modal dialog.
62 //=================================================================================
63 GeometryGUI_RotationDlg::GeometryGUI_RotationDlg( QWidget* parent,  const char* name, SALOME_Selection* Sel, bool modal, WFlags fl )
64     : QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
65 {
66     QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap( "GeometryGUI",tr("ICON_DLG_ROTATION")));
67     QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap( "GeometryGUI",tr("ICON_SELECT")));
68
69     if ( !name )
70         setName( "GeometryGUI_RotationDlg" );
71     resize( 303, 251 ); 
72     setCaption( tr( "GEOM_ROTATION_TITLE"  ) );
73     setSizeGripEnabled( TRUE );
74     GeometryGUI_RotationDlgLayout = new QGridLayout( this ); 
75     GeometryGUI_RotationDlgLayout->setSpacing( 6 );
76     GeometryGUI_RotationDlgLayout->setMargin( 11 );
77
78     GroupConstructors = new QButtonGroup( this, "GroupConstructors" );
79     GroupConstructors->setTitle( tr( "GEOM_ROTATION"  ) );
80     GroupConstructors->setExclusive( TRUE );
81     GroupConstructors->setColumnLayout(0, Qt::Vertical );
82     GroupConstructors->layout()->setSpacing( 0 );
83     GroupConstructors->layout()->setMargin( 0 );
84     GroupConstructorsLayout = new QGridLayout( GroupConstructors->layout() );
85     GroupConstructorsLayout->setAlignment( Qt::AlignTop );
86     GroupConstructorsLayout->setSpacing( 6 );
87     GroupConstructorsLayout->setMargin( 11 );
88     Constructor1 = new QRadioButton( GroupConstructors, "Constructor1" );
89     Constructor1->setText( tr( ""  ) );
90     Constructor1->setPixmap( image0 );
91     Constructor1->setChecked( TRUE );
92     Constructor1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, Constructor1->sizePolicy().hasHeightForWidth() ) );
93     Constructor1->setMinimumSize( QSize( 50, 0 ) );
94     GroupConstructorsLayout->addWidget( Constructor1, 0, 0 );
95     QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
96     GroupConstructorsLayout->addItem( spacer, 0, 1 );
97     GeometryGUI_RotationDlgLayout->addWidget( GroupConstructors, 0, 0 );
98
99     /***************************************************************/
100     GroupButtons = new QGroupBox( this, "GroupButtons" );
101     GroupButtons->setGeometry( QRect( 10, 10, 281, 48 ) ); 
102     GroupButtons->setTitle( tr( ""  ) );
103     GroupButtons->setColumnLayout(0, Qt::Vertical );
104     GroupButtons->layout()->setSpacing( 0 );
105     GroupButtons->layout()->setMargin( 0 );
106     GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
107     GroupButtonsLayout->setAlignment( Qt::AlignTop );
108     GroupButtonsLayout->setSpacing( 6 );
109     GroupButtonsLayout->setMargin( 11 );
110     buttonCancel = new QPushButton( GroupButtons, "buttonCancel" );
111     buttonCancel->setText( tr( "GEOM_BUT_CLOSE"  ) );
112     buttonCancel->setAutoDefault( TRUE );
113     GroupButtonsLayout->addWidget( buttonCancel, 0, 3 );
114     buttonApply = new QPushButton( GroupButtons, "buttonApply" );
115     buttonApply->setText( tr( "GEOM_BUT_APPLY"  ) );
116     buttonApply->setAutoDefault( TRUE );
117     GroupButtonsLayout->addWidget( buttonApply, 0, 1 );
118     QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
119     GroupButtonsLayout->addItem( spacer_9, 0, 2 );
120     buttonOk = new QPushButton( GroupButtons, "buttonOk" );
121     buttonOk->setText( tr( "GEOM_BUT_OK"  ) );
122     buttonOk->setAutoDefault( TRUE );
123     buttonOk->setDefault( TRUE );
124     GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
125     GeometryGUI_RotationDlgLayout->addWidget( GroupButtons, 2, 0 );
126
127     /***************************************************************/
128     GroupC1 = new QGroupBox( this, "GroupC1" );
129     GroupC1->setTitle( tr( "GEOM_ARGUMENTS"  ) );
130     GroupC1->setFrameShape( QGroupBox::Box );
131     GroupC1->setFrameShadow( QGroupBox::Sunken );
132     GroupC1->setColumnLayout(0, Qt::Vertical );
133     GroupC1->layout()->setSpacing( 0 );
134     GroupC1->layout()->setMargin( 0 );
135     GroupC1Layout = new QGridLayout( GroupC1->layout() );
136     GroupC1Layout->setAlignment( Qt::AlignTop );
137     GroupC1Layout->setSpacing( 6 );
138     GroupC1Layout->setMargin( 11 );
139     SelectButtonC1A2 = new QPushButton( GroupC1, "SelectButtonC1A2" );
140     SelectButtonC1A2->setText( tr( ""  ) );
141     SelectButtonC1A2->setPixmap( image1 );
142     SelectButtonC1A2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0,
143                                                   SelectButtonC1A2->sizePolicy().hasHeightForWidth() ) );
144     GroupC1Layout->addWidget( SelectButtonC1A2, 1, 1 );
145     
146     LineEditC1A1 = new QLineEdit( GroupC1, "LineEditC1A1" );
147     GroupC1Layout->addMultiCellWidget( LineEditC1A1, 0, 0, 2, 3 );
148     LineEditC1A2 = new QLineEdit( GroupC1, "LineEditC1A2" );
149     GroupC1Layout->addMultiCellWidget( LineEditC1A2, 1, 1, 2, 3 );
150     SelectButtonC1A1 = new QPushButton( GroupC1, "SelectButtonC1A1" );
151     SelectButtonC1A1->setText( tr( ""  ) );
152     SelectButtonC1A1->setPixmap( image1 );
153     SelectButtonC1A1->setToggleButton( FALSE );
154     SelectButtonC1A1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0,
155                                                   SelectButtonC1A1->sizePolicy().hasHeightForWidth() ) );
156     GroupC1Layout->addWidget( SelectButtonC1A1, 0, 1 );
157
158     TextLabelC1A1 = new QLabel( GroupC1, "TextLabelC1A1" );
159     TextLabelC1A1->setText( tr( "GEOM_OBJECT"  ) );
160     TextLabelC1A1->setMinimumSize( QSize( 50, 0 ) );
161     TextLabelC1A1->setFrameShape( QLabel::NoFrame );
162     TextLabelC1A1->setFrameShadow( QLabel::Plain );
163     GroupC1Layout->addWidget( TextLabelC1A1, 0, 0 );
164     TextLabelC1A2 = new QLabel( GroupC1, "TextLabelC1A2" );
165     TextLabelC1A2->setText( tr( "GEOM_AXIS"  ) );
166     TextLabelC1A2->setMinimumSize( QSize( 50, 0 ) );
167     GroupC1Layout->addWidget( TextLabelC1A2, 1, 0 );
168
169     SpinBox_C1A3 = new GeometryGUI_SpinBox( GroupC1, "GeomSpinBox_C1A3" ) ;
170     GroupC1Layout->addWidget( SpinBox_C1A3, 2, 3 );
171
172     TextLabelC1A3 = new QLabel( GroupC1, "TextLabelC1A3" );
173     TextLabelC1A3->setText( tr( "GEOM_ANGLE"  ) );
174     TextLabelC1A3->setMinimumSize( QSize( 50, 0 ) );
175     GroupC1Layout->addWidget( TextLabelC1A3, 2, 2 );
176     CheckBoxReverse = new QCheckBox( GroupC1, "CheckBoxReverse" );
177     CheckBoxReverse->setText( tr( "GEOM_REVERSE"  ) );
178     GroupC1Layout->addMultiCellWidget( CheckBoxReverse, 2, 2, 0, 1 );
179     GeometryGUI_RotationDlgLayout->addWidget( GroupC1, 1, 0 );
180
181     Init(Sel) ; /* Initialisations */
182 }
183
184 //=================================================================================
185 // function : ~GeometryGUI_RotationDlg()
186 // purpose  : Destroys the object and frees any allocated resources
187 //=================================================================================
188 GeometryGUI_RotationDlg::~GeometryGUI_RotationDlg()
189 {
190     // no need to delete child widgets, Qt does it all for us
191 }
192
193 //=================================================================================
194 // function : Init()
195 // purpose  :
196 //=================================================================================
197 void GeometryGUI_RotationDlg::Init( SALOME_Selection* Sel )
198 {
199
200   /* Get setting of step value from file configuration */
201   double step ;
202   QString St = QAD_CONFIG->getSetting( "Geometry:SettingsGeomStep" ) ;
203   step = St.toDouble() ;
204
205   /* min, max, step and decimals for spin boxes */
206   SpinBox_C1A3->RangeStepAndValidator( -999.999, 999.999, step, 3 ) ;
207   SpinBox_C1A3->SetValue( 45.0 ) ;  /* = myAngle */
208   myAngle = 45.0 ;
209
210   GroupC1->show();
211   myConstructorId = 0 ;
212   Constructor1->setChecked( TRUE );
213   myEditCurrentArgument = LineEditC1A1 ;        
214   mySelection = Sel;
215   myGeomGUI = GeometryGUI::GetGeometryGUI() ;
216   myOkBase = myOkAxis = false ;
217   mySimulationTopoDs.Nullify() ;
218   myBase.Nullify() ;
219   myGeomGUI->SetActiveDialogBox( (QDialog*)this ) ;
220
221   // TODO : set previous selection into argument ?
222
223   /* Filter definitions */
224   Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "Geometry");
225   myGeom = GEOM::GEOM_Gen::_narrow(comp);
226   myEdgeFilter = new GEOM_EdgeFilter( StdSelect_Line, myGeom );
227
228   /* signals and slots connections */
229   connect( buttonOk, SIGNAL( clicked() ),     this, SLOT( ClickOnOk() ) );
230   connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) ) ;
231   connect( buttonApply, SIGNAL( clicked() ), this, SLOT(ClickOnApply() ) );
232   connect( GroupConstructors, SIGNAL(clicked(int) ), SLOT( ConstructorsClicked(int) ) );  
233   connect( SelectButtonC1A1, SIGNAL (clicked() ), this, SLOT( SetEditCurrentArgument() ) ) ;
234   connect( SelectButtonC1A2, SIGNAL (clicked() ), this, SLOT( SetEditCurrentArgument() ) ) ;
235
236   connect( LineEditC1A1, SIGNAL ( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ) ;
237   connect( LineEditC1A2, SIGNAL ( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ) ;
238
239   connect( SpinBox_C1A3, SIGNAL ( valueChanged( double) ), this, SLOT( ValueChangedInSpinBox( double) ) ) ;
240   connect( CheckBoxReverse, SIGNAL (stateChanged(int) ), this, SLOT( ReverseAngle(int) ) ) ;
241   
242   connect( myGeomGUI, SIGNAL ( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) ) ;  
243   connect( mySelection, SIGNAL( currentSelectionChanged() ),     this, SLOT( SelectionIntoArgument() ) );
244   /* to close dialog if study change */
245   connect( myGeomGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) ) ;
246  
247   /* Move widget on the botton right corner of main widget */
248   int x, y ;
249   myGeomGUI->DefineDlgPosition( this, x, y ) ;
250   this->move( x, y ) ;
251   this->show() ; /* displays Dialog */
252
253   return ;
254 }
255
256 //=================================================================================
257 // function : ReverseAngle()
258 // purpose  : 'state' not used here
259 //=================================================================================
260 void GeometryGUI_RotationDlg::ReverseAngle(int state)
261 {
262   myAngle = -myAngle ;
263   SpinBox_C1A3->SetValue( myAngle ) ;
264   if( myOkBase && myOkAxis ) {
265     MakeRotationSimulationAndDisplay( myBase ) ;
266   }
267   else {
268     myGeomGUI->EraseSimulationShape() ; 
269     mySimulationTopoDs.Nullify() ;
270   }
271   return ;
272 }
273
274
275 //=================================================================================
276 // function : ConstructorsClicked()
277 // purpose  : Radio button management
278 //=================================================================================
279 void GeometryGUI_RotationDlg::ConstructorsClicked(int constructorId)
280 {
281   /* only a constructor now */
282   return ;
283 }
284
285 //=================================================================================
286 // function : ClickOnOk()
287 // purpose  :
288 //=================================================================================
289 void GeometryGUI_RotationDlg::ClickOnOk()
290 {
291   this->ClickOnApply() ;
292   this->ClickOnCancel() ;
293   return ;
294 }
295
296 //=================================================================================
297 // function : ClickOnApply()
298 // purpose  :
299 //=================================================================================
300 void GeometryGUI_RotationDlg::ClickOnApply()
301 {
302   myGeomGUI->EraseSimulationShape() ;
303   mySimulationTopoDs.Nullify() ;
304   myGeomGUI->GetDesktop()->putInfo( tr("") ) ;
305
306   switch(myConstructorId)
307     { 
308     case 0 :
309       { 
310         if(myOkBase && myOkAxis) {        
311           myGeomGUI->MakeRotationAndDisplay( myGeomShape, myLoc, myDir, myAngle*PI180) ; 
312         }
313         break ;
314       }
315     }
316   return ;
317 }
318
319
320 //=================================================================================
321 // function : ClickOnCancel()
322 // purpose  :
323 //=================================================================================
324 void GeometryGUI_RotationDlg::ClickOnCancel()
325 {
326   mySelection->ClearFilters() ;
327   myGeomGUI->EraseSimulationShape() ;
328   mySimulationTopoDs.Nullify() ;
329   disconnect( mySelection, 0, this, 0 );
330   myGeomGUI->ResetState() ;
331   reject() ;
332   return ;
333 }
334
335
336 //=================================================================================
337 // function : SelectionIntoArgument()
338 // purpose  : Called when selection as changed or other case
339 //=================================================================================
340 void GeometryGUI_RotationDlg::SelectionIntoArgument()
341 {
342   myGeomGUI->EraseSimulationShape() ; 
343   mySimulationTopoDs.Nullify() ;
344
345   QString aString = ""; /* name of future selection */
346
347   int nbSel = myGeomGUI->GetNameOfSelectedIObjects(mySelection, aString) ;
348   if ( nbSel != 1 ) {
349     if ( myEditCurrentArgument == LineEditC1A1 ) {
350       LineEditC1A1->setText("") ;
351       myOkBase = false ;
352     }
353     else if ( myEditCurrentArgument == LineEditC1A2 ) { 
354       LineEditC1A2->setText("") ;
355       myOkAxis = false ;
356     }
357     return ;
358   }
359
360   /* nbSel == 1 ! */
361   TopoDS_Shape S;
362   Standard_Boolean testResult ;
363   Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject() ;
364   
365   if( !myGeomGUI->GetTopoFromSelection(mySelection, S) )
366     return ;  
367  
368   if ( myEditCurrentArgument == LineEditC1A1 ) {
369     myGeomShape = myGeomGUI->ConvertIOinGEOMShape(IO, testResult) ;
370     if( !testResult )
371       return ;
372     LineEditC1A1->setText(aString) ;
373     myBase = S ;
374     myOkBase = true ;
375   }    
376   else if ( myEditCurrentArgument == LineEditC1A2 /*&& myGeomGUI->LinearLocationAndDirection(S, myLoc, myDir) */) {
377     BRepAdaptor_Curve curv(TopoDS::Edge(S));
378     myDir = curv.Line().Direction();
379     myLoc = curv.Line().Location();
380     LineEditC1A2->setText(aString) ;
381     myOkAxis = true ;
382   }
383
384   if( myOkBase && myOkAxis ) {
385     MakeRotationSimulationAndDisplay( myBase) ;
386   }
387   return ;
388 }
389
390
391 //=================================================================================
392 // function : SetEditCurrentArgument()
393 // purpose  :
394 //=================================================================================
395 void GeometryGUI_RotationDlg::SetEditCurrentArgument()
396 {
397   QPushButton* send = (QPushButton*)sender();
398   switch (myConstructorId)
399     {
400     case 0: /* default constructor */
401       { 
402         if(send == SelectButtonC1A1) {
403           LineEditC1A1->setFocus() ;
404           myEditCurrentArgument = LineEditC1A1;
405           mySelection->ClearFilters() ;
406         }
407         else if(send == SelectButtonC1A2) {
408           LineEditC1A2->setFocus() ;      
409           myEditCurrentArgument = LineEditC1A2;
410           mySelection->AddFilter(myEdgeFilter) ;
411         }       
412         SelectionIntoArgument() ;
413         break;
414       }
415     }
416   return ;
417 }
418
419
420 //=================================================================================
421 // function : LineEditReturnPressed()
422 // purpose  :
423 //=================================================================================
424 void GeometryGUI_RotationDlg::LineEditReturnPressed()
425 {  
426   QLineEdit* send = (QLineEdit*)sender();  
427   if( send == LineEditC1A1 )
428     myEditCurrentArgument = LineEditC1A1 ;
429   else if ( send == LineEditC1A2 )
430     myEditCurrentArgument = LineEditC1A2 ; 
431   else
432     return ;
433   
434   /* User name of object input management                          */
435   /* If successfull the selection is changed and signal emitted... */
436   /* so SelectionIntoArgument() is automatically called.           */
437   const QString objectUserName = myEditCurrentArgument->text() ;
438   QWidget* thisWidget = (QWidget*)this ;
439   if( myGeomGUI->SelectionByNameInDialogs( thisWidget, objectUserName, mySelection ) ) {
440     myEditCurrentArgument->setText( objectUserName ) ;
441   }
442   return ;
443 }
444
445
446 //=================================================================================
447 // function : ValueChangedInSpinBox()
448 // purpose  :
449 //=================================================================================
450 void GeometryGUI_RotationDlg::ValueChangedInSpinBox( double newValue )
451 {  
452   myAngle = newValue ;  
453   if (myOkBase && myOkAxis) {
454     MakeRotationSimulationAndDisplay(myBase) ;
455   }
456   else {
457     myGeomGUI->EraseSimulationShape() ; 
458     mySimulationTopoDs.Nullify() ;
459   }
460   return ;
461 }
462
463
464 //=================================================================================
465 // function : DeactivateActiveDialog()
466 // purpose  :
467 //=================================================================================
468 void GeometryGUI_RotationDlg::DeactivateActiveDialog()
469 {
470   if ( GroupConstructors->isEnabled() ) {
471     GroupConstructors->setEnabled(false) ;
472     GroupC1->setEnabled(false) ;
473     GroupButtons->setEnabled(false) ;
474     disconnect( mySelection, 0, this, 0 );
475     myGeomGUI->EraseSimulationShape() ;
476     mySelection->ClearFilters() ;
477   }
478   return ;
479 }
480
481
482 //=================================================================================
483 // function : ActivateThisDialog()
484 // purpose  :
485 //=================================================================================
486 void GeometryGUI_RotationDlg::ActivateThisDialog()
487 {
488   /* Emit a signal to deactivate the active dialog */
489   myGeomGUI->EmitSignalDeactivateDialog() ;   
490   GroupConstructors->setEnabled(true) ;
491   GroupC1->setEnabled(true) ;
492   GroupButtons->setEnabled(true) ;
493   connect ( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
494   if( !mySimulationTopoDs.IsNull() )
495     myGeomGUI->DisplaySimulationShape( mySimulationTopoDs ) ;
496   return ;
497 }
498
499
500
501 //=================================================================================
502 // function : enterEvent()
503 // purpose  :
504 //=================================================================================
505 void GeometryGUI_RotationDlg::enterEvent(QEvent* e)
506 {
507   if ( GroupConstructors->isEnabled() )
508     return ;  
509   ActivateThisDialog() ;
510 }
511
512
513
514 //=================================================================================
515 // function : closeEvent()
516 // purpose  :
517 //=================================================================================
518 void GeometryGUI_RotationDlg::closeEvent( QCloseEvent* e )
519 {
520   this->ClickOnCancel() ; /* same than click on cancel button */
521 }
522
523
524 //=================================================================================
525 // function : MakeRotationSimulationAndDisplay()
526 // purpose  :
527 //=================================================================================
528 void GeometryGUI_RotationDlg::MakeRotationSimulationAndDisplay( const TopoDS_Shape& S) 
529 {
530   myGeomGUI->EraseSimulationShape() ;
531   
532   if( S.IsNull() )
533     return ;
534   
535   try {
536     gp_Ax1 AX( this->myLoc, this->myDir ) ;
537     gp_Trsf theTransformation ;
538     theTransformation.SetRotation(AX, this->myAngle*PI180 ) ;
539     BRepBuilderAPI_Transform myBRepTransformation(S, theTransformation, Standard_False) ;
540     this->mySimulationTopoDs = myBRepTransformation.Shape() ;
541     myGeomGUI->DisplaySimulationShape( mySimulationTopoDs ) ;
542   }
543   catch(Standard_Failure) {
544     MESSAGE( "Exception catched in MakeRotationSimulationAndDisplay" ) ;
545     return ;
546   }
547   return ;
548 }