Salome HOME
NPAL 16768 Select Vertex from Vertex on Shape
[modules/geom.git] / src / BasicGUI / BasicGUI_CircleDlg.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.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //
23 //
24 //  File   : BasicGUI_CircleDlg.cxx
25 //  Author : Lucien PIGNOLONI
26 //  Module : GEOM
27 //  $Header$
28
29 #include "BasicGUI_CircleDlg.h"
30
31 #include "SUIT_Desktop.h"
32 #include "SUIT_Session.h"
33 #include "SalomeApp_Application.h"
34 #include "LightApp_SelectionMgr.h"
35
36 #include <TColStd_IndexedMapOfInteger.hxx>
37 #include <TopTools_IndexedMapOfShape.hxx>
38 #include <qlabel.h>
39
40 #include <TopoDS_Shape.hxx>
41 #include <TopoDS_Edge.hxx>
42 #include <TopoDS.hxx>
43 #include <TopExp.hxx>
44
45 #include <GEOMImpl_ILocalOperations.hxx>
46
47 #include "GEOMImpl_Types.hxx"
48 #include "GEOM_Object.hxx"
49 #include "GEOM_Engine.hxx"
50
51 #include "utilities.h"
52
53 //=================================================================================
54 // class    : BasicGUI_CircleDlg()
55 // purpose  : Constructs a BasicGUI_CircleDlg which is a child of 'parent', with the 
56 //            name 'name' and widget flags set to 'f'.
57 //            The dialog will by default be modeless, unless you set 'modal' to
58 //            TRUE to construct a modal dialog.
59 //=================================================================================
60 BasicGUI_CircleDlg::BasicGUI_CircleDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
61                                        const char* name, bool modal, WFlags fl)
62   :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize |
63                      WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
64 {
65   QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CIRCLE_PV")));
66   QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CIRCLE_PNTS")));
67   QPixmap image3(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CIRCLE_C2P")));
68   QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
69
70   setCaption(tr("GEOM_CIRCLE_TITLE"));
71
72   /***************************************************************/
73   GroupConstructors->setTitle(tr("GEOM_CIRCLE"));
74   RadioButton1->setPixmap(image0);
75   RadioButton2->setPixmap(image2);
76   RadioButton3->setPixmap(image3);
77
78   GroupPntVecR = new DlgRef_2Sel1Spin(this, "GroupPntVecR");
79   GroupPntVecR->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
80   
81   GroupPntVecR->TextLabel1->setText(tr("GEOM_CENTER_POINT"));
82   GroupPntVecR->TextLabel2->setText(tr("GEOM_VECTOR"));
83   GroupPntVecR->TextLabel3->setText(tr("GEOM_RADIUS"));
84   GroupPntVecR->PushButton1->setPixmap(image1);
85   GroupPntVecR->PushButton2->setPixmap(image1);
86
87   GroupPntVecR->LineEdit1->setReadOnly( true );
88   GroupPntVecR->LineEdit2->setReadOnly( true );
89
90   Group3Pnts = new DlgRef_3Sel_QTD(this, "Group3Pnts");
91   Group3Pnts->GroupBox1->setTitle(tr("GEOM_3_POINTS"));
92   Group3Pnts->TextLabel1->setText(tr("GEOM_POINT1"));
93   Group3Pnts->TextLabel2->setText(tr("GEOM_POINT2"));
94   Group3Pnts->TextLabel3->setText(tr("GEOM_POINT3"));
95   Group3Pnts->PushButton1->setPixmap(image1);
96   Group3Pnts->PushButton2->setPixmap(image1);
97   Group3Pnts->PushButton3->setPixmap(image1);
98
99   Group3Pnts->LineEdit1->setReadOnly( true );
100   Group3Pnts->LineEdit2->setReadOnly( true );
101   Group3Pnts->LineEdit3->setReadOnly( true );
102
103   GroupCenter2Pnts = new DlgRef_3Sel_QTD(this, "GroupCenter2Pnts");
104   GroupCenter2Pnts->GroupBox1->setTitle(tr("GEOM_CENTER_2POINTS"));
105   GroupCenter2Pnts->TextLabel1->setText(tr("GEOM_CENTER_POINT"));
106   GroupCenter2Pnts->TextLabel2->setText(tr("GEOM_POINT1"));
107   GroupCenter2Pnts->TextLabel3->setText(tr("GEOM_POINT2"));
108   GroupCenter2Pnts->PushButton1->setPixmap(image1);
109   GroupCenter2Pnts->PushButton2->setPixmap(image1);
110   GroupCenter2Pnts->PushButton3->setPixmap(image1);
111
112   GroupCenter2Pnts->LineEdit1->setReadOnly( true );
113   GroupCenter2Pnts->LineEdit2->setReadOnly( true );
114   GroupCenter2Pnts->LineEdit3->setReadOnly( true );
115
116   Layout1->addWidget( GroupPntVecR, 2, 0 );
117   Layout1->addWidget( Group3Pnts, 2, 0 );
118   Layout1->addWidget( GroupCenter2Pnts, 2, 0 );
119   /***************************************************************/
120
121   setHelpFileName("circle.htm");
122
123   Init();
124 }
125
126
127 //=================================================================================
128 // function : ~BasicGUI_CircleDlg()
129 // purpose  : Destroys the object and frees any allocated resources
130 //=================================================================================
131 BasicGUI_CircleDlg::~BasicGUI_CircleDlg()
132 {
133 }
134
135
136 //=================================================================================
137 // function : Init()
138 // purpose  :
139 //=================================================================================
140 void BasicGUI_CircleDlg::Init()
141 {
142   /* init variables */
143   myEditCurrentArgument = GroupPntVecR->LineEdit1;
144
145   myPoint = myDir = myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil();
146
147   // myGeomGUI->SetState( 0 );
148
149   /* Get setting of step value from file configuration */
150   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
151   double aStep = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
152
153   /* min, max, step and decimals for spin boxes & initial values */
154   GroupPntVecR->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, DBL_DIGITS_DISPLAY);
155   GroupPntVecR->SpinBox_DX->SetValue( 100 );
156
157   /* signals and slots connections */
158   connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
159   connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
160   connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
161   
162   connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
163   connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
164   connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
165
166   connect(GroupPntVecR->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
167   connect(GroupPntVecR->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
168   connect(Group3Pnts->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
169   connect(Group3Pnts->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
170   connect(Group3Pnts->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
171
172   connect(GroupCenter2Pnts->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
173   connect(GroupCenter2Pnts->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
174   connect(GroupCenter2Pnts->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
175
176   connect(GroupPntVecR->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
177   connect(GroupPntVecR->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
178
179   connect(GroupPntVecR->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
180   connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPntVecR->SpinBox_DX, SLOT(SetStep(double)));
181   
182   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
183           SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
184
185   initName( tr( "GEOM_CIRCLE" ) );
186
187   Group3Pnts->hide();
188   GroupCenter2Pnts->hide();
189   ConstructorsClicked( 0 );
190 }
191
192 //=================================================================================
193 // function : ConstructorsClicked()
194 // purpose  : Radio button management
195 //=================================================================================
196 void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
197 {
198   disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0 );
199   myPoint = myDir = myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil();
200
201   switch ( constructorId )
202   {
203     case 0:
204       {
205         Group3Pnts->hide();
206         GroupCenter2Pnts->hide();
207         resize(0, 0);
208         GroupPntVecR->show();
209         
210         myEditCurrentArgument = GroupPntVecR->LineEdit1;
211         GroupPntVecR->LineEdit1->setText("");
212         GroupPntVecR->LineEdit2->setText("");
213         break;
214       }
215   case 1:
216     {
217       GroupPntVecR->hide();
218       GroupCenter2Pnts->hide();
219       resize( 0, 0 );
220       Group3Pnts->show();
221       
222       myEditCurrentArgument = Group3Pnts->LineEdit1;
223       Group3Pnts->LineEdit1->setText("");
224       Group3Pnts->LineEdit2->setText("");
225       Group3Pnts->LineEdit3->setText("");
226       break;
227       }
228    case 2:
229       {
230         GroupPntVecR->hide();
231         Group3Pnts->hide();             
232         resize( 0, 0 );
233         GroupCenter2Pnts->show();
234
235         myEditCurrentArgument = GroupCenter2Pnts->LineEdit1;
236         GroupCenter2Pnts->LineEdit1->setText("");
237         GroupCenter2Pnts->LineEdit2->setText("");
238         GroupCenter2Pnts->LineEdit3->setText("");
239         break;
240       }
241   }
242   
243   myEditCurrentArgument->setFocus();
244   //  globalSelection( GEOM_POINT );
245   GEOM::GEOM_Object_var anObj;
246   localSelection( anObj, TopAbs_VERTEX );
247   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
248           SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
249 }
250
251 //=================================================================================
252 // function : ClickOnOk()
253 // purpose  :
254 //=================================================================================
255 void BasicGUI_CircleDlg::ClickOnOk()
256 {
257   if ( ClickOnApply() )
258     ClickOnCancel();
259 }
260
261 //=================================================================================
262 // function : ClickOnApply()
263 // purpose  :
264 //=================================================================================
265 bool BasicGUI_CircleDlg::ClickOnApply()
266 {
267   if ( !onAccept() )
268     return false;
269
270   initName();
271   ConstructorsClicked( getConstructorId() );
272   return true;
273 }
274
275 //=======================================================================
276 // function : ClickOnCancel()
277 // purpose  :
278 //=======================================================================
279 void BasicGUI_CircleDlg::ClickOnCancel()
280 {
281   GEOMBase_Skeleton::ClickOnCancel();
282 }
283
284 //=================================================================================
285 // function : SelectionIntoArgument()
286 // purpose  : Called when selection as changed or other case
287 //=================================================================================
288 void BasicGUI_CircleDlg::SelectionIntoArgument()
289 {
290   myEditCurrentArgument->setText("");
291   
292   if ( IObjectCount() != 1 )  
293   {
294     if      ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) myPoint  = GEOM::GEOM_Object::_nil();
295     else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) myDir    = GEOM::GEOM_Object::_nil();
296     else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 )   myPoint1 = GEOM::GEOM_Object::_nil();
297     else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 )   myPoint2 = GEOM::GEOM_Object::_nil();
298     else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 )   myPoint3 = GEOM::GEOM_Object::_nil();
299     else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit1 ) myPoint4  = GEOM::GEOM_Object::_nil();
300     else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit2 ) myPoint5  = GEOM::GEOM_Object::_nil();
301     else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit3 ) myPoint6  = GEOM::GEOM_Object::_nil();
302     return;
303   }
304
305   // nbSel == 1
306   Standard_Boolean aRes = Standard_False;
307   Handle(SALOME_InteractiveObject) anIO = firstIObject();
308   GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIO, aRes );
309   if ( !CORBA::is_nil( aSelectedObject ) && aRes )
310   { 
311     myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
312     // If selected Vertex or Edge on the some Shape Get selection Subshape
313     TopoDS_Shape aShape;
314     if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() )
315       {
316         LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
317         TColStd_IndexedMapOfInteger aMap;
318         aSelMgr->GetIndexes( anIO, aMap );
319         if ( aMap.Extent() == 1 )
320           {
321             GEOM::GEOM_IShapesOperations_var aShapesOp =
322               getGeomEngine()->GetIShapesOperations( getStudyId() );
323             int anIndex = aMap( 1 );
324             TopTools_IndexedMapOfShape aShapes;
325             TopExp::MapShapes( aShape, aShapes );
326             aShape = aShapes.FindKey( anIndex );
327             aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
328             aSelMgr->clearSelected();
329           }
330       }
331     if      ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) myPoint  = aSelectedObject;
332     else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) myDir = aSelectedObject;
333     else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 )   myPoint1 = aSelectedObject;
334     else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 )   myPoint2 = aSelectedObject;
335     else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 )   myPoint3 = aSelectedObject;
336     else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit1 ) myPoint4 = aSelectedObject;
337     else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit2 ) myPoint5 = aSelectedObject;
338     else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit3 ) myPoint6 = aSelectedObject;
339   }
340   displayPreview();
341 }
342
343
344 //=================================================================================
345 // function : SetEditCurrentArgument()
346 // purpose  :
347 //=================================================================================
348 void BasicGUI_CircleDlg::SetEditCurrentArgument()
349 {
350   QPushButton* send = (QPushButton*)sender();
351
352   if ( send == GroupPntVecR->PushButton1 )      myEditCurrentArgument = GroupPntVecR->LineEdit1;
353   else if ( send == GroupPntVecR->PushButton2 ) myEditCurrentArgument = GroupPntVecR->LineEdit2;
354   else if ( send == Group3Pnts->PushButton1 )   myEditCurrentArgument = Group3Pnts->LineEdit1;
355   else if ( send == Group3Pnts->PushButton2 )   myEditCurrentArgument = Group3Pnts->LineEdit2;
356   else if ( send == Group3Pnts->PushButton3 )   myEditCurrentArgument = Group3Pnts->LineEdit3;
357   else if ( send == GroupCenter2Pnts->PushButton1 )   myEditCurrentArgument = GroupCenter2Pnts->LineEdit1;
358   else if ( send == GroupCenter2Pnts->PushButton2 )   myEditCurrentArgument = GroupCenter2Pnts->LineEdit2;
359   else if ( send == GroupCenter2Pnts->PushButton3 )   myEditCurrentArgument = GroupCenter2Pnts->LineEdit3;
360   
361   myEditCurrentArgument->setFocus();
362   
363   if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 )
364     {
365       GEOM::GEOM_Object_var anObj;
366       localSelection( anObj, TopAbs_EDGE );
367     }
368   else {
369     GEOM::GEOM_Object_var anObj;
370     localSelection( anObj, TopAbs_EDGE );
371   }
372   SelectionIntoArgument();
373 }
374
375 //=================================================================================
376 // function : LineEditReturnPressed()
377 // purpose  :
378 //=================================================================================
379 void BasicGUI_CircleDlg::LineEditReturnPressed()
380 {
381   QLineEdit* send = (QLineEdit*)sender();
382   if ( send == GroupPntVecR->LineEdit1 ||
383        send == GroupPntVecR->LineEdit2 ||
384        send == Group3Pnts->LineEdit1 ||
385        send == Group3Pnts->LineEdit2 ||
386        send == Group3Pnts->LineEdit3 ||
387        send == GroupCenter2Pnts->LineEdit1 ||
388        send == GroupCenter2Pnts->LineEdit2 ||
389        send == GroupCenter2Pnts->LineEdit3 )
390   {
391     myEditCurrentArgument = send;
392     GEOMBase_Skeleton::LineEditReturnPressed();
393   }
394 }
395
396
397 //=================================================================================
398 // function : ActivateThisDialog()
399 // purpose  :
400 //=================================================================================
401 void BasicGUI_CircleDlg::ActivateThisDialog()
402 {
403   GEOMBase_Skeleton::ActivateThisDialog();
404   globalSelection( GEOM_POINT );
405   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
406           SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
407
408   // myGeomGUI->SetState( 0 );
409
410   ConstructorsClicked( getConstructorId() );
411 }
412
413
414 //=================================================================================
415 // function : enterEvent()
416 // purpose  :
417 //=================================================================================
418 void BasicGUI_CircleDlg::enterEvent(QEvent* e)
419 {
420   if ( !GroupConstructors->isEnabled() )
421     ActivateThisDialog();
422 }
423
424 //=================================================================================
425 // function : DeactivateActiveDialog()
426 // purpose  : public slot to deactivate if active
427 //=================================================================================
428 void BasicGUI_CircleDlg::DeactivateActiveDialog()
429 {
430   // myGeomGUI->SetState( -1 );
431   GEOMBase_Skeleton::DeactivateActiveDialog();
432 }
433
434 //=================================================================================
435 // function : ValueChangedInSpinBox()
436 // purpose  :
437 //=================================================================================
438 void BasicGUI_CircleDlg::ValueChangedInSpinBox()
439 {
440   displayPreview();
441 }
442
443 //=================================================================================
444 // function : getRadius()
445 // purpose  :
446 //=================================================================================
447 double BasicGUI_CircleDlg::getRadius() const
448 {
449   switch ( getConstructorId() )
450     {
451     case 0 :
452       return GroupPntVecR->SpinBox_DX->GetValue();
453     }
454 }
455
456 //=================================================================================
457 // function : createOperation
458 // purpose  :
459 //=================================================================================
460 GEOM::GEOM_IOperations_ptr BasicGUI_CircleDlg::createOperation()
461 {
462   return myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
463 }
464
465 //=================================================================================
466 // function : isEqual
467 // purpose  : it may also be needed to check for min distance between gp_Pnt-s...
468 //=================================================================================
469 static bool isEqual( const GEOM::GEOM_Object_var& thePnt1, const GEOM::GEOM_Object_var& thePnt2 )
470 {
471   return thePnt1->_is_equivalent( thePnt2 );
472 }
473
474 //=================================================================================
475 // function : isValid
476 // purpose  :
477 //=================================================================================
478 bool BasicGUI_CircleDlg::isValid( QString& msg )
479 {
480   const int id = getConstructorId();
481   if ( id == 0 )
482     return !myPoint->_is_nil() && !myDir->_is_nil() && getRadius() > 0;
483   else if ( id == 1 )
484     return !myPoint1->_is_nil() && !myPoint2->_is_nil() && !myPoint3->_is_nil() &&
485       !isEqual( myPoint1, myPoint2 ) && !isEqual( myPoint1, myPoint3 ) && !isEqual( myPoint2, myPoint3 );
486   else if ( id == 2 )
487       return !myPoint4->_is_nil() && !myPoint5->_is_nil() && !myPoint6->_is_nil() &&
488       !isEqual( myPoint4, myPoint5 ) && !isEqual( myPoint5, myPoint6 ) && !isEqual( myPoint4, myPoint6 );
489   return false;
490 }
491
492 //=================================================================================
493 // function : execute
494 // purpose  :
495 //=================================================================================
496 bool BasicGUI_CircleDlg::execute( ObjectList& objects )
497 {
498   bool res = false;
499   
500   GEOM::GEOM_Object_var anObj;
501   
502   switch ( getConstructorId() )
503   {
504     cout << "constructior ID = " << getConstructorId() << endl;
505   case 0 :
506     anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeCirclePntVecR( myPoint, myDir, getRadius() );
507     res = true;
508     break;
509   case 1 :
510     anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeCircleThreePnt( myPoint1, myPoint2, myPoint3 );
511     res = true;
512     break;
513   case 2 :
514     anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeCircleCenter2Pnt( myPoint4, myPoint5, myPoint6 );
515     res = true;
516     break;
517   }
518   
519   if ( !anObj->_is_nil() )
520     objects.push_back( anObj._retn() );
521   else cout << "Execute Object is NULL!" << endl;
522   
523   return res;
524 }
525
526 //=================================================================================
527 // function : closeEvent
528 // purpose  :
529 //=================================================================================
530 void BasicGUI_CircleDlg::closeEvent( QCloseEvent* e )
531 {
532   GEOMBase_Skeleton::closeEvent( e );
533 }
534