1 // Copyright (C) 2007-2014 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, or (at your option) any later version.
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 <TopTools_IndexedMapOfShape.hxx>
40 #include <TopoDS_Shape.hxx>
41 #include <TopoDS_Edge.hxx>
45 //=================================================================================
46 // class : BasicGUI_CircleDlg()
47 // purpose : Constructs a BasicGUI_CircleDlg 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 BasicGUI_CircleDlg::BasicGUI_CircleDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
53 bool modal, Qt::WindowFlags fl )
54 : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
56 QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_CIRCLE_PV" ) ) );
57 QPixmap image2( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_CIRCLE_PNTS" ) ) );
58 QPixmap image3( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_CIRCLE_C2P" ) ) );
59 QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
61 setWindowTitle( tr( "GEOM_CIRCLE_TITLE" ) );
63 /***************************************************************/
64 mainFrame()->GroupConstructors->setTitle( tr( "GEOM_CIRCLE" ) );
65 mainFrame()->RadioButton1->setIcon( image0 );
66 mainFrame()->RadioButton2->setIcon( image2 );
67 mainFrame()->RadioButton3->setIcon( image3 );
69 GroupPntVecR = new DlgRef_2Sel1Spin( centralWidget() );
70 GroupPntVecR->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
72 GroupPntVecR->TextLabel1->setText( tr( "GEOM_CENTER_POINT" ) + " " + tr( "GEOM_CENTER_DEFAULT" ) );
73 GroupPntVecR->TextLabel2->setText( tr( "GEOM_VECTOR" ) + " " + tr( "GEOM_AXIS_DEFAULT" ) );
74 GroupPntVecR->TextLabel3->setText( tr( "GEOM_RADIUS" ) );
75 GroupPntVecR->PushButton1->setIcon( image1 );
76 GroupPntVecR->PushButton2->setIcon( image1 );
77 GroupPntVecR->PushButton1->setDown( true );
79 GroupPntVecR->LineEdit1->setReadOnly( true );
80 GroupPntVecR->LineEdit2->setReadOnly( true );
82 GroupPntVecR->LineEdit1->setEnabled( true );
83 GroupPntVecR->LineEdit2->setEnabled( false );
85 Group3Pnts = new DlgRef_3Sel( centralWidget() );
87 Group3Pnts->GroupBox1->setTitle( tr( "GEOM_3_POINTS" ) );
88 Group3Pnts->TextLabel1->setText( tr( "GEOM_POINT1" ) );
89 Group3Pnts->TextLabel2->setText( tr( "GEOM_POINT2" ) );
90 Group3Pnts->TextLabel3->setText( tr( "GEOM_POINT3" ) );
91 Group3Pnts->PushButton1->setIcon( image1 );
92 Group3Pnts->PushButton2->setIcon( image1 );
93 Group3Pnts->PushButton3->setIcon( image1 );
94 Group3Pnts->PushButton1->setDown( true );
96 Group3Pnts->LineEdit1->setReadOnly( true );
97 Group3Pnts->LineEdit2->setReadOnly( true );
98 Group3Pnts->LineEdit3->setReadOnly( true );
99 Group3Pnts->LineEdit1->setEnabled( true );
100 Group3Pnts->LineEdit2->setEnabled( false );
101 Group3Pnts->LineEdit3->setEnabled( false );
103 GroupCenter2Pnts = new DlgRef_3Sel( centralWidget() );
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->setIcon( image1 );
109 GroupCenter2Pnts->PushButton2->setIcon( image1 );
110 GroupCenter2Pnts->PushButton3->setIcon( image1 );
111 GroupCenter2Pnts->PushButton1->setDown( true );
113 GroupCenter2Pnts->LineEdit1->setReadOnly( true );
114 GroupCenter2Pnts->LineEdit2->setReadOnly( true );
115 GroupCenter2Pnts->LineEdit3->setReadOnly( true );
117 GroupCenter2Pnts->LineEdit1->setEnabled( true );
118 GroupCenter2Pnts->LineEdit2->setEnabled( false );
119 GroupCenter2Pnts->LineEdit3->setEnabled( false );
121 QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
122 layout->setMargin( 0 ); layout->setSpacing( 6 );
123 layout->addWidget( GroupPntVecR );
124 layout->addWidget( Group3Pnts );
125 layout->addWidget( GroupCenter2Pnts );
126 /***************************************************************/
128 setHelpFileName( "create_circle_page.html" );
134 //=================================================================================
135 // function : ~BasicGUI_CircleDlg()
136 // purpose : Destroys the object and frees any allocated resources
137 //=================================================================================
138 BasicGUI_CircleDlg::~BasicGUI_CircleDlg()
143 //=================================================================================
146 //=================================================================================
147 void BasicGUI_CircleDlg::Init()
150 myEditCurrentArgument = GroupPntVecR->LineEdit1;
161 /* Get setting of step value from file configuration */
162 SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
163 double aStep = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
165 /* min, max, step and decimals for spin boxes & initial values */
166 initSpinBox( GroupPntVecR->SpinBox_DX, 0.000001, COORD_MAX, aStep, "length_precision" );
167 GroupPntVecR->SpinBox_DX->setValue( 100 );
169 /* signals and slots connections */
170 connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
171 connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
173 connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
174 connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
176 connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
178 connect( GroupPntVecR->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
179 connect( GroupPntVecR->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
180 connect( Group3Pnts->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
181 connect( Group3Pnts->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
182 connect( Group3Pnts->PushButton3, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
184 connect( GroupCenter2Pnts->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
185 connect( GroupCenter2Pnts->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
186 connect( GroupCenter2Pnts->PushButton3, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
188 connect( GroupPntVecR->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT(ValueChangedInSpinBox() ) );
189 connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) );
191 connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
192 this, SLOT( SelectionIntoArgument() ) );
194 initName( tr( "GEOM_CIRCLE" ) );
196 ConstructorsClicked( 0 );
199 //=================================================================================
200 // function : SetDoubleSpinBoxStep()
201 // purpose : Double spin box management
202 //=================================================================================
203 void BasicGUI_CircleDlg::SetDoubleSpinBoxStep( double step )
205 GroupPntVecR->SpinBox_DX->setSingleStep(step);
208 //=================================================================================
209 // function : ConstructorsClicked()
210 // purpose : Radio button management
211 //=================================================================================
212 void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
214 disconnect( myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
225 switch ( constructorId ) {
229 GroupCenter2Pnts->hide();
230 GroupPntVecR->show();
232 myEditCurrentArgument = GroupPntVecR->LineEdit1;
233 GroupPntVecR->LineEdit1->setText( "" );
234 GroupPntVecR->LineEdit2->setText( "" );
235 GroupPntVecR->PushButton1->setDown( true );
236 GroupPntVecR->PushButton2->setDown( false );
237 GroupPntVecR->LineEdit1->setEnabled( true );
238 GroupPntVecR->LineEdit2->setEnabled( false );
243 GroupPntVecR->hide();
244 GroupCenter2Pnts->hide();
247 myEditCurrentArgument = Group3Pnts->LineEdit1;
248 Group3Pnts->LineEdit1->setText( "" );
249 Group3Pnts->LineEdit2->setText( "" );
250 Group3Pnts->LineEdit3->setText( "" );
251 Group3Pnts->PushButton1->setDown( true );
252 Group3Pnts->PushButton2->setDown( false );
253 Group3Pnts->PushButton3->setDown( false );
254 Group3Pnts->LineEdit1->setEnabled( true );
255 Group3Pnts->LineEdit2->setEnabled( false );
256 Group3Pnts->LineEdit3->setEnabled( false );
261 GroupPntVecR->hide();
263 GroupCenter2Pnts->show();
265 myEditCurrentArgument = GroupCenter2Pnts->LineEdit1;
266 GroupCenter2Pnts->LineEdit1->setText( "" );
267 GroupCenter2Pnts->LineEdit2->setText( "" );
268 GroupCenter2Pnts->LineEdit3->setText( "" );
269 GroupCenter2Pnts->PushButton1->setDown( true );
270 GroupCenter2Pnts->PushButton2->setDown( false );
271 GroupCenter2Pnts->PushButton3->setDown( false );
272 GroupCenter2Pnts->LineEdit1->setEnabled( true );
273 GroupCenter2Pnts->LineEdit2->setEnabled( false );
274 GroupCenter2Pnts->LineEdit3->setEnabled( false );
279 qApp->processEvents();
281 resize( minimumSizeHint() );
283 myEditCurrentArgument->setFocus();
284 globalSelection(); // close local contexts, if any
285 localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
287 connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged() ),
288 this, SLOT( SelectionIntoArgument() ) );
290 SelectionIntoArgument();
293 //=================================================================================
294 // function : ClickOnOk()
296 //=================================================================================
297 void BasicGUI_CircleDlg::ClickOnOk()
299 setIsApplyAndClose( true );
300 if ( ClickOnApply() )
304 //=================================================================================
305 // function : ClickOnApply()
307 //=================================================================================
308 bool BasicGUI_CircleDlg::ClickOnApply()
314 ConstructorsClicked( getConstructorId() );
318 //=================================================================================
319 // function : SelectionIntoArgument()
320 // purpose : Called when selection as changed or other case
321 //=================================================================================
322 void BasicGUI_CircleDlg::SelectionIntoArgument()
324 myEditCurrentArgument->setText( "" );
326 LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
328 aSelMgr->selectedObjects( aList );
330 if ( aList.Extent() != 1 ) {
331 if ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) myPoint.nullify();
332 else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) myDir.nullify();
333 else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1.nullify();
334 else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2.nullify();
335 else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3.nullify();
336 else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit1 ) myPoint4.nullify();
337 else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit2 ) myPoint5.nullify();
338 else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit3 ) myPoint6.nullify();
342 TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) ?
343 TopAbs_EDGE : TopAbs_VERTEX;
344 GEOM::GeomObjPtr aSelectedObject = getSelected( aNeedType );
346 if ( aSelectedObject && GEOMBase::GetShape( aSelectedObject.get(), aShape ) && !aShape.IsNull() ) {
347 QString aName = GEOMBase::GetName( aSelectedObject.get() );
349 myEditCurrentArgument->setText( aName );
351 if ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) {
352 myPoint = aSelectedObject;
353 if ( myPoint && !myDir )
354 GroupPntVecR->PushButton2->click();
356 else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) {
357 myDir = aSelectedObject;
358 if ( myDir && !myPoint )
359 GroupPntVecR->PushButton1->click();
361 else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) {
362 myPoint1 = aSelectedObject;
363 if ( myPoint1 && !myPoint2 )
364 Group3Pnts->PushButton2->click();
366 else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) {
367 myPoint2 = aSelectedObject;
368 if ( myPoint2 && !myPoint3 )
369 Group3Pnts->PushButton3->click();
371 else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) {
372 myPoint3 = aSelectedObject;
373 if ( myPoint3 && !myPoint1 )
374 Group3Pnts->PushButton1->click();
376 else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit1 ) {
377 myPoint4 = aSelectedObject;
378 if ( myPoint4 && !myPoint5 )
379 GroupCenter2Pnts->PushButton2->click();
381 else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit2 ) {
382 myPoint5 = aSelectedObject;
383 if ( myPoint5 && !myPoint6 )
384 GroupCenter2Pnts->PushButton3->click();
386 else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit3 ) {
387 myPoint6 = aSelectedObject;
388 if ( myPoint6 && !myPoint4 )
389 GroupCenter2Pnts->PushButton1->click();
393 displayPreview(true);
397 //=================================================================================
398 // function : SetEditCurrentArgument()
400 //=================================================================================
401 void BasicGUI_CircleDlg::SetEditCurrentArgument()
403 QPushButton* send = (QPushButton*)sender();
405 if ( send == GroupPntVecR->PushButton1 ) {
406 myEditCurrentArgument = GroupPntVecR->LineEdit1;
407 GroupPntVecR->PushButton2->setDown(false);
408 GroupPntVecR->LineEdit1->setEnabled( true );
409 GroupPntVecR->LineEdit2->setEnabled( false );
411 else if ( send == GroupPntVecR->PushButton2 ) {
412 myEditCurrentArgument = GroupPntVecR->LineEdit2;
413 GroupPntVecR->PushButton1->setDown(false);
414 GroupPntVecR->LineEdit1->setEnabled( false );
415 GroupPntVecR->LineEdit2->setEnabled( true );
417 else if ( send == Group3Pnts->PushButton1 ) {
418 myEditCurrentArgument = Group3Pnts->LineEdit1;
419 Group3Pnts->PushButton2->setDown( false );
420 Group3Pnts->PushButton3->setDown( false );
421 Group3Pnts->LineEdit1->setEnabled( true );
422 Group3Pnts->LineEdit2->setEnabled( false );
423 Group3Pnts->LineEdit3->setEnabled( false );
425 else if ( send == Group3Pnts->PushButton2 ) {
426 myEditCurrentArgument = Group3Pnts->LineEdit2;
427 Group3Pnts->PushButton1->setDown( false );
428 Group3Pnts->PushButton3->setDown( false );
429 Group3Pnts->LineEdit1->setEnabled( false );
430 Group3Pnts->LineEdit2->setEnabled( true );
431 Group3Pnts->LineEdit3->setEnabled( false );
433 else if ( send == Group3Pnts->PushButton3 ) {
434 myEditCurrentArgument = Group3Pnts->LineEdit3;
435 Group3Pnts->PushButton1->setDown( false );
436 Group3Pnts->PushButton2->setDown( false );
437 Group3Pnts->LineEdit1->setEnabled( false );
438 Group3Pnts->LineEdit2->setEnabled( false );
439 Group3Pnts->LineEdit3->setEnabled( true );
441 else if ( send == GroupCenter2Pnts->PushButton1 ) {
442 myEditCurrentArgument = GroupCenter2Pnts->LineEdit1;
443 GroupCenter2Pnts->PushButton2->setDown( false );
444 GroupCenter2Pnts->PushButton3->setDown( false );
445 GroupCenter2Pnts->LineEdit1->setEnabled( true );
446 GroupCenter2Pnts->LineEdit2->setEnabled( false );
447 GroupCenter2Pnts->LineEdit3->setEnabled( false );
449 else if ( send == GroupCenter2Pnts->PushButton2 ) {
450 myEditCurrentArgument = GroupCenter2Pnts->LineEdit2;
451 GroupCenter2Pnts->PushButton1->setDown( false );
452 GroupCenter2Pnts->PushButton3->setDown( false );
453 GroupCenter2Pnts->LineEdit1->setEnabled( false );
454 GroupCenter2Pnts->LineEdit2->setEnabled( true );
455 GroupCenter2Pnts->LineEdit3->setEnabled( false );
458 else if ( send == GroupCenter2Pnts->PushButton3 ) {
459 myEditCurrentArgument = GroupCenter2Pnts->LineEdit3;
460 GroupCenter2Pnts->PushButton1->setDown( false );
461 GroupCenter2Pnts->PushButton2->setDown( false );
462 GroupCenter2Pnts->LineEdit1->setEnabled( false );
463 GroupCenter2Pnts->LineEdit2->setEnabled( false );
464 GroupCenter2Pnts->LineEdit3->setEnabled( true );
468 myEditCurrentArgument->setFocus();
470 TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) ?
471 TopAbs_EDGE : TopAbs_VERTEX;
472 globalSelection(); // close local contexts, if any
473 localSelection( GEOM::GEOM_Object::_nil(), aNeedType );
475 myEditCurrentArgument->setFocus();
476 // SelectionIntoArgument();
478 displayPreview(true);
482 //=================================================================================
483 // function : ActivateThisDialog()
485 //=================================================================================
486 void BasicGUI_CircleDlg::ActivateThisDialog()
488 GEOMBase_Skeleton::ActivateThisDialog();
490 connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
491 this, SLOT( SelectionIntoArgument() ) );
493 ConstructorsClicked( getConstructorId() );
497 //=================================================================================
498 // function : enterEvent()
500 //=================================================================================
501 void BasicGUI_CircleDlg::enterEvent( QEvent* )
503 if ( !mainFrame()->GroupConstructors->isEnabled() )
504 ActivateThisDialog();
507 //=================================================================================
508 // function : DeactivateActiveDialog()
509 // purpose : public slot to deactivate if active
510 //=================================================================================
511 void BasicGUI_CircleDlg::DeactivateActiveDialog()
513 GEOMBase_Skeleton::DeactivateActiveDialog();
516 //=================================================================================
517 // function : ValueChangedInSpinBox()
519 //=================================================================================
520 void BasicGUI_CircleDlg::ValueChangedInSpinBox()
522 displayPreview(true);
525 //=================================================================================
526 // function : getRadius()
528 //=================================================================================
529 double BasicGUI_CircleDlg::getRadius() const
532 switch ( getConstructorId() ) {
534 r = GroupPntVecR->SpinBox_DX->value(); break;
539 //=================================================================================
540 // function : createOperation
542 //=================================================================================
543 GEOM::GEOM_IOperations_ptr BasicGUI_CircleDlg::createOperation()
545 return myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
548 //=================================================================================
549 // function : isValid
551 //=================================================================================
552 bool BasicGUI_CircleDlg::isValid( QString& msg )
555 switch( getConstructorId() ) {
557 // nil point means origin of global CS
558 // nil vector means Z axis
559 ok = GroupPntVecR->SpinBox_DX->isValid(msg, !IsPreview()) && getRadius() > 0;
562 ok = myPoint1 && myPoint2 && myPoint3 && myPoint1 != myPoint2 &&
563 myPoint1 != myPoint3 && myPoint2 != myPoint3;
566 ok = myPoint4 && myPoint5 && myPoint6 && myPoint4 != myPoint5 &&
567 myPoint5 != myPoint6 && myPoint4 != myPoint6;
575 //=================================================================================
576 // function : execute
578 //=================================================================================
579 bool BasicGUI_CircleDlg::execute( ObjectList& objects )
583 GEOM::GEOM_Object_var anObj;
585 GEOM::GEOM_ICurvesOperations_var anOper = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() );
587 switch ( getConstructorId() ) {
590 QStringList aParameters;
591 aParameters << GroupPntVecR->SpinBox_DX->text();
592 anObj = anOper->MakeCirclePntVecR( myPoint.get(), myDir.get(), getRadius() );
593 if ( !anObj->_is_nil() && !IsPreview() )
594 anObj->SetParameters(aParameters.join(":").toLatin1().constData());
599 anObj = anOper->MakeCircleThreePnt( myPoint1.get(), myPoint2.get(), myPoint3.get() );
603 anObj = anOper->MakeCircleCenter2Pnt( myPoint4.get(), myPoint5.get(), myPoint6.get() );
608 if ( !anObj->_is_nil() )
609 objects.push_back( anObj._retn() );
611 MESSAGE( "Execute Object is NULL!" );
617 //=================================================================================
618 // function : addSubshapeToStudy
619 // purpose : virtual method to add new SubObjects if local selection
620 //=================================================================================
621 void BasicGUI_CircleDlg::addSubshapesToStudy()
623 switch ( getConstructorId() ) {
625 GEOMBase::PublishSubObject( myPoint.get() );
626 GEOMBase::PublishSubObject( myDir.get() );
629 GEOMBase::PublishSubObject( myPoint1.get() );
630 GEOMBase::PublishSubObject( myPoint2.get() );
631 GEOMBase::PublishSubObject( myPoint3.get() );
634 GEOMBase::PublishSubObject( myPoint4.get() );
635 GEOMBase::PublishSubObject( myPoint5.get() );
636 GEOMBase::PublishSubObject( myPoint6.get() );