Salome HOME
3fa2896edb27901e1328ca5fb3c1c51f95759552
[modules/geom.git] / src / TransformationGUI / TransformationGUI_RotationDlg.cxx
1 // Copyright (C) 2007-2023  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  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, or (at your option) any later version.
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.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 // GEOM GEOMGUI : GUI for Geometry component
24 // File   : TransformationGUI_RotationDlg.cxx
25 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
26
27 #include "TransformationGUI_RotationDlg.h"
28
29 #include <DlgRef.h>
30 #include <GeometryGUI.h>
31 #include <GEOMBase.h>
32
33 #include <SUIT_Session.h>
34 #include <SUIT_ResourceMgr.h>
35 #include <SalomeApp_Application.h>
36 #include <LightApp_SelectionMgr.h>
37
38 // OCCT Includes
39 #include <TopoDS_Shape.hxx>
40 #include <TopoDS_Edge.hxx>
41 #include <TopoDS.hxx>
42 #include <TopExp.hxx>
43 #include <TColStd_IndexedMapOfInteger.hxx>
44 #include <TopTools_IndexedMapOfShape.hxx>
45
46 #include <GEOMImpl_Types.hxx>
47
48 //=================================================================================
49 // class    : TransformationGUI_RotationDlg()
50 // purpose  : Constructs a TransformationGUI_RotationDlg which is a child of 'parent', with the
51 //            name 'name' and widget flags set to 'f'.
52 //            The dialog will by default be modeless, unless you set 'modal' to
53 //            TRUE to construct a modal dialog.
54 //=================================================================================
55 TransformationGUI_RotationDlg::TransformationGUI_RotationDlg
56 (GeometryGUI* theGeometryGUI, QWidget* parent, bool modal, Qt::WindowFlags fl)
57   : GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl),
58     myInitial(true)
59 {
60   SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr();
61   QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_ROTATION")));
62   QPixmap image1 (aResMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
63   QPixmap image2 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_ROTATION_THREE_POINTS")));
64
65   setWindowTitle(tr("GEOM_ROTATION_TITLE"));
66
67   /***************************************************************/
68   mainFrame()->GroupConstructors->setTitle(tr("GEOM_ROTATION"));
69   mainFrame()->RadioButton1->setIcon(image0);
70   mainFrame()->RadioButton2->setIcon(image2);
71   mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
72   mainFrame()->RadioButton3->close();
73
74   GroupPoints = new DlgRef_4Sel1Spin2Check(centralWidget());
75   GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
76   GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS"));
77   GroupPoints->TextLabel2->setText(tr("GEOM_AXIS"));
78   GroupPoints->TextLabel3->setText(tr("GEOM_ANGLE"));
79   GroupPoints->TextLabel4->setText(tr("GEOM_POINT_I").arg(1));
80   GroupPoints->TextLabel5->setText(tr("GEOM_POINT_I").arg(2));
81
82   GroupPoints->LineEdit1->setReadOnly(true);
83   GroupPoints->LineEdit2->setReadOnly(true);
84   GroupPoints->LineEdit4->setReadOnly(true);
85   GroupPoints->LineEdit5->setReadOnly(true);
86   GroupPoints->PushButton1->setIcon(image1);
87   GroupPoints->PushButton2->setIcon(image1);
88   GroupPoints->PushButton4->setIcon(image1);
89   GroupPoints->PushButton5->setIcon(image1);
90   GroupPoints->CheckButton1->setText(tr("GEOM_CREATE_COPY"));
91   GroupPoints->CheckButton2->setText(tr("GEOM_REVERSE"));
92
93   QVBoxLayout* layout = new QVBoxLayout(centralWidget());
94   layout->setMargin(0); layout->setSpacing(6);
95   layout->addWidget(GroupPoints);
96   /***************************************************************/
97
98   setHelpFileName("rotation_operation_page.html");
99
100   // Activate Create a Copy mode
101   GroupPoints->CheckButton1->setChecked(true);
102   CreateCopyModeChanged();
103
104   Init();
105 }
106
107 //=================================================================================
108 // function : ~TransformationGUI_RotationDlg()
109 // purpose  : Destroys the object and frees any allocated resources
110 //=================================================================================
111 TransformationGUI_RotationDlg::~TransformationGUI_RotationDlg()
112 {
113   // no need to delete child widgets, Qt does it all for us
114 }
115
116 //=================================================================================
117 // function : Init()
118 // purpose  :
119 //=================================================================================
120 void TransformationGUI_RotationDlg::Init()
121 {
122   double anAngle = 0;
123   double SpecificStep = 5;
124
125   // min, max, step and decimals for spin boxes & initial values
126   initSpinBox(GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, SpecificStep, "angle_precision" );
127   GroupPoints->SpinBox_DX->setValue(anAngle);
128
129   // init variables
130   GroupPoints->LineEdit1->setText("");
131   GroupPoints->LineEdit2->setText("");
132   GroupPoints->LineEdit4->setText("");
133   GroupPoints->LineEdit5->setText("");
134
135   myObjects.clear();
136   myAxis.nullify();
137   myCentPoint.nullify();
138   myPoint1.nullify();
139   myPoint2.nullify();
140
141   mainFrame()->GroupBoxPublish->show();
142
143   // signals and slots connections
144   connect(buttonOk(),    SIGNAL(clicked()), this, SLOT(ClickOnOk()));
145   connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
146
147   connect(this, SIGNAL(constructorsClicked(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(GroupPoints->PushButton4, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
152   connect(GroupPoints->PushButton5, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
153
154   connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
155
156   connect(GroupPoints->SpinBox_DX, SIGNAL(textChanged( const QString& )),
157           this, SLOT(TextValueChangedInSpinBox( const QString&)));
158
159   connect(GroupPoints->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(CreateCopyModeChanged()));
160   connect(GroupPoints->CheckButton2, SIGNAL(toggled(bool)), this, SLOT(onReverse()));
161
162   initName(tr("GEOM_ROTATION"));
163
164   ConstructorsClicked(0);
165 }
166
167 //=================================================================================
168 // function : ConstructorsClicked()
169 // purpose  : Radio button management
170 //=================================================================================
171 void TransformationGUI_RotationDlg::ConstructorsClicked (int constructorId)
172 {
173   disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
174
175   switch (constructorId) {
176   case 0: // rotation an object angle and axis
177     {
178       GroupPoints->ShowRows(2, 3, false);
179       GroupPoints->TextLabel2->setText(tr("GEOM_AXIS"));
180       GroupPoints->LineEdit2->clear();
181       GroupPoints->ShowRows(4, 4, true);
182
183       myAxis.nullify();
184
185       GroupPoints->PushButton1->click();
186     }
187     break;
188   case 1: // rotation an object by 3 points
189     {
190       GroupPoints->ShowRows(4, 4, false);
191       GroupPoints->ShowRows(2, 3, true);
192       GroupPoints->TextLabel2->setText(tr("GEOM_CENTRAL_POINT"));
193       GroupPoints->TextLabel4->setText(tr("GEOM_POINT_I").arg(1));
194       GroupPoints->TextLabel5->setText(tr("GEOM_POINT_I").arg(2));
195
196       GroupPoints->LineEdit2->clear();
197       GroupPoints->LineEdit4->clear();
198       GroupPoints->LineEdit5->clear();
199
200       myCentPoint.nullify();
201       myPoint1.nullify();
202       myPoint2.nullify();
203
204       GroupPoints->PushButton1->click();
205     }
206     break;
207   }
208
209   qApp->processEvents();
210   updateGeometry();
211   resize(minimumSizeHint());
212
213   if (myInitial) {
214     myInitial = false;
215     SelectionIntoArgument();
216   }
217   else {
218     processPreview();
219   }
220 }
221
222 //=================================================================================
223 // function : ClickOnOk()
224 // purpose  :
225 //=================================================================================
226 void TransformationGUI_RotationDlg::ClickOnOk()
227 {
228   setIsApplyAndClose( true );
229   if (ClickOnApply())
230     ClickOnCancel();
231 }
232
233 //=================================================================================
234 // function : ClickOnApply()
235 // purpose  :
236 //=================================================================================
237 bool TransformationGUI_RotationDlg::ClickOnApply()
238 {
239   if (!onAccept(GroupPoints->CheckButton1->isChecked()))
240     return false;
241
242   initName();
243
244   // activate selection and connect selection manager
245   ConstructorsClicked(getConstructorId());
246   SelectionIntoArgument();
247
248   return true;
249 }
250
251 //=================================================================================
252 // function : SelectionIntoArgument()
253 // purpose  : Called when selection is changed or on dialog initialization or activation
254 //=================================================================================
255 void TransformationGUI_RotationDlg::SelectionIntoArgument()
256 {
257   erasePreview();
258
259   if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
260     myObjects = getSelected( TopAbs_SHAPE, -1 );
261     if ( !myObjects.isEmpty() ) {
262       QString aName = myObjects.count() > 1 ? QString( "%1_objects").arg( myObjects.count() ) : GEOMBase::GetName( myObjects[0].get() );
263       myEditCurrentArgument->setText( aName );
264     }
265     else {
266       myEditCurrentArgument->setText("");
267     }
268   }
269   else {
270     TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 0 ) ?
271       TopAbs_EDGE : TopAbs_VERTEX;
272     GEOM::GeomObjPtr aSelectedObject = getSelected( aNeedType );
273     TopoDS_Shape aShape;
274     if ( aSelectedObject && GEOMBase::GetShape( aSelectedObject.get(), aShape ) && !aShape.IsNull() ) {
275       QString aName = GEOMBase::GetName( aSelectedObject.get() );
276       myEditCurrentArgument->setText( aName );
277       if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
278         if ( getConstructorId() == 0 ) {
279           myAxis = aSelectedObject;
280           if ( myObjects.isEmpty() )
281             GroupPoints->PushButton1->click();
282         }
283         else if ( getConstructorId() == 1 ) {
284           myCentPoint = aSelectedObject;
285           if ( !myPoint1 )
286             GroupPoints->PushButton4->click();
287           else if ( !myPoint2 )
288             GroupPoints->PushButton5->click();
289           else if ( myObjects.isEmpty() )
290             GroupPoints->PushButton1->click();
291         }
292       }
293       else if ( myEditCurrentArgument == GroupPoints->LineEdit4 ) {
294         myPoint1 = aSelectedObject;
295         if ( !myPoint2 )
296           GroupPoints->PushButton5->click();
297         else if ( myObjects.isEmpty() )
298           GroupPoints->PushButton1->click();
299         else if ( !myCentPoint )
300           GroupPoints->PushButton2->click();
301       }
302       else if ( myEditCurrentArgument == GroupPoints->LineEdit5 ) {
303         myPoint2 = aSelectedObject;
304         if ( myObjects.isEmpty() )
305           GroupPoints->PushButton1->click();
306         else if ( !myCentPoint )
307           GroupPoints->PushButton2->click();
308         else if ( !myPoint1 )
309           GroupPoints->PushButton4->click();
310       }
311     }
312     else {
313       if (myEditCurrentArgument == GroupPoints->LineEdit2 ) {
314         if ( getConstructorId() == 0 )
315           myAxis.nullify();
316         else if ( getConstructorId() == 1 )
317           myCentPoint.nullify();
318       }
319       else if ( myEditCurrentArgument == GroupPoints->LineEdit4 ) {
320         myPoint1.nullify();
321       }
322       else if ( myEditCurrentArgument == GroupPoints->LineEdit5 ) {
323         myPoint2.nullify();
324       }
325       myEditCurrentArgument->setText("");
326     }
327   }
328
329   processPreview();
330 }
331
332 //=================================================================================
333 // function : SetEditCurrentArgument()
334 // purpose  :
335 //=================================================================================
336 void TransformationGUI_RotationDlg::SetEditCurrentArgument()
337 {
338   QPushButton* send = (QPushButton*)sender();
339
340   disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
341   globalSelection();
342
343   if (send == GroupPoints->PushButton1) {
344     myEditCurrentArgument = GroupPoints->LineEdit1;
345
346     GroupPoints->PushButton2->setDown(false);
347     GroupPoints->PushButton4->setDown(false);
348     GroupPoints->PushButton5->setDown(false);
349     GroupPoints->LineEdit2->setEnabled(false);
350     GroupPoints->LineEdit4->setEnabled(false);
351     GroupPoints->LineEdit5->setEnabled(false);
352   }
353   else if (send == GroupPoints->PushButton2) {
354     myEditCurrentArgument = GroupPoints->LineEdit2;
355
356     GroupPoints->PushButton1->setDown(false);
357     GroupPoints->PushButton4->setDown(false);
358     GroupPoints->PushButton5->setDown(false);
359     GroupPoints->LineEdit1->setEnabled(false);
360     GroupPoints->LineEdit4->setEnabled(false);
361     GroupPoints->LineEdit5->setEnabled(false);
362
363     if (getConstructorId() == 0)
364       localSelection(TopAbs_EDGE);
365     else
366       localSelection(TopAbs_VERTEX);
367   }
368   else if (send == GroupPoints->PushButton4) {
369     myEditCurrentArgument = GroupPoints->LineEdit4;
370
371     GroupPoints->PushButton1->setDown(false);
372     GroupPoints->PushButton2->setDown(false);
373     GroupPoints->PushButton5->setDown(false);
374     GroupPoints->LineEdit1->setEnabled(false);
375     GroupPoints->LineEdit2->setEnabled(false);
376     GroupPoints->LineEdit5->setEnabled(false);
377
378     localSelection(TopAbs_VERTEX);
379   }
380   else if (send == GroupPoints->PushButton5) {
381     myEditCurrentArgument = GroupPoints->LineEdit5;
382
383     GroupPoints->PushButton1->setDown(false);
384     GroupPoints->PushButton2->setDown(false);
385     GroupPoints->PushButton4->setDown(false);
386     GroupPoints->LineEdit1->setEnabled(false);
387     GroupPoints->LineEdit2->setEnabled(false);
388     GroupPoints->LineEdit4->setEnabled(false);
389
390     localSelection(TopAbs_VERTEX);
391   }
392   connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
393           this, SLOT(SelectionIntoArgument()));
394
395   // enable line edit
396   myEditCurrentArgument->setEnabled(true);
397   myEditCurrentArgument->setFocus();
398   // after setFocus(), because it will be setDown(false) when loses focus
399   send->setDown(true);
400
401   // seems we need it only to avoid preview disappearing, caused by selection mode change
402   processPreview();
403 }
404
405 //=================================================================================
406 // function : ActivateThisDialog()
407 // purpose  :
408 //=================================================================================
409 void TransformationGUI_RotationDlg::ActivateThisDialog()
410 {
411   GEOMBase_Skeleton::ActivateThisDialog();
412   connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
413            this, SLOT( SelectionIntoArgument() ) );
414
415   ConstructorsClicked( getConstructorId() );
416 }
417
418 //=================================================================================
419 // function : enterEvent()
420 // purpose  :
421 //=================================================================================
422 void TransformationGUI_RotationDlg::enterEvent (QEvent*)
423 {
424   if (!mainFrame()->GroupConstructors->isEnabled())
425     ActivateThisDialog();
426 }
427
428 void TransformationGUI_RotationDlg::TextValueChangedInSpinBox( const QString& s)
429 {
430   bool isDigit = true;
431   s.toDouble(&isDigit);
432   if(!isDigit) {
433     GroupPoints->CheckButton2->setChecked(false);
434   }
435   GroupPoints->CheckButton2->setEnabled(isDigit); 
436 }
437
438 //=================================================================================
439 // function : ValueChangedInSpinBox()
440 // purpose  :
441 //=================================================================================
442 void TransformationGUI_RotationDlg::ValueChangedInSpinBox()
443 {
444   processPreview();
445 }
446
447 //=================================================================================
448 // function : createOperation
449 // purpose  :
450 //=================================================================================
451 GEOM::GEOM_IOperations_ptr TransformationGUI_RotationDlg::createOperation()
452 {
453   return getGeomEngine()->GetITransformOperations();
454 }
455
456 //=================================================================================
457 // function : isValid
458 // purpose  :
459 //=================================================================================
460 bool TransformationGUI_RotationDlg::isValid (QString& msg)
461 {
462   bool ok = false;
463   switch (getConstructorId()) {
464   case 0:
465     ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() ) && !myObjects.isEmpty() && myAxis;
466     break;
467   case 1:
468     ok = !myObjects.isEmpty() && myCentPoint && myPoint1 && myPoint2;
469     break;
470   default:
471     break;
472   }
473   return ok;
474 }
475
476 //=================================================================================
477 // function : execute
478 // purpose  :
479 //=================================================================================
480 bool TransformationGUI_RotationDlg::execute (ObjectList& objects)
481 {
482   bool res = false;
483   bool toCreateCopy = IsPreview() || GroupPoints->CheckButton1->isChecked();
484
485   GEOM::GEOM_Object_var anObj;
486
487   GEOM::GEOM_ITransformOperations_var anOper = GEOM::GEOM_ITransformOperations::_narrow(getOperation());
488
489   switch (getConstructorId()) {
490   case 0:
491     {
492       QStringList aParameters;
493       aParameters<<GroupPoints->SpinBox_DX->text();
494       if (toCreateCopy) {
495         for (int i = 0; i < myObjects.count(); i++) {
496           myCurrObject = myObjects[i];
497           anObj = anOper->RotateCopy(myObjects[i].get(), myAxis.get(), GetAngle() * M_PI / 180.);
498           if (!anObj->_is_nil()) {
499             if(!IsPreview()) {
500               anObj->SetParameters(aParameters.join(":").toUtf8().constData());
501             }
502             objects.push_back(anObj._retn());
503           }
504         }
505       }
506       else {
507         for (int i = 0; i < myObjects.count(); i++) {
508           myCurrObject = myObjects[i];
509           anObj = anOper->Rotate(myObjects[i].get(), myAxis.get(), GetAngle() * M_PI / 180.);
510           if (!anObj->_is_nil()) {
511             if(!IsPreview()) {
512               anObj->SetParameters(aParameters.join(":").toUtf8().constData());
513               updateAttributes(anObj, aParameters);
514             }
515             objects.push_back(anObj._retn());
516           }
517         }
518       }
519       res = true;
520       break;
521     }
522   case 1:
523     {
524       if (toCreateCopy) {
525         for (int i = 0; i < myObjects.count(); i++) {
526           myCurrObject = myObjects[i];
527           anObj = anOper->RotateThreePointsCopy(myObjects[i].get(), myCentPoint.get(), myPoint1.get(), myPoint2.get());
528           if (!anObj->_is_nil())
529             objects.push_back(anObj._retn());
530         }
531       }
532       else {
533         for (int i = 0; i < myObjects.count(); i++) {
534           myCurrObject = myObjects[i];
535           anObj = anOper->RotateThreePoints(myObjects[i].get(), myCentPoint.get(), myPoint1.get(), myPoint2.get());
536           if (!anObj->_is_nil())
537             objects.push_back(anObj._retn());
538         }
539       }
540       res = true;
541       break;
542     }
543   }
544
545   return res;
546 }
547
548 //=================================================================================
549 // function : restoreSubShapes
550 // purpose  :
551 //=================================================================================
552 void TransformationGUI_RotationDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
553 {
554   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
555     // we pass here the first operation argument (object) through the list of arguments
556     // because the rotation operation place its arguments in the data structure in another order,
557     // and we need to point the first argument directly
558     GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO;
559     anArgs->length(1);
560     anArgs[0] = myCurrObject.copy();
561     getGeomEngine()->RestoreSubShapesSO(theSObject, anArgs,
562                                         /*theFindMethod=*/GEOM::FSM_Transformed,
563                                         /*theInheritFirstArg=*/true,
564                                         mainFrame()->CheckBoxAddPrefix->isChecked());
565   }
566 }
567
568 //=================================================================================
569 // function : GetAngle()
570 // purpose  :
571 //=================================================================================
572 double TransformationGUI_RotationDlg::GetAngle() const
573 {
574   return GroupPoints->SpinBox_DX->value();
575 }
576
577 //=================================================================================
578 // function :  CreateCopyModeChanged()
579 // purpose  :
580 //=================================================================================
581 void TransformationGUI_RotationDlg::CreateCopyModeChanged()
582 {
583   mainFrame()->GroupBoxName->setEnabled(GroupPoints->CheckButton1->isChecked());
584 }
585
586 //=================================================================================
587 // function :  onReverse()
588 // purpose  :
589 //=================================================================================
590 void TransformationGUI_RotationDlg::onReverse()
591 {
592   double anOldValue = GroupPoints->SpinBox_DX->value();
593   GroupPoints->SpinBox_DX->setValue(-anOldValue);
594 }
595
596 //=================================================================================
597 // function : addSubshapesToStudy
598 // purpose  : virtual method to add new SubObjects if local selection
599 //=================================================================================
600 void TransformationGUI_RotationDlg::addSubshapesToStudy()
601 {
602   bool toCreateCopy = IsPreview() || GroupPoints->CheckButton1->isChecked();
603   if (toCreateCopy) {
604     switch (getConstructorId()) {
605     case 0:
606       GEOMBase::PublishSubObject( myAxis.get() );
607       break;
608     case 1:
609       GEOMBase::PublishSubObject( myCentPoint.get() );
610       GEOMBase::PublishSubObject( myPoint1.get() );
611       GEOMBase::PublishSubObject( myPoint2.get() );
612       break;
613     default:
614       break;
615     }
616   }
617 }
618
619 //=================================================================================
620 // function : getSourceObjects
621 // purpose  : virtual method to get source objects
622 //=================================================================================
623 QList<GEOM::GeomObjPtr> TransformationGUI_RotationDlg::getSourceObjects()
624 {
625   QList<GEOM::GeomObjPtr> res;
626   if ( GroupPoints->CheckButton1->isChecked() ) {
627     res.append(myObjects);
628     res << myAxis << myCentPoint << myPoint1 << myPoint2;
629   }
630   return res;
631 }