1 // Copyright (C) 2007-2010 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 if ( ClickOnApply() )
305 //=================================================================================
306 // function : ClickOnApply()
308 //=================================================================================
309 bool BasicGUI_CircleDlg::ClickOnApply()
315 ConstructorsClicked( getConstructorId() );
319 //=================================================================================
320 // function : SelectionIntoArgument()
321 // purpose : Called when selection as changed or other case
322 //=================================================================================
323 void BasicGUI_CircleDlg::SelectionIntoArgument()
325 myEditCurrentArgument->setText( "" );
327 LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
329 aSelMgr->selectedObjects( aList );
331 if ( aList.Extent() != 1 ) {
332 if ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) myPoint.nullify();
333 else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) myDir.nullify();
334 else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1.nullify();
335 else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2.nullify();
336 else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3.nullify();
337 else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit1 ) myPoint4.nullify();
338 else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit2 ) myPoint5.nullify();
339 else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit3 ) myPoint6.nullify();
343 TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) ?
344 TopAbs_EDGE : TopAbs_VERTEX;
345 GEOM::GeomObjPtr aSelectedObject = getSelected( aNeedType );
347 if ( aSelectedObject && GEOMBase::GetShape( aSelectedObject.get(), aShape ) && !aShape.IsNull() ) {
348 QString aName = GEOMBase::GetName( aSelectedObject.get() );
350 myEditCurrentArgument->setText( aName );
352 if ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) {
353 myPoint = aSelectedObject;
354 if ( myPoint && !myDir )
355 GroupPntVecR->PushButton2->click();
357 else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) {
358 myDir = aSelectedObject;
359 if ( myDir && !myPoint )
360 GroupPntVecR->PushButton1->click();
362 else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) {
363 myPoint1 = aSelectedObject;
364 if ( myPoint1 && !myPoint2 )
365 Group3Pnts->PushButton2->click();
367 else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) {
368 myPoint2 = aSelectedObject;
369 if ( myPoint2 && !myPoint3 )
370 Group3Pnts->PushButton3->click();
372 else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) {
373 myPoint3 = aSelectedObject;
374 if ( myPoint3 && !myPoint1 )
375 Group3Pnts->PushButton1->click();
377 else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit1 ) {
378 myPoint4 = aSelectedObject;
379 if ( myPoint4 && !myPoint5 )
380 GroupCenter2Pnts->PushButton2->click();
382 else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit2 ) {
383 myPoint5 = aSelectedObject;
384 if ( myPoint5 && !myPoint6 )
385 GroupCenter2Pnts->PushButton3->click();
387 else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit3 ) {
388 myPoint6 = aSelectedObject;
389 if ( myPoint6 && !myPoint4 )
390 GroupCenter2Pnts->PushButton1->click();
394 displayPreview(true);
398 //=================================================================================
399 // function : SetEditCurrentArgument()
401 //=================================================================================
402 void BasicGUI_CircleDlg::SetEditCurrentArgument()
404 QPushButton* send = (QPushButton*)sender();
406 if ( send == GroupPntVecR->PushButton1 ) {
407 myEditCurrentArgument = GroupPntVecR->LineEdit1;
408 GroupPntVecR->PushButton2->setDown(false);
409 GroupPntVecR->LineEdit1->setEnabled( true );
410 GroupPntVecR->LineEdit2->setEnabled( false );
412 else if ( send == GroupPntVecR->PushButton2 ) {
413 myEditCurrentArgument = GroupPntVecR->LineEdit2;
414 GroupPntVecR->PushButton1->setDown(false);
415 GroupPntVecR->LineEdit1->setEnabled( false );
416 GroupPntVecR->LineEdit2->setEnabled( true );
418 else if ( send == Group3Pnts->PushButton1 ) {
419 myEditCurrentArgument = Group3Pnts->LineEdit1;
420 Group3Pnts->PushButton2->setDown( false );
421 Group3Pnts->PushButton3->setDown( false );
422 Group3Pnts->LineEdit1->setEnabled( true );
423 Group3Pnts->LineEdit2->setEnabled( false );
424 Group3Pnts->LineEdit3->setEnabled( false );
426 else if ( send == Group3Pnts->PushButton2 ) {
427 myEditCurrentArgument = Group3Pnts->LineEdit2;
428 Group3Pnts->PushButton1->setDown( false );
429 Group3Pnts->PushButton3->setDown( false );
430 Group3Pnts->LineEdit1->setEnabled( false );
431 Group3Pnts->LineEdit2->setEnabled( true );
432 Group3Pnts->LineEdit3->setEnabled( false );
434 else if ( send == Group3Pnts->PushButton3 ) {
435 myEditCurrentArgument = Group3Pnts->LineEdit3;
436 Group3Pnts->PushButton1->setDown( false );
437 Group3Pnts->PushButton2->setDown( false );
438 Group3Pnts->LineEdit1->setEnabled( false );
439 Group3Pnts->LineEdit2->setEnabled( false );
440 Group3Pnts->LineEdit3->setEnabled( true );
442 else if ( send == GroupCenter2Pnts->PushButton1 ) {
443 myEditCurrentArgument = GroupCenter2Pnts->LineEdit1;
444 GroupCenter2Pnts->PushButton2->setDown( false );
445 GroupCenter2Pnts->PushButton3->setDown( false );
446 GroupCenter2Pnts->LineEdit1->setEnabled( true );
447 GroupCenter2Pnts->LineEdit2->setEnabled( false );
448 GroupCenter2Pnts->LineEdit3->setEnabled( false );
450 else if ( send == GroupCenter2Pnts->PushButton2 ) {
451 myEditCurrentArgument = GroupCenter2Pnts->LineEdit2;
452 GroupCenter2Pnts->PushButton1->setDown( false );
453 GroupCenter2Pnts->PushButton3->setDown( false );
454 GroupCenter2Pnts->LineEdit1->setEnabled( false );
455 GroupCenter2Pnts->LineEdit2->setEnabled( true );
456 GroupCenter2Pnts->LineEdit3->setEnabled( false );
459 else if ( send == GroupCenter2Pnts->PushButton3 ) {
460 myEditCurrentArgument = GroupCenter2Pnts->LineEdit3;
461 GroupCenter2Pnts->PushButton1->setDown( false );
462 GroupCenter2Pnts->PushButton2->setDown( false );
463 GroupCenter2Pnts->LineEdit1->setEnabled( false );
464 GroupCenter2Pnts->LineEdit2->setEnabled( false );
465 GroupCenter2Pnts->LineEdit3->setEnabled( true );
469 myEditCurrentArgument->setFocus();
471 TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) ?
472 TopAbs_EDGE : TopAbs_VERTEX;
473 globalSelection(); // close local contexts, if any
474 localSelection( GEOM::GEOM_Object::_nil(), aNeedType );
476 myEditCurrentArgument->setFocus();
477 // SelectionIntoArgument();
479 displayPreview(true);
483 //=================================================================================
484 // function : ActivateThisDialog()
486 //=================================================================================
487 void BasicGUI_CircleDlg::ActivateThisDialog()
489 GEOMBase_Skeleton::ActivateThisDialog();
491 connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
492 this, SLOT( SelectionIntoArgument() ) );
494 ConstructorsClicked( getConstructorId() );
498 //=================================================================================
499 // function : enterEvent()
501 //=================================================================================
502 void BasicGUI_CircleDlg::enterEvent( QEvent* )
504 if ( !mainFrame()->GroupConstructors->isEnabled() )
505 ActivateThisDialog();
508 //=================================================================================
509 // function : DeactivateActiveDialog()
510 // purpose : public slot to deactivate if active
511 //=================================================================================
512 void BasicGUI_CircleDlg::DeactivateActiveDialog()
514 GEOMBase_Skeleton::DeactivateActiveDialog();
517 //=================================================================================
518 // function : ValueChangedInSpinBox()
520 //=================================================================================
521 void BasicGUI_CircleDlg::ValueChangedInSpinBox()
523 displayPreview(true);
526 //=================================================================================
527 // function : getRadius()
529 //=================================================================================
530 double BasicGUI_CircleDlg::getRadius() const
533 switch ( getConstructorId() ) {
535 r = GroupPntVecR->SpinBox_DX->value(); break;
540 //=================================================================================
541 // function : createOperation
543 //=================================================================================
544 GEOM::GEOM_IOperations_ptr BasicGUI_CircleDlg::createOperation()
546 return myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
549 //=================================================================================
550 // function : isValid
552 //=================================================================================
553 bool BasicGUI_CircleDlg::isValid( QString& msg )
556 switch( getConstructorId() ) {
558 // nil point means origin of global CS
559 // nil vector means Z axis
560 ok = GroupPntVecR->SpinBox_DX->isValid(msg, !IsPreview()) && getRadius() > 0;
563 ok = myPoint1 && myPoint2 && myPoint3 && myPoint1 != myPoint2 &&
564 myPoint1 != myPoint3 && myPoint2 != myPoint3;
567 ok = myPoint4 && myPoint5 && myPoint6 && myPoint4 != myPoint5 &&
568 myPoint5 != myPoint6 && myPoint4 != myPoint6;
576 //=================================================================================
577 // function : execute
579 //=================================================================================
580 bool BasicGUI_CircleDlg::execute( ObjectList& objects )
584 GEOM::GEOM_Object_var anObj;
586 GEOM::GEOM_ICurvesOperations_var anOper = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() );
588 switch ( getConstructorId() ) {
591 QStringList aParameters;
592 aParameters << GroupPntVecR->SpinBox_DX->text();
593 anObj = anOper->MakeCirclePntVecR( myPoint.get(), myDir.get(), getRadius() );
594 if ( !anObj->_is_nil() && !IsPreview() )
595 anObj->SetParameters(aParameters.join(":").toLatin1().constData());
600 anObj = anOper->MakeCircleThreePnt( myPoint1.get(), myPoint2.get(), myPoint3.get() );
604 anObj = anOper->MakeCircleCenter2Pnt( myPoint4.get(), myPoint5.get(), myPoint6.get() );
609 if ( !anObj->_is_nil() )
610 objects.push_back( anObj._retn() );
612 MESSAGE( "Execute Object is NULL!" );
618 //=================================================================================
619 // function : addSubshapeToStudy
620 // purpose : virtual method to add new SubObjects if local selection
621 //=================================================================================
622 void BasicGUI_CircleDlg::addSubshapesToStudy()
624 switch ( getConstructorId() ) {
626 GEOMBase::PublishSubObject( myPoint.get() );
627 GEOMBase::PublishSubObject( myDir.get() );
630 GEOMBase::PublishSubObject( myPoint1.get() );
631 GEOMBase::PublishSubObject( myPoint2.get() );
632 GEOMBase::PublishSubObject( myPoint3.get() );
635 GEOMBase::PublishSubObject( myPoint4.get() );
636 GEOMBase::PublishSubObject( myPoint5.get() );
637 GEOMBase::PublishSubObject( myPoint6.get() );