]> SALOME platform Git repositories - modules/geom.git/blob - src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx
Salome HOME
SALOME PAL V1_4_1
[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   buttonApply->setFocus();
262   QAD_Application::getDesktop()->putInfo(tr(""));
263   if (mySimulationTopoDs.IsNull())
264     return;
265   myGeomBase->EraseSimulationShape();
266   mySimulationTopoDs.Nullify();
267
268   if(myConstructorId == 0) {
269     if(myOkBase && myOkDir)
270       myTransformationGUI->MakeMultiRotation1DAndDisplay(myGeomShape, myDir, myLoc, myNbTimes1);
271   }
272   else if(myConstructorId == 1) {
273     if(myOkBase && myOkDir)
274       myTransformationGUI->MakeMultiRotation2DAndDisplay(myGeomShape, myDir, myLoc, myAng, myNbTimes1, myStep, myNbTimes2);
275   }
276   return;
277 }
278
279
280 //=================================================================================
281 // function : SelectionIntoArgument()
282 // purpose  : Called when selection as changed or other case
283 //=================================================================================
284 void TransformationGUI_MultiRotationDlg::SelectionIntoArgument()
285 {
286   myGeomBase->EraseSimulationShape();
287   mySimulationTopoDs.Nullify();
288   myEditCurrentArgument->setText("");
289   QString aString = ""; /* name of selection */
290
291   int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
292   if(nbSel != 1) {
293     if(myEditCurrentArgument == GroupPoints->LineEdit1 || myEditCurrentArgument == GroupDimensions->LineEdit1)
294       myOkBase = false;
295     else if(myEditCurrentArgument == GroupPoints->LineEdit2 || myEditCurrentArgument == GroupDimensions->LineEdit2)
296       myOkDir = false;
297     return;
298   }
299
300   // nbSel == 1
301   TopoDS_Shape S; 
302   Standard_Boolean testResult;
303   Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
304   if(!myGeomBase->GetTopoFromSelection(mySelection, S))
305     return;
306
307   if(myEditCurrentArgument == GroupPoints->LineEdit1 || myEditCurrentArgument == GroupDimensions->LineEdit1) {
308     myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
309     if(!testResult)
310       return;
311     myEditCurrentArgument->setText(aString);
312     myBase = S;
313     myOkBase = true;
314   }    
315   else if(myEditCurrentArgument == GroupPoints->LineEdit2 || myEditCurrentArgument == GroupDimensions->LineEdit2) {
316     BRepAdaptor_Curve curv(TopoDS::Edge(S));
317     myDir = curv.Line().Direction();
318     myLoc = curv.Line().Location();
319     myEditCurrentArgument->setText(aString);
320     myOkDir = true;
321   }
322
323   if(myOkBase && myOkDir)
324     this->MakeMultiRotationSimulationAndDisplay();
325   return;
326 }
327
328
329 //=================================================================================
330 // function : SetEditCurrentArgument()
331 // purpose  :
332 //=================================================================================
333 void TransformationGUI_MultiRotationDlg::SetEditCurrentArgument()
334 {
335   QPushButton* send = (QPushButton*)sender();
336   mySelection->ClearFilters();
337
338   if(send == GroupPoints->PushButton1) {
339     GroupPoints->LineEdit1->setFocus();
340     myEditCurrentArgument = GroupPoints->LineEdit1;
341   }
342   else if(send == GroupPoints->PushButton2) {
343     GroupPoints->LineEdit2->setFocus();
344     myEditCurrentArgument = GroupPoints->LineEdit2;
345     mySelection->AddFilter(myEdgeFilter);
346   }
347   else if(send == GroupDimensions->PushButton1) {
348     GroupDimensions->LineEdit1->setFocus();
349     myEditCurrentArgument = GroupDimensions->LineEdit1;
350   }
351   else if(send == GroupDimensions->PushButton2) {
352     GroupDimensions->LineEdit2->setFocus();
353     myEditCurrentArgument = GroupDimensions->LineEdit2;
354     mySelection->AddFilter(myEdgeFilter);
355   }
356   this->SelectionIntoArgument();
357
358   return;
359 }
360
361
362 //=================================================================================
363 // function : LineEditReturnPressed()
364 // purpose  :
365 //=================================================================================
366 void TransformationGUI_MultiRotationDlg::LineEditReturnPressed()
367 {
368   QLineEdit* send = (QLineEdit*)sender();
369   if(send == GroupPoints->LineEdit1)
370     myEditCurrentArgument = GroupPoints->LineEdit1;
371   else if (send == GroupPoints->LineEdit2)
372     myEditCurrentArgument = GroupPoints->LineEdit2;
373   else if (send == GroupDimensions->LineEdit1)
374     myEditCurrentArgument = GroupDimensions->LineEdit1;
375   else if (send == GroupDimensions->LineEdit2)
376     myEditCurrentArgument = GroupDimensions->LineEdit2;
377   else
378     return;
379
380   GEOMBase_Skeleton::LineEditReturnPressed();
381   return;
382 }
383
384
385 //=================================================================================
386 // function : ActivateThisDialog()
387 // purpose  :
388 //=================================================================================
389 void TransformationGUI_MultiRotationDlg::ActivateThisDialog()
390 {
391   GEOMBase_Skeleton::ActivateThisDialog();
392   connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
393
394   if(myConstructorId == 0) {
395     GroupPoints->LineEdit1->setFocus();
396     myEditCurrentArgument = GroupPoints->LineEdit1;
397   }
398   else if(myConstructorId == 1) {
399     GroupDimensions->LineEdit1->setFocus();
400     myEditCurrentArgument = GroupDimensions->LineEdit1;
401   }
402
403   if(!mySimulationTopoDs.IsNull())
404     myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
405   return;
406 }
407
408
409 //=================================================================================
410 // function : enterEvent()
411 // purpose  :
412 //=================================================================================
413 void TransformationGUI_MultiRotationDlg::enterEvent(QEvent* e)
414 {
415   if (GroupConstructors->isEnabled())
416     return;
417   this->ActivateThisDialog();
418   return;
419 }
420
421
422 //=================================================================================
423 // function : ValueChangedInSpinBox()
424 // purpose  :
425 //=================================================================================
426 void TransformationGUI_MultiRotationDlg::ValueChangedInSpinBox(double newValue)
427 {
428   myGeomBase->EraseSimulationShape();
429   mySimulationTopoDs.Nullify();
430   QObject* send = (QObject*)sender();
431
432   if(send == GroupPoints->SpinBox_DX || send == GroupDimensions->SpinBox_DY1)
433     myNbTimes1 = (int)newValue;
434   else if(send == GroupDimensions->SpinBox_DX1)
435     myAng = newValue;
436   else if(send == GroupDimensions->SpinBox_DX2)
437     myStep = newValue;
438   else if(send == GroupDimensions->SpinBox_DY2)
439     myNbTimes2 = (int)newValue;
440
441   if(myOkBase && myOkDir)
442     this->MakeMultiRotationSimulationAndDisplay();
443   return;
444 }
445
446
447 //=================================================================================
448 // function : ReverseAngle()
449 // purpose  : 'state' not used here
450 //=================================================================================
451 void TransformationGUI_MultiRotationDlg::ReverseAngle(int state)
452 {
453   myAng = -myAng;
454   if(myConstructorId == 0)
455     GroupPoints->SpinBox_DX->SetValue(myAng);
456   else if(myConstructorId == 1)
457     GroupDimensions->SpinBox_DX1->SetValue(myAng);
458
459   if(myOkBase && myOkDir)
460     this->MakeMultiRotationSimulationAndDisplay();
461   return;
462 }
463
464
465 //=================================================================================
466 // function : MakeMultiRotationSimulationAndDisplay()
467 // purpose  :
468 //=================================================================================
469 void TransformationGUI_MultiRotationDlg::MakeMultiRotationSimulationAndDisplay() 
470 {
471   myGeomBase->EraseSimulationShape();
472   mySimulationTopoDs.Nullify();
473
474   int i, j;
475   Standard_Real DX, DY, DZ;
476   gp_Trsf theTransformation;
477   gp_Trsf theTransformation1;
478   gp_Trsf theTransformation2;
479   gp_Pnt myPoint;
480   GProp_GProps System;
481   TopoDS_Compound compound;
482
483   BRep_Builder B;
484   B.MakeCompound(compound);  
485
486   if(myBase.ShapeType() == TopAbs_VERTEX)
487     myGeomBase->VertexToPoint(myBase, myPoint);
488   else if(myBase.ShapeType() == TopAbs_EDGE || myBase.ShapeType() == TopAbs_WIRE) {
489     BRepGProp::LinearProperties(myBase, System);
490     myPoint = System.CentreOfMass();
491   }
492   else if(myBase.ShapeType() == TopAbs_FACE || myBase.ShapeType() == TopAbs_SHELL) {
493     BRepGProp::SurfaceProperties(myBase, System);
494     myPoint = System.CentreOfMass();
495   }
496   else {
497     BRepGProp::VolumeProperties(myBase, System);
498     myPoint = System.CentreOfMass();
499   }
500
501   TopoDS_Shape S = BRepBuilderAPI_MakeVertex(myPoint).Shape();
502
503   try {
504     switch (myConstructorId)
505       {
506       case 0 :
507         { 
508           gp_Ax1 AX1(myLoc, myDir);
509           Standard_Real angle = 360/myNbTimes1;
510           for(i = 0; i < myNbTimes1; i++) {
511             theTransformation.SetRotation(AX1, i*angle*PI180);
512             BRepBuilderAPI_Transform myBRepTransformation(S, theTransformation, Standard_False);
513             B.Add(compound, myBRepTransformation.Shape());
514           }
515           mySimulationTopoDs = compound;
516           myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
517           break;
518         }
519       case 1 :
520         {       
521           gp_Ax1 AX2(myLoc, myDir);
522           Handle(Geom_Line) Line = new Geom_Line(AX2);
523           gp_Pnt P2 = GeomAPI_ProjectPointOnCurve(myPoint, Line);
524           if(myPoint.IsEqual(P2, Precision::Confusion()))
525             return;
526
527           gp_Vec Vec(P2, myPoint);
528           Vec.Normalize();
529
530           for(i = 0; i < myNbTimes2; i++) {
531             for(j = 0; j < myNbTimes1; j++) {
532               DX = i * myStep * Vec.X();
533               DY = i * myStep * Vec.Y();
534               DZ = i * myStep * Vec.Z();
535               myVec.SetCoord(DX, DY, DZ);
536
537               theTransformation1.SetTranslation(myVec);
538               theTransformation2.SetRotation(AX2, j*myAng*PI180);
539               BRepBuilderAPI_Transform myBRepTransformation1(S, theTransformation1, Standard_False);
540               BRepBuilderAPI_Transform myBRepTransformation2(myBRepTransformation1.Shape(), theTransformation2, Standard_False);
541               B.Add(compound, myBRepTransformation2.Shape());
542             }
543           }
544           mySimulationTopoDs = compound;
545           myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
546           break;
547         }
548       }
549   }
550   catch(Standard_Failure) {
551     MESSAGE("Exception catched in MakeMultitranslationSimulationAndDisplay");
552     return;
553   }
554   return;
555 }