1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // GEOM GEOMGUI : GUI for Geometry component
24 // File : BasicGUI_CircleDlg.cxx
25 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
27 #include "BasicGUI_CircleDlg.h"
31 #include <GeometryGUI.h>
34 #include <SUIT_ResourceMgr.h>
35 #include <SUIT_Session.h>
36 #include <SalomeApp_Application.h>
37 #include <LightApp_SelectionMgr.h>
39 #include <TColStd_IndexedMapOfInteger.hxx>
40 #include <TopTools_IndexedMapOfShape.hxx>
41 #include <TopoDS_Shape.hxx>
42 #include <TopoDS_Edge.hxx>
46 //=================================================================================
47 // class : BasicGUI_CircleDlg()
48 // purpose : Constructs a BasicGUI_CircleDlg which is a child of 'parent', with the
49 // name 'name' and widget flags set to 'f'.
50 // The dialog will by default be modeless, unless you set 'modal' to
51 // TRUE to construct a modal dialog.
52 //=================================================================================
53 BasicGUI_CircleDlg::BasicGUI_CircleDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
54 bool modal, Qt::WindowFlags fl )
55 : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
57 QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_CIRCLE_PV" ) ) );
58 QPixmap image2( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_CIRCLE_PNTS" ) ) );
59 QPixmap image3( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_CIRCLE_C2P" ) ) );
60 QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
62 setWindowTitle( tr( "GEOM_CIRCLE_TITLE" ) );
64 /***************************************************************/
65 mainFrame()->GroupConstructors->setTitle( tr( "GEOM_CIRCLE" ) );
66 mainFrame()->RadioButton1->setIcon( image0 );
67 mainFrame()->RadioButton2->setIcon( image2 );
68 mainFrame()->RadioButton3->setIcon( image3 );
70 GroupPntVecR = new DlgRef_2Sel1Spin( centralWidget() );
71 GroupPntVecR->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
73 GroupPntVecR->TextLabel1->setText( tr( "GEOM_CENTER_POINT" ) + " " + tr( "GEOM_CENTER_DEFAULT" ) );
74 GroupPntVecR->TextLabel2->setText( tr( "GEOM_VECTOR" ) + " " + tr( "GEOM_AXIS_DEFAULT" ) );
75 GroupPntVecR->TextLabel3->setText( tr( "GEOM_RADIUS" ) );
76 GroupPntVecR->PushButton1->setIcon( image1 );
77 GroupPntVecR->PushButton2->setIcon( image1 );
78 GroupPntVecR->PushButton1->setDown( true );
80 GroupPntVecR->LineEdit1->setReadOnly( true );
81 GroupPntVecR->LineEdit2->setReadOnly( true );
83 GroupPntVecR->LineEdit1->setEnabled( true );
84 GroupPntVecR->LineEdit2->setEnabled( false );
86 Group3Pnts = new DlgRef_3Sel( centralWidget() );
88 Group3Pnts->GroupBox1->setTitle( tr( "GEOM_3_POINTS" ) );
89 Group3Pnts->TextLabel1->setText( tr( "GEOM_POINT1" ) );
90 Group3Pnts->TextLabel2->setText( tr( "GEOM_POINT2" ) );
91 Group3Pnts->TextLabel3->setText( tr( "GEOM_POINT3" ) );
92 Group3Pnts->PushButton1->setIcon( image1 );
93 Group3Pnts->PushButton2->setIcon( image1 );
94 Group3Pnts->PushButton3->setIcon( image1 );
95 Group3Pnts->PushButton1->setDown( true );
97 Group3Pnts->LineEdit1->setReadOnly( true );
98 Group3Pnts->LineEdit2->setReadOnly( true );
99 Group3Pnts->LineEdit3->setReadOnly( true );
100 Group3Pnts->LineEdit1->setEnabled( true );
101 Group3Pnts->LineEdit2->setEnabled( false );
102 Group3Pnts->LineEdit3->setEnabled( false );
104 GroupCenter2Pnts = new DlgRef_3Sel( centralWidget() );
105 GroupCenter2Pnts->GroupBox1->setTitle( tr( "GEOM_CENTER_2POINTS" ) );
106 GroupCenter2Pnts->TextLabel1->setText( tr( "GEOM_CENTER_POINT" ) );
107 GroupCenter2Pnts->TextLabel2->setText( tr( "GEOM_POINT1" ) );
108 GroupCenter2Pnts->TextLabel3->setText( tr( "GEOM_POINT2" ) );
109 GroupCenter2Pnts->PushButton1->setIcon( image1 );
110 GroupCenter2Pnts->PushButton2->setIcon( image1 );
111 GroupCenter2Pnts->PushButton3->setIcon( image1 );
112 GroupCenter2Pnts->PushButton1->setDown( true );
114 GroupCenter2Pnts->LineEdit1->setReadOnly( true );
115 GroupCenter2Pnts->LineEdit2->setReadOnly( true );
116 GroupCenter2Pnts->LineEdit3->setReadOnly( true );
118 GroupCenter2Pnts->LineEdit1->setEnabled( true );
119 GroupCenter2Pnts->LineEdit2->setEnabled( false );
120 GroupCenter2Pnts->LineEdit3->setEnabled( false );
122 QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
123 layout->setMargin( 0 ); layout->setSpacing( 6 );
124 layout->addWidget( GroupPntVecR );
125 layout->addWidget( Group3Pnts );
126 layout->addWidget( GroupCenter2Pnts );
127 /***************************************************************/
129 setHelpFileName( "create_circle_page.html" );
135 //=================================================================================
136 // function : ~BasicGUI_CircleDlg()
137 // purpose : Destroys the object and frees any allocated resources
138 //=================================================================================
139 BasicGUI_CircleDlg::~BasicGUI_CircleDlg()
144 //=================================================================================
147 //=================================================================================
148 void BasicGUI_CircleDlg::Init()
151 myEditCurrentArgument = GroupPntVecR->LineEdit1;
162 /* Get setting of step value from file configuration */
163 SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
164 double aStep = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
166 /* min, max, step and decimals for spin boxes & initial values */
167 initSpinBox( GroupPntVecR->SpinBox_DX, 0.000001, COORD_MAX, aStep, "length_precision" );
168 GroupPntVecR->SpinBox_DX->setValue( 100 );
170 /* signals and slots connections */
171 connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
172 connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
174 connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
175 connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
177 connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
179 connect( GroupPntVecR->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
180 connect( GroupPntVecR->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
181 connect( Group3Pnts->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
182 connect( Group3Pnts->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
183 connect( Group3Pnts->PushButton3, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
185 connect( GroupCenter2Pnts->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
186 connect( GroupCenter2Pnts->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
187 connect( GroupCenter2Pnts->PushButton3, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
189 connect( GroupPntVecR->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT(ValueChangedInSpinBox() ) );
190 connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) );
192 connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
193 this, SLOT( SelectionIntoArgument() ) );
195 initName( tr( "GEOM_CIRCLE" ) );
197 ConstructorsClicked( 0 );
200 //=================================================================================
201 // function : SetDoubleSpinBoxStep()
202 // purpose : Double spin box management
203 //=================================================================================
204 void BasicGUI_CircleDlg::SetDoubleSpinBoxStep( double step )
206 GroupPntVecR->SpinBox_DX->setSingleStep(step);
209 //=================================================================================
210 // function : ConstructorsClicked()
211 // purpose : Radio button management
212 //=================================================================================
213 void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
215 disconnect( myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
226 switch ( constructorId ) {
230 GroupCenter2Pnts->hide();
231 GroupPntVecR->show();
233 myEditCurrentArgument = GroupPntVecR->LineEdit1;
234 GroupPntVecR->LineEdit1->setText( "" );
235 GroupPntVecR->LineEdit2->setText( "" );
236 GroupPntVecR->PushButton1->setDown( true );
237 GroupPntVecR->PushButton2->setDown( false );
238 GroupPntVecR->LineEdit1->setEnabled( true );
239 GroupPntVecR->LineEdit2->setEnabled( false );
244 GroupPntVecR->hide();
245 GroupCenter2Pnts->hide();
248 myEditCurrentArgument = Group3Pnts->LineEdit1;
249 Group3Pnts->LineEdit1->setText( "" );
250 Group3Pnts->LineEdit2->setText( "" );
251 Group3Pnts->LineEdit3->setText( "" );
252 Group3Pnts->PushButton1->setDown( true );
253 Group3Pnts->PushButton2->setDown( false );
254 Group3Pnts->PushButton3->setDown( false );
255 Group3Pnts->LineEdit1->setEnabled( true );
256 Group3Pnts->LineEdit2->setEnabled( false );
257 Group3Pnts->LineEdit3->setEnabled( false );
262 GroupPntVecR->hide();
264 GroupCenter2Pnts->show();
266 myEditCurrentArgument = GroupCenter2Pnts->LineEdit1;
267 GroupCenter2Pnts->LineEdit1->setText( "" );
268 GroupCenter2Pnts->LineEdit2->setText( "" );
269 GroupCenter2Pnts->LineEdit3->setText( "" );
270 GroupCenter2Pnts->PushButton1->setDown( true );
271 GroupCenter2Pnts->PushButton2->setDown( false );
272 GroupCenter2Pnts->PushButton3->setDown( false );
273 GroupCenter2Pnts->LineEdit1->setEnabled( true );
274 GroupCenter2Pnts->LineEdit2->setEnabled( false );
275 GroupCenter2Pnts->LineEdit3->setEnabled( false );
280 qApp->processEvents();
282 resize( minimumSizeHint() );
283 SelectionIntoArgument();
285 myEditCurrentArgument->setFocus();
286 globalSelection(); // close local contexts, if any
287 localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
289 connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged() ),
290 this, SLOT( SelectionIntoArgument() ) );
292 displayPreview(true);
295 //=================================================================================
296 // function : ClickOnOk()
298 //=================================================================================
299 void BasicGUI_CircleDlg::ClickOnOk()
301 setIsApplyAndClose( true );
302 if ( ClickOnApply() )
306 //=================================================================================
307 // function : ClickOnApply()
309 //=================================================================================
310 bool BasicGUI_CircleDlg::ClickOnApply()
316 ConstructorsClicked( getConstructorId() );
320 //=================================================================================
321 // function : SelectionIntoArgument()
322 // purpose : Called when selection as changed or other case
323 //=================================================================================
324 void BasicGUI_CircleDlg::SelectionIntoArgument()
326 myEditCurrentArgument->setText( "" );
328 LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
330 aSelMgr->selectedObjects( aList );
332 if ( aList.Extent() != 1 ) {
333 if ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) myPoint.nullify();
334 else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) myDir.nullify();
335 else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1.nullify();
336 else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2.nullify();
337 else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3.nullify();
338 else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit1 ) myPoint4.nullify();
339 else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit2 ) myPoint5.nullify();
340 else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit3 ) myPoint6.nullify();
344 TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) ?
345 TopAbs_EDGE : TopAbs_VERTEX;
346 GEOM::GeomObjPtr aSelectedObject = getSelected( aNeedType );
348 if ( aSelectedObject && GEOMBase::GetShape( aSelectedObject.get(), aShape ) && !aShape.IsNull() ) {
349 QString aName = GEOMBase::GetName( aSelectedObject.get() );
351 myEditCurrentArgument->setText( aName );
353 if ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) {
354 myPoint = aSelectedObject;
355 if ( myPoint && !myDir )
356 GroupPntVecR->PushButton2->click();
358 else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) {
359 myDir = aSelectedObject;
360 if ( myDir && !myPoint )
361 GroupPntVecR->PushButton1->click();
363 else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) {
364 myPoint1 = aSelectedObject;
365 if ( myPoint1 && !myPoint2 )
366 Group3Pnts->PushButton2->click();
368 else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) {
369 myPoint2 = aSelectedObject;
370 if ( myPoint2 && !myPoint3 )
371 Group3Pnts->PushButton3->click();
373 else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) {
374 myPoint3 = aSelectedObject;
375 if ( myPoint3 && !myPoint1 )
376 Group3Pnts->PushButton1->click();
378 else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit1 ) {
379 myPoint4 = aSelectedObject;
380 if ( myPoint4 && !myPoint5 )
381 GroupCenter2Pnts->PushButton2->click();
383 else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit2 ) {
384 myPoint5 = aSelectedObject;
385 if ( myPoint5 && !myPoint6 )
386 GroupCenter2Pnts->PushButton3->click();
388 else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit3 ) {
389 myPoint6 = aSelectedObject;
390 if ( myPoint6 && !myPoint4 )
391 GroupCenter2Pnts->PushButton1->click();
395 displayPreview(true);
399 //=================================================================================
400 // function : SetEditCurrentArgument()
402 //=================================================================================
403 void BasicGUI_CircleDlg::SetEditCurrentArgument()
405 QPushButton* send = (QPushButton*)sender();
407 if ( send == GroupPntVecR->PushButton1 ) {
408 myEditCurrentArgument = GroupPntVecR->LineEdit1;
409 GroupPntVecR->PushButton2->setDown(false);
410 GroupPntVecR->LineEdit1->setEnabled( true );
411 GroupPntVecR->LineEdit2->setEnabled( false );
413 else if ( send == GroupPntVecR->PushButton2 ) {
414 myEditCurrentArgument = GroupPntVecR->LineEdit2;
415 GroupPntVecR->PushButton1->setDown(false);
416 GroupPntVecR->LineEdit1->setEnabled( false );
417 GroupPntVecR->LineEdit2->setEnabled( true );
419 else if ( send == Group3Pnts->PushButton1 ) {
420 myEditCurrentArgument = Group3Pnts->LineEdit1;
421 Group3Pnts->PushButton2->setDown( false );
422 Group3Pnts->PushButton3->setDown( false );
423 Group3Pnts->LineEdit1->setEnabled( true );
424 Group3Pnts->LineEdit2->setEnabled( false );
425 Group3Pnts->LineEdit3->setEnabled( false );
427 else if ( send == Group3Pnts->PushButton2 ) {
428 myEditCurrentArgument = Group3Pnts->LineEdit2;
429 Group3Pnts->PushButton1->setDown( false );
430 Group3Pnts->PushButton3->setDown( false );
431 Group3Pnts->LineEdit1->setEnabled( false );
432 Group3Pnts->LineEdit2->setEnabled( true );
433 Group3Pnts->LineEdit3->setEnabled( false );
435 else if ( send == Group3Pnts->PushButton3 ) {
436 myEditCurrentArgument = Group3Pnts->LineEdit3;
437 Group3Pnts->PushButton1->setDown( false );
438 Group3Pnts->PushButton2->setDown( false );
439 Group3Pnts->LineEdit1->setEnabled( false );
440 Group3Pnts->LineEdit2->setEnabled( false );
441 Group3Pnts->LineEdit3->setEnabled( true );
443 else if ( send == GroupCenter2Pnts->PushButton1 ) {
444 myEditCurrentArgument = GroupCenter2Pnts->LineEdit1;
445 GroupCenter2Pnts->PushButton2->setDown( false );
446 GroupCenter2Pnts->PushButton3->setDown( false );
447 GroupCenter2Pnts->LineEdit1->setEnabled( true );
448 GroupCenter2Pnts->LineEdit2->setEnabled( false );
449 GroupCenter2Pnts->LineEdit3->setEnabled( false );
451 else if ( send == GroupCenter2Pnts->PushButton2 ) {
452 myEditCurrentArgument = GroupCenter2Pnts->LineEdit2;
453 GroupCenter2Pnts->PushButton1->setDown( false );
454 GroupCenter2Pnts->PushButton3->setDown( false );
455 GroupCenter2Pnts->LineEdit1->setEnabled( false );
456 GroupCenter2Pnts->LineEdit2->setEnabled( true );
457 GroupCenter2Pnts->LineEdit3->setEnabled( false );
460 else if ( send == GroupCenter2Pnts->PushButton3 ) {
461 myEditCurrentArgument = GroupCenter2Pnts->LineEdit3;
462 GroupCenter2Pnts->PushButton1->setDown( false );
463 GroupCenter2Pnts->PushButton2->setDown( false );
464 GroupCenter2Pnts->LineEdit1->setEnabled( false );
465 GroupCenter2Pnts->LineEdit2->setEnabled( false );
466 GroupCenter2Pnts->LineEdit3->setEnabled( true );
470 myEditCurrentArgument->setFocus();
472 TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) ?
473 TopAbs_EDGE : TopAbs_VERTEX;
474 globalSelection(); // close local contexts, if any
475 localSelection( GEOM::GEOM_Object::_nil(), aNeedType );
477 myEditCurrentArgument->setFocus();
478 // SelectionIntoArgument();
480 displayPreview(true);
484 //=================================================================================
485 // function : ActivateThisDialog()
487 //=================================================================================
488 void BasicGUI_CircleDlg::ActivateThisDialog()
490 GEOMBase_Skeleton::ActivateThisDialog();
492 connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
493 this, SLOT( SelectionIntoArgument() ) );
495 ConstructorsClicked( getConstructorId() );
499 //=================================================================================
500 // function : enterEvent()
502 //=================================================================================
503 void BasicGUI_CircleDlg::enterEvent( QEvent* )
505 if ( !mainFrame()->GroupConstructors->isEnabled() )
506 ActivateThisDialog();
509 //=================================================================================
510 // function : DeactivateActiveDialog()
511 // purpose : public slot to deactivate if active
512 //=================================================================================
513 void BasicGUI_CircleDlg::DeactivateActiveDialog()
515 GEOMBase_Skeleton::DeactivateActiveDialog();
518 //=================================================================================
519 // function : ValueChangedInSpinBox()
521 //=================================================================================
522 void BasicGUI_CircleDlg::ValueChangedInSpinBox()
524 displayPreview(true);
527 //=================================================================================
528 // function : getRadius()
530 //=================================================================================
531 double BasicGUI_CircleDlg::getRadius() const
534 switch ( getConstructorId() ) {
536 r = GroupPntVecR->SpinBox_DX->value(); break;
541 //=================================================================================
542 // function : createOperation
544 //=================================================================================
545 GEOM::GEOM_IOperations_ptr BasicGUI_CircleDlg::createOperation()
547 return myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
550 //=================================================================================
551 // function : isValid
553 //=================================================================================
554 bool BasicGUI_CircleDlg::isValid( QString& msg )
557 switch( getConstructorId() ) {
559 // nil point means origin of global CS
560 // nil vector means Z axis
561 ok = GroupPntVecR->SpinBox_DX->isValid(msg, !IsPreview()) && getRadius() > 0;
564 ok = myPoint1 && myPoint2 && myPoint3 && myPoint1 != myPoint2 &&
565 myPoint1 != myPoint3 && myPoint2 != myPoint3;
568 ok = myPoint4 && myPoint5 && myPoint6 && myPoint4 != myPoint5 &&
569 myPoint5 != myPoint6 && myPoint4 != myPoint6;
577 //=================================================================================
578 // function : execute
580 //=================================================================================
581 bool BasicGUI_CircleDlg::execute( ObjectList& objects )
585 GEOM::GEOM_Object_var anObj;
587 GEOM::GEOM_ICurvesOperations_var anOper = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() );
589 switch ( getConstructorId() ) {
592 QStringList aParameters;
593 aParameters << GroupPntVecR->SpinBox_DX->text();
594 anObj = anOper->MakeCirclePntVecR( myPoint.get(), myDir.get(), getRadius() );
595 if ( !anObj->_is_nil() && !IsPreview() )
596 anObj->SetParameters(aParameters.join(":").toLatin1().constData());
601 anObj = anOper->MakeCircleThreePnt( myPoint1.get(), myPoint2.get(), myPoint3.get() );
605 anObj = anOper->MakeCircleCenter2Pnt( myPoint4.get(), myPoint5.get(), myPoint6.get() );
610 if ( !anObj->_is_nil() )
611 objects.push_back( anObj._retn() );
613 MESSAGE( "Execute Object is NULL!" );
619 //=================================================================================
620 // function : addSubshapeToStudy
621 // purpose : virtual method to add new SubObjects if local selection
622 //=================================================================================
623 void BasicGUI_CircleDlg::addSubshapesToStudy()
625 switch ( getConstructorId() ) {
627 GEOMBase::PublishSubObject( myPoint.get() );
628 GEOMBase::PublishSubObject( myDir.get() );
631 GEOMBase::PublishSubObject( myPoint1.get() );
632 GEOMBase::PublishSubObject( myPoint2.get() );
633 GEOMBase::PublishSubObject( myPoint3.get() );
636 GEOMBase::PublishSubObject( myPoint4.get() );
637 GEOMBase::PublishSubObject( myPoint5.get() );
638 GEOMBase::PublishSubObject( myPoint6.get() );