Salome HOME
DCQ : Add Multi-Wire for MakeFace
[modules/geom.git] / src / TransformationGUI / TransformationGUI_MultiRotationDlg.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   : TransformationGUI_MultiTranslationDlg.cxx
25 //  Author : Damien COQUERET
26 //  Module : GEOM
27 //  $Header$
28
29 using namespace std;
30 #include "TransformationGUI_MultiRotationDlg.h"
31
32 #include <gp_Lin.hxx>
33 #include <Precision.hxx>
34 #include <BRepBuilderAPI_MakeVertex.hxx>
35 #include <GeomAPI_ProjectPointOnCurve.hxx>
36 #include <BRepAdaptor_Curve.hxx>
37 #include <BRep_Builder.hxx>
38 #include <BRepGProp.hxx>
39 #include <GProp_GProps.hxx>
40 #include <TopoDS_Compound.hxx>
41 #include <Geom_Line.hxx>
42 #include <BRepBuilderAPI_Transform.hxx>
43 #include "QAD_Config.h"
44
45 //=================================================================================
46 // class    : TransformationGUI_MultiRotationDlg()
47 // purpose  : Constructs a TransformationGUI_MultiRotationDlg which is a child of 'parent', with the 
48 //            name 'name' and widget flags set to 'f'.
49 //            The dialog will by default be modeless, unless you set 'modal' to
50 //            TRUE to construct a modal dialog.
51 //=================================================================================
52 TransformationGUI_MultiRotationDlg::TransformationGUI_MultiRotationDlg(QWidget* parent,  const char* name, TransformationGUI* theTransformationGUI, SALOME_Selection* Sel, bool modal, WFlags fl)
53   :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
54 {
55   QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_MULTIROTATION_SIMPLE")));
56   QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_MULTIROTATION_DOUBLE")));
57   QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
58
59   setCaption(tr("GEOM_MULTIROTATION_TITLE"));
60
61   /***************************************************************/
62   GroupConstructors->setTitle(tr("GEOM_MULTIROTATION"));
63   RadioButton1->setPixmap(image0);
64   RadioButton2->setPixmap(image1);
65   RadioButton3->close(TRUE);
66
67   GroupPoints = new DlgRef_2Sel1Spin(this, "GroupPoints");
68   GroupPoints->GroupBox1->setTitle(tr("GEOM_MULTIROTATION_SIMPLE"));
69   GroupPoints->TextLabel1->setText(tr("GEOM_MAIN_OBJECT"));
70   GroupPoints->TextLabel2->setText(tr("GEOM_VECTOR"));
71   GroupPoints->TextLabel3->setText(tr("GEOM_NB_TIMES"));
72   GroupPoints->PushButton1->setPixmap(image2);
73   GroupPoints->PushButton2->setPixmap(image2);
74
75   GroupDimensions = new DlgRef_2Sel4Spin1Check(this, "GroupDimensions");
76   GroupDimensions->GroupBox1->setTitle(tr("GEOM_MULTIROTATION_DOUBLE"));
77   GroupDimensions->TextLabel1->setText(tr("GEOM_MAIN_OBJECT"));
78   GroupDimensions->TextLabel2->setText(tr("GEOM_VECTOR"));
79   GroupDimensions->TextLabel3->setText(tr("GEOM_ANGLE"));
80   GroupDimensions->TextLabel4->setText(tr("GEOM_NB_TIMES"));
81   GroupDimensions->TextLabel5->setText(tr("GEOM_STEP"));
82   GroupDimensions->TextLabel6->setText(tr("GEOM_NB_TIMES"));
83   GroupDimensions->CheckButton1->setText(tr("GEOM_REVERSE"));
84   GroupDimensions->PushButton1->setPixmap(image2);
85   GroupDimensions->PushButton2->setPixmap(image2);
86
87   Layout1->addWidget(GroupPoints, 1, 0);
88   Layout1->addWidget(GroupDimensions, 1, 0);
89   /***************************************************************/
90
91   /* Initialisations */
92   myTransformationGUI = theTransformationGUI;
93   Init();
94 }
95
96
97 //=================================================================================
98 // function : ~TransformationGUI_MultiRotationDlg()
99 // purpose  : Destroys the object and frees any allocated resources
100 //=================================================================================
101 TransformationGUI_MultiRotationDlg::~TransformationGUI_MultiRotationDlg()
102 {
103   // no need to delete child widgets, Qt does it all for us
104 }
105
106
107 //=================================================================================
108 // function : Init()
109 // purpose  :
110 //=================================================================================
111 void TransformationGUI_MultiRotationDlg::Init()
112 {
113   /* init variables */
114   myConstructorId = 0;
115   myEditCurrentArgument = GroupPoints->LineEdit1;
116
117   myAng = 45.0;
118   myStep = 50.0;
119   myNbTimes1 = 2;
120   myNbTimes2 = 2;
121   myOkBase = myOkDir = false;
122
123   myEdgeFilter = new GEOM_ShapeTypeFilter(TopAbs_EDGE, myGeom);
124
125   /* Get setting of step value from file configuration */
126   QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep");
127   step = St.toDouble();
128
129   double SpecificStep1 = 5;
130   double SpecificStep2 = 1;
131   /* min, max, step and decimals for spin boxes & initial values */
132   GroupPoints->SpinBox_DX->RangeStepAndValidator(1.0, 999.999, SpecificStep2, 3);
133   GroupPoints->SpinBox_DX->SetValue(myNbTimes1);
134
135   GroupDimensions->SpinBox_DX1->RangeStepAndValidator(-999.999, 999.999, SpecificStep1, 3);
136   GroupDimensions->SpinBox_DY1->RangeStepAndValidator(1.0, 999.999, SpecificStep2, 3);
137   GroupDimensions->SpinBox_DX2->RangeStepAndValidator(-999.999, 999.999, step, 3);
138   GroupDimensions->SpinBox_DY2->RangeStepAndValidator(1.0, 999.999, SpecificStep2, 3);
139   GroupDimensions->SpinBox_DX1->SetValue(myAng);
140   GroupDimensions->SpinBox_DY1->SetValue(myNbTimes1);
141   GroupDimensions->SpinBox_DX2->SetValue(myStep);
142   GroupDimensions->SpinBox_DY2->SetValue(myNbTimes2);
143
144   /* signals and slots connections */
145   connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
146   connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
147   connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
148
149   connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
150   connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
151   connect(GroupDimensions->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
152   connect(GroupDimensions->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
153
154   connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
155   connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
156   connect(GroupDimensions->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
157   connect(GroupDimensions->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
158
159   connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
160   connect(GroupDimensions->SpinBox_DX1, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
161   connect(GroupDimensions->SpinBox_DY1, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
162   connect(GroupDimensions->SpinBox_DX2, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
163   connect(GroupDimensions->SpinBox_DY2, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
164
165   connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double)));
166   connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DX1, SLOT(SetStep(double)));
167   connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DY1, SLOT(SetStep(double)));
168   connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DX2, SLOT(SetStep(double)));
169   connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DY2, SLOT(SetStep(double)));
170
171   connect(GroupDimensions->CheckButton1, SIGNAL(stateChanged(int)), this, SLOT(ReverseAngle(int)));
172   
173   connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
174
175   /* displays Dialog */
176   GroupDimensions->hide();
177   GroupPoints->show();
178   this->show();
179
180   return;
181 }
182
183
184 //=================================================================================
185 // function : ConstructorsClicked()
186 // purpose  : Radio button management
187 //=================================================================================
188 void TransformationGUI_MultiRotationDlg::ConstructorsClicked(int constructorId)
189 {
190   myConstructorId = constructorId;
191   mySelection->ClearFilters();
192   myGeomBase->EraseSimulationShape();
193   mySimulationTopoDs.Nullify();
194   disconnect(mySelection, 0, this, 0);
195   myAng = 45.0;
196   myStep = 50.0;
197   myNbTimes1 = 2;
198   myNbTimes2 = 2;
199   myOkBase = myOkDir = false;
200
201   switch (constructorId)
202     {
203     case 0: /* Rotate simple */
204       {
205         GroupDimensions->hide();
206         resize(0, 0);
207         GroupPoints->show();
208
209         myEditCurrentArgument = GroupPoints->LineEdit1;
210         GroupPoints->LineEdit1->setText("");
211         GroupPoints->LineEdit2->setText("");
212
213         GroupPoints->SpinBox_DX->SetValue(myNbTimes1);
214
215         /* filter for next selection */
216         connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
217         break;
218       }
219     case 1: /* Rotate double */
220       {
221         GroupPoints->hide();
222         resize(0, 0);
223         GroupDimensions->show();
224
225         myEditCurrentArgument = GroupDimensions->LineEdit1;
226         GroupDimensions->LineEdit1->setText("");
227         GroupDimensions->LineEdit2->setText("");
228
229         GroupDimensions->SpinBox_DX1->SetValue(myAng);
230         GroupDimensions->SpinBox_DY1->SetValue(myNbTimes1);
231         GroupDimensions->SpinBox_DX2->SetValue(myStep);
232         GroupDimensions->SpinBox_DY2->SetValue(myNbTimes2);
233
234         /* filter for next selection */
235         connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
236         break;
237       }      
238     }
239   return;
240 }
241
242
243 //=================================================================================
244 // function : ClickOnOk()
245 // purpose  :
246 //=================================================================================
247 void TransformationGUI_MultiRotationDlg::ClickOnOk()
248 {
249   this->ClickOnApply();
250   ClickOnCancel();
251   return;
252 }
253
254
255 //=================================================================================
256 // function : ClickOnApply()
257 // purpose  :
258 //=================================================================================
259 void TransformationGUI_MultiRotationDlg::ClickOnApply()
260 {
261   QAD_Application::getDesktop()->putInfo(tr(""));
262   if (mySimulationTopoDs.IsNull())
263     return;
264   myGeomBase->EraseSimulationShape();
265   mySimulationTopoDs.Nullify();
266
267   if(myConstructorId == 0) {
268     if(myOkBase && myOkDir)
269       myTransformationGUI->MakeMultiRotation1DAndDisplay(myGeomShape, myDir, myLoc, myNbTimes1);
270   }
271   else if(myConstructorId == 1) {
272     if(myOkBase && myOkDir)
273       myTransformationGUI->MakeMultiRotation2DAndDisplay(myGeomShape, myDir, myLoc, myAng, myNbTimes1, myStep, myNbTimes2);
274   }
275   return;
276 }
277
278
279 //=================================================================================
280 // function : SelectionIntoArgument()
281 // purpose  : Called when selection as changed or other case
282 //=================================================================================
283 void TransformationGUI_MultiRotationDlg::SelectionIntoArgument()
284 {
285   myGeomBase->EraseSimulationShape();
286   mySimulationTopoDs.Nullify();
287   myEditCurrentArgument->setText("");
288   QString aString = ""; /* name of selection */
289
290   int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
291   if(nbSel != 1) {
292     if(myEditCurrentArgument == GroupPoints->LineEdit1 || myEditCurrentArgument == GroupDimensions->LineEdit1)
293       myOkBase = false;
294     else if(myEditCurrentArgument == GroupPoints->LineEdit2 || myEditCurrentArgument == GroupDimensions->LineEdit2)
295       myOkDir = false;
296     return;
297   }
298
299   // nbSel == 1
300   TopoDS_Shape S; 
301   Standard_Boolean testResult;
302   Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
303   if(!myGeomBase->GetTopoFromSelection(mySelection, S))
304     return;
305
306   if(myEditCurrentArgument == GroupPoints->LineEdit1 || myEditCurrentArgument == GroupDimensions->LineEdit1) {
307     myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
308     if(!testResult)
309       return;
310     myEditCurrentArgument->setText(aString);
311     myBase = S;
312     myOkBase = true;
313   }    
314   else if(myEditCurrentArgument == GroupPoints->LineEdit2 || myEditCurrentArgument == GroupDimensions->LineEdit2) {
315     BRepAdaptor_Curve curv(TopoDS::Edge(S));
316     myDir = curv.Line().Direction();
317     myLoc = curv.Line().Location();
318     myEditCurrentArgument->setText(aString);
319     myOkDir = true;
320   }
321
322   if(myOkBase && myOkDir)
323     this->MakeMultiRotationSimulationAndDisplay();
324   return;
325 }
326
327
328 //=================================================================================
329 // function : SetEditCurrentArgument()
330 // purpose  :
331 //=================================================================================
332 void TransformationGUI_MultiRotationDlg::SetEditCurrentArgument()
333 {
334   QPushButton* send = (QPushButton*)sender();
335   mySelection->ClearFilters();
336
337   if(send == GroupPoints->PushButton1) {
338     GroupPoints->LineEdit1->setFocus();
339     myEditCurrentArgument = GroupPoints->LineEdit1;
340   }
341   else if(send == GroupPoints->PushButton2) {
342     GroupPoints->LineEdit2->setFocus();
343     myEditCurrentArgument = GroupPoints->LineEdit2;
344     mySelection->AddFilter(myEdgeFilter);
345   }
346   else if(send == GroupDimensions->PushButton1) {
347     GroupDimensions->LineEdit1->setFocus();
348     myEditCurrentArgument = GroupDimensions->LineEdit1;
349   }
350   else if(send == GroupDimensions->PushButton2) {
351     GroupDimensions->LineEdit2->setFocus();
352     myEditCurrentArgument = GroupDimensions->LineEdit2;
353     mySelection->AddFilter(myEdgeFilter);
354   }
355   this->SelectionIntoArgument();
356
357   return;
358 }
359
360
361 //=================================================================================
362 // function : LineEditReturnPressed()
363 // purpose  :
364 //=================================================================================
365 void TransformationGUI_MultiRotationDlg::LineEditReturnPressed()
366 {
367   QLineEdit* send = (QLineEdit*)sender();
368   if(send == GroupPoints->LineEdit1)
369     myEditCurrentArgument = GroupPoints->LineEdit1;
370   else if (send == GroupPoints->LineEdit2)
371     myEditCurrentArgument = GroupPoints->LineEdit2;
372   else if (send == GroupDimensions->LineEdit1)
373     myEditCurrentArgument = GroupDimensions->LineEdit1;
374   else if (send == GroupDimensions->LineEdit2)
375     myEditCurrentArgument = GroupDimensions->LineEdit2;
376   else
377     return;
378
379   GEOMBase_Skeleton::LineEditReturnPressed();
380   return;
381 }
382
383
384 //=================================================================================
385 // function : ActivateThisDialog()
386 // purpose  :
387 //=================================================================================
388 void TransformationGUI_MultiRotationDlg::ActivateThisDialog()
389 {
390   GEOMBase_Skeleton::ActivateThisDialog();
391   connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
392
393   if(myConstructorId == 0) {
394     GroupPoints->LineEdit1->setFocus();
395     myEditCurrentArgument = GroupPoints->LineEdit1;
396   }
397   else if(myConstructorId == 1) {
398     GroupDimensions->LineEdit1->setFocus();
399     myEditCurrentArgument = GroupDimensions->LineEdit1;
400   }
401
402   if(!mySimulationTopoDs.IsNull())
403     myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
404   return;
405 }
406
407
408 //=================================================================================
409 // function : enterEvent()
410 // purpose  :
411 //=================================================================================
412 void TransformationGUI_MultiRotationDlg::enterEvent(QEvent* e)
413 {
414   if (GroupConstructors->isEnabled())
415     return;
416   this->ActivateThisDialog();
417   return;
418 }
419
420
421 //=================================================================================
422 // function : ValueChangedInSpinBox()
423 // purpose  :
424 //=================================================================================
425 void TransformationGUI_MultiRotationDlg::ValueChangedInSpinBox(double newValue)
426 {
427   myGeomBase->EraseSimulationShape();
428   mySimulationTopoDs.Nullify();
429   QObject* send = (QObject*)sender();
430
431   if(send == GroupPoints->SpinBox_DX || send == GroupDimensions->SpinBox_DY1)
432     myNbTimes1 = newValue;
433   else if(send == GroupDimensions->SpinBox_DX1)
434     myAng = newValue;
435   else if(send == GroupDimensions->SpinBox_DX2)
436     myStep = newValue;
437   else if(send == GroupDimensions->SpinBox_DY2)
438     myNbTimes2 = newValue;
439
440   if(myOkBase && myOkDir)
441     this->MakeMultiRotationSimulationAndDisplay();
442   return;
443 }
444
445
446 //=================================================================================
447 // function : ReverseAngle()
448 // purpose  : 'state' not used here
449 //=================================================================================
450 void TransformationGUI_MultiRotationDlg::ReverseAngle(int state)
451 {
452   myAng = -myAng;
453   if(myConstructorId == 0)
454     GroupPoints->SpinBox_DX->SetValue(myAng);
455   else if(myConstructorId == 1)
456     GroupDimensions->SpinBox_DX1->SetValue(myAng);
457
458   if(myOkBase && myOkDir)
459     this->MakeMultiRotationSimulationAndDisplay();
460   return;
461 }
462
463
464 //=================================================================================
465 // function : MakeMultiRotationSimulationAndDisplay()
466 // purpose  :
467 //=================================================================================
468 void TransformationGUI_MultiRotationDlg::MakeMultiRotationSimulationAndDisplay() 
469 {
470   myGeomBase->EraseSimulationShape();
471   mySimulationTopoDs.Nullify();
472
473   int i, j;
474   Standard_Real DX, DY, DZ;
475   gp_Trsf theTransformation;
476   gp_Trsf theTransformation1;
477   gp_Trsf theTransformation2;
478   gp_Pnt myPoint;
479   GProp_GProps System;
480   TopoDS_Compound compound;
481
482   BRep_Builder B;
483   B.MakeCompound(compound);  
484
485   if(myBase.ShapeType() == TopAbs_VERTEX)
486     myGeomBase->VertexToPoint(myBase, myPoint);
487   else if(myBase.ShapeType() == TopAbs_EDGE || myBase.ShapeType() == TopAbs_WIRE) {
488     BRepGProp::LinearProperties(myBase, System);
489     myPoint = System.CentreOfMass();
490   }
491   else if(myBase.ShapeType() == TopAbs_FACE || myBase.ShapeType() == TopAbs_SHELL) {
492     BRepGProp::SurfaceProperties(myBase, System);
493     myPoint = System.CentreOfMass();
494   }
495   else {
496     BRepGProp::VolumeProperties(myBase, System);
497     myPoint = System.CentreOfMass();
498   }
499
500   TopoDS_Shape S = BRepBuilderAPI_MakeVertex(myPoint).Shape();
501
502   try {
503     switch (myConstructorId)
504       {
505       case 0 :
506         { 
507           gp_Ax1 AX1(myLoc, myDir);
508           Standard_Real angle = 360/myNbTimes1;
509           for(i = 0; i < myNbTimes1; i++) {
510             theTransformation.SetRotation(AX1, i*angle*PI180);
511             BRepBuilderAPI_Transform myBRepTransformation(S, theTransformation, Standard_False);
512             B.Add(compound, myBRepTransformation.Shape());
513           }
514           mySimulationTopoDs = compound;
515           myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
516           break;
517         }
518       case 1 :
519         {       
520           gp_Ax1 AX2(myLoc, myDir);
521           Handle(Geom_Line) Line = new Geom_Line(AX2);
522           gp_Pnt P2 = GeomAPI_ProjectPointOnCurve(myPoint, Line);
523           if(myPoint.IsEqual(P2, Precision::Confusion()))
524             return;
525
526           gp_Vec Vec(P2, myPoint);
527           Vec.Normalize();
528
529           for(i = 0; i < myNbTimes2; i++) {
530             for(j = 0; j < myNbTimes1; j++) {
531               DX = i * myStep * Vec.X();
532               DY = i * myStep * Vec.Y();
533               DZ = i * myStep * Vec.Z();
534               myVec.SetCoord(DX, DY, DZ);
535
536               theTransformation1.SetTranslation(myVec);
537               theTransformation2.SetRotation(AX2, j*myAng*PI180);
538               BRepBuilderAPI_Transform myBRepTransformation1(S, theTransformation1, Standard_False);
539               BRepBuilderAPI_Transform myBRepTransformation2(myBRepTransformation1.Shape(), theTransformation2, Standard_False);
540               B.Add(compound, myBRepTransformation2.Shape());
541             }
542           }
543           mySimulationTopoDs = compound;
544           myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
545           break;
546         }
547       }
548   }
549   catch(Standard_Failure) {
550     MESSAGE("Exception catched in MakeMultitranslationSimulationAndDisplay");
551     return;
552   }
553   return;
554 }