]> SALOME platform Git repositories - modules/geom.git/blob - src/BasicGUI/BasicGUI_PointDlg.cxx
Salome HOME
*** empty log message ***
[modules/geom.git] / src / BasicGUI / BasicGUI_PointDlg.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 // File   : BasicGUI_PointDlg.cxx
23 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
24 //
25
26 #include "BasicGUI_PointDlg.h"
27
28 #include <SUIT_ResourceMgr.h>
29 #include <SUIT_Session.h>
30 #include <SalomeApp_Application.h>
31 #include <LightApp_SelectionMgr.h>
32
33 #include <GeometryGUI.h>
34 #include <GEOMBase.h>
35
36 #include <GEOM_DlgRef.h>
37
38 #include <GEOMImpl_Types.hxx>
39
40 #include <QApplication>
41 #include <QLabel>
42
43 #include <gp_Pnt.hxx>
44 #include <TopoDS_Shape.hxx>
45 #include <TopAbs_ShapeEnum.hxx>
46 #include <TopoDS.hxx>
47 #include <BRep_Tool.hxx>
48 #include <TopExp.hxx>
49 #include <TColStd_IndexedMapOfInteger.hxx>
50 #include <TopTools_IndexedMapOfShape.hxx>
51
52 //=================================================================================
53 // class    : BasicGUI_PointDlg()
54 // purpose  : Constructs a BasicGUI_PointDlg which is a child of 'parent', with the 
55 //            name 'name' and widget flags set to 'f'.
56 //            The dialog will by default be modeless, unless you set 'modal' to
57 //            TRUE to construct a modal dialog.
58 //=================================================================================
59 BasicGUI_PointDlg::BasicGUI_PointDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
60                                       const char* name, bool modal, Qt::WindowFlags fl )
61   : GEOMBase_Skeleton( theGeometryGUI, parent, name, modal, fl )
62 {
63   QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_POINT") ) );
64   QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_POINT_EDGE" ) ) );
65   QPixmap image2( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
66   QPixmap image3( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_POINT_REF" ) ) );
67
68   setWindowTitle( tr( "GEOM_POINT_TITLE" ) );
69
70   /***************************************************************/
71   mainFrame()->GroupConstructors->setTitle( tr( "GEOM_POINTS" ) );
72   mainFrame()->RadioButton1->setIcon( image0 );
73   mainFrame()->RadioButton2->setIcon( image3 );
74   mainFrame()->RadioButton3->setIcon( image1 );
75
76   GroupXYZ = new DlgRef_3Spin( centralWidget() );
77   GroupXYZ->GroupBox1->setTitle( tr( "GEOM_COORDINATES" ) );
78   GroupXYZ->TextLabel1->setText( tr( "GEOM_X" ) );
79   GroupXYZ->TextLabel2->setText( tr( "GEOM_Y" ) );
80   GroupXYZ->TextLabel3->setText( tr( "GEOM_Z" ) );
81
82   GroupOnCurve = new DlgRef_1Sel1Spin( centralWidget() );
83   GroupOnCurve->GroupBox1->setTitle( tr( "GEOM_PARAM_POINT" ) );
84   GroupOnCurve->TextLabel1->setText( tr( "GEOM_EDGE" ) );
85   GroupOnCurve->TextLabel2->setText( tr( "GEOM_PARAMETER" ) );
86   GroupOnCurve->PushButton1->setIcon( image2 );
87
88   GroupRefPoint = new DlgRef_1Sel3Spin( centralWidget() );
89   GroupRefPoint->GroupBox1->setTitle( tr( "GEOM_REF_POINT" ) );
90   GroupRefPoint->TextLabel1->setText( tr( "GEOM_POINT" ) );
91   GroupRefPoint->PushButton1->setIcon( image2 );
92   GroupRefPoint->TextLabel2->setText( tr( "GEOM_DX" ) );
93   GroupRefPoint->TextLabel3->setText( tr( "GEOM_DY" ) );
94   GroupRefPoint->TextLabel4->setText( tr( "GEOM_DZ" ) );
95
96   myCoordGrp = new QGroupBox( tr( "GEOM_COORDINATES" ), centralWidget() );
97   QGridLayout* myCoordGrpLayout = new QGridLayout( myCoordGrp );
98   myCoordGrpLayout->addWidget( new QLabel( tr( "GEOM_X" ), myCoordGrp ), 0, 0 );
99   myX = new QLineEdit( myCoordGrp );
100   myCoordGrpLayout->addWidget( myX, 0, 1 );
101   myCoordGrpLayout->addWidget( new QLabel( tr( "GEOM_Y" ), myCoordGrp ), 1, 0 );
102   myY = new QLineEdit( myCoordGrp );
103   myCoordGrpLayout->addWidget( myY, 1, 1 );
104   myCoordGrpLayout->addWidget( new QLabel( tr( "GEOM_Z" ), myCoordGrp ), 2, 0 );
105   myZ = new QLineEdit( myCoordGrp );
106   myCoordGrpLayout->addWidget( myZ, 2, 1 );
107
108   QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
109   layout->setMargin( 0 ); layout->setSpacing( 6 );
110   layout->addWidget( GroupXYZ );
111   layout->addWidget( GroupOnCurve );
112   layout->addWidget( GroupRefPoint );
113   layout->addWidget( myCoordGrp );
114
115   myX->setReadOnly( true );
116   myY->setReadOnly( true );
117   myZ->setReadOnly( true );
118
119   myX->setEnabled( false );
120   myY->setEnabled( false );
121   myZ->setEnabled( false );
122
123   QPalette aPal = myX->palette();
124   aPal.setColor( QPalette::Disabled, QPalette::Text, QColor( 0, 0, 0 ) ) ;
125   myX->setPalette( aPal );
126   myY->setPalette( aPal );
127   myZ->setPalette( aPal );
128
129   setHelpFileName( "point.htm" );
130  
131   Init();
132 }
133
134
135 //=================================================================================
136 // function : ~BasicGUI_PointDlg()
137 // purpose  : Destructor
138 //=================================================================================
139 BasicGUI_PointDlg::~BasicGUI_PointDlg()
140 {
141 }
142
143
144 //=================================================================================
145 // function : Init()
146 // purpose  :
147 //=================================================================================
148 void BasicGUI_PointDlg::Init()
149 {
150   GroupOnCurve->LineEdit1->setReadOnly( true );
151   GroupRefPoint->LineEdit1->setReadOnly( true );
152
153   myEdge = GEOM::GEOM_Object::_nil();
154   myRefPoint = GEOM::GEOM_Object::_nil();
155
156   myEditCurrentArgument = 0;
157
158   /* Get setting of step value from file configuration */
159   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
160   double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
161   
162   /* min, max, step and decimals for spin boxes */
163   initSpinBox( GroupXYZ->SpinBox_DX, COORD_MIN, COORD_MAX, step, 3 );
164   initSpinBox( GroupXYZ->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 );
165   initSpinBox( GroupXYZ->SpinBox_DZ, COORD_MIN, COORD_MAX, step, 3 );
166   GroupXYZ->SpinBox_DX->setValue( 0.0 );
167   GroupXYZ->SpinBox_DY->setValue( 0.0 );
168   GroupXYZ->SpinBox_DZ->setValue( 0.0 );
169
170   initSpinBox( GroupRefPoint->SpinBox_DX, COORD_MIN, COORD_MAX, step, 3 );
171   initSpinBox( GroupRefPoint->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 );
172   initSpinBox( GroupRefPoint->SpinBox_DZ, COORD_MIN, COORD_MAX, step, 3 );
173   GroupRefPoint->SpinBox_DX->setValue( 0.0 );
174   GroupRefPoint->SpinBox_DY->setValue( 0.0 );
175   GroupRefPoint->SpinBox_DZ->setValue( 0.0 );
176
177   step = 0.1;
178
179   initSpinBox( GroupOnCurve->SpinBox_DX, 0., 1., step, 3 );
180   GroupOnCurve->SpinBox_DX->setValue( 0.5 );
181
182   /* signals and slots connections */
183   connect( myGeomGUI,      SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
184   connect( myGeomGUI,      SIGNAL( SignalCloseAllDialogs() ),        this, SLOT( ClickOnCancel() ) );
185
186   connect( buttonCancel(), SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) );
187   connect( buttonOk(),     SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
188   connect( buttonApply(),  SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
189
190   connect( this,           SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
191
192   connect( GroupOnCurve->PushButton1, SIGNAL( clicked() ),       this, SLOT( SetEditCurrentArgument() ) );
193   connect( GroupOnCurve->LineEdit1,   SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
194
195   connect( GroupOnCurve->SpinBox_DX,  SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
196   connect( GroupXYZ->SpinBox_DX,      SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
197   connect( GroupXYZ->SpinBox_DY,      SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
198   connect( GroupXYZ->SpinBox_DZ,      SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
199   connect( GroupRefPoint->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
200   connect( GroupRefPoint->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
201   connect( GroupRefPoint->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
202
203   // VSR: TODO ->>
204   connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupOnCurve->SpinBox_DX,  SLOT( SetStep( double ) ) );
205   connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupXYZ->SpinBox_DX,      SLOT( SetStep( double ) ) );
206   connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupXYZ->SpinBox_DY,      SLOT( SetStep( double ) ) );
207   connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupXYZ->SpinBox_DZ,      SLOT( SetStep( double ) ) );
208   connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupRefPoint->SpinBox_DX, SLOT( SetStep( double ) ) );
209   connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupRefPoint->SpinBox_DY, SLOT( SetStep( double ) ) );
210   connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupRefPoint->SpinBox_DZ, SLOT( SetStep( double ) ) );
211   // <<-
212
213   connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 
214            SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );  
215   
216   initName( tr( "GEOM_VERTEX" ) );
217   
218   ConstructorsClicked( 0 );
219 }
220
221
222 //=================================================================================
223 // function : ConstructorsClicked()
224 // purpose  : Radio button management
225 //=================================================================================
226 void BasicGUI_PointDlg::ConstructorsClicked(int constructorId)
227 {  
228   switch ( constructorId ) {
229   case 0:
230     {
231       localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
232       
233       GroupRefPoint->hide();
234       GroupOnCurve->hide();
235
236       myCoordGrp->hide();
237
238       GroupXYZ->show();
239       break;
240     }
241   case 1:
242     {
243       myEditCurrentArgument = GroupRefPoint->LineEdit1;
244       myEditCurrentArgument->setText( "" );
245       myRefPoint = GEOM::GEOM_Object::_nil();
246       
247       globalSelection( GEOM_POINT );
248       
249       GroupXYZ->hide();
250       GroupOnCurve->hide();
251       
252       GroupRefPoint->show();
253       
254       myCoordGrp->show();
255       break;
256     }
257   case 2:
258     {
259       myEditCurrentArgument = GroupOnCurve->LineEdit1;
260       myEditCurrentArgument->setText( "" );
261       myEdge = GEOM::GEOM_Object::_nil();
262
263       globalSelection( GEOM_EDGE );
264
265       GroupXYZ->hide();
266       GroupRefPoint->hide();
267
268       GroupOnCurve->show();
269       
270       myCoordGrp->show();
271       break;
272     }
273   }
274
275   myX->setText( "" );
276   myY->setText( "" );
277   myZ->setText( "" );
278
279   qApp->processEvents();
280   updateGeometry();
281   resize( minimumSize() );
282
283   SelectionIntoArgument();
284 }
285
286
287 //=================================================================================
288 // function : ClickOnOk()
289 // purpose  :
290 //=================================================================================
291 void BasicGUI_PointDlg::ClickOnOk()
292 {
293   if ( onAccept() )
294     ClickOnCancel();
295 }
296
297
298 //=================================================================================
299 // function : ClickOnApply()
300 // purpose  :
301 //=================================================================================
302 bool BasicGUI_PointDlg::ClickOnApply()
303 {
304   if ( !onAccept() )
305     return false;
306   
307   initName();
308   ConstructorsClicked( getConstructorId() );
309   return true;
310 }
311
312
313 //=================================================================================
314 // function : ClickOnCancel()
315 // purpose  :
316 //=================================================================================
317 void BasicGUI_PointDlg::ClickOnCancel()
318 {
319   GEOMBase_Skeleton::ClickOnCancel();
320 }
321
322
323 //=================================================================================
324 // function : SelectionIntoArgument()
325 // purpose  : Called when selection as changed (for constructors not using local context)
326 //=================================================================================
327 void BasicGUI_PointDlg::SelectionIntoArgument()
328 {
329   const int id = getConstructorId();
330
331   if ( ( id == 1 || id == 2 ) && myEditCurrentArgument != 0 ) {
332     myEditCurrentArgument->setText( "" );
333     myX->setText( "" );
334     myY->setText( "" );
335     myZ->setText( "" );
336     myRefPoint = myEdge = GEOM::GEOM_Object::_nil();
337   }
338
339   if ( IObjectCount() == 1 ) {
340     Standard_Boolean aRes = Standard_False;
341     Handle(SALOME_InteractiveObject) anIO = firstIObject();
342     GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIO, aRes );
343     if ( !CORBA::is_nil( aSelectedObject ) && aRes ) {
344       if ( id == 0 ) {
345         // get CORBA reference to data object
346         TopoDS_Shape aShape = myGeomGUI->GetShapeReader().GetShape( myGeomGUI->GetGeomGen(), aSelectedObject );
347         if ( aShape.IsNull() )
348           return;
349
350         if ( aShape.ShapeType() != TopAbs_VERTEX ) {
351           TColStd_IndexedMapOfInteger aMap;
352           LightApp_Application* anApp =
353             (LightApp_Application*)(SUIT_Session::session()->activeApplication());
354           anApp->selectionMgr()->GetIndexes( anIO, aMap );
355           
356           if ( aMap.Extent() == 1 ) {
357             int anIndex = aMap( 1 );
358             TopTools_IndexedMapOfShape aShapes;
359             TopExp::MapShapes( aShape, aShapes );
360             aShape = aShapes.FindKey( anIndex );
361             
362             if ( aShape.IsNull() || aShape.ShapeType() != TopAbs_VERTEX )
363               return;
364           }
365           else
366             return;
367         }
368
369         gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
370         GroupXYZ->SpinBox_DX->setValue( aPnt.X() );
371         GroupXYZ->SpinBox_DY->setValue( aPnt.Y() );
372         GroupXYZ->SpinBox_DZ->setValue( aPnt.Z() );
373       }
374       else if ( id == 1 ) {
375         myRefPoint = aSelectedObject;
376         GroupRefPoint->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) );
377       }
378       else if ( id == 2 ) {
379         myEdge = aSelectedObject;
380         GroupOnCurve->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) );
381       }
382     }
383   }
384   
385   displayPreview();
386 }
387
388
389 //=================================================================================
390 // function : LineEditReturnPressed()
391 // purpose  :
392 //=================================================================================
393 void BasicGUI_PointDlg::LineEditReturnPressed()
394 {
395   QLineEdit* send = (QLineEdit*)sender();
396   if ( send == GroupRefPoint->LineEdit1 || send == GroupOnCurve->LineEdit1 )
397     {
398       myEditCurrentArgument = send;
399       GEOMBase_Skeleton::LineEditReturnPressed();
400     }
401 }
402
403
404 //=================================================================================
405 // function : SetEditCurrentArgument()
406 // purpose  :
407 //=================================================================================
408 void BasicGUI_PointDlg::SetEditCurrentArgument()
409 {
410   QPushButton* send = (QPushButton*)sender();
411
412   if ( send == GroupRefPoint->PushButton1 ) {
413     GroupRefPoint->LineEdit1->setFocus();
414     myEditCurrentArgument = GroupRefPoint->LineEdit1;
415     
416     globalSelection( GEOM_POINT );
417   }
418   else if ( send == GroupOnCurve->PushButton1 ) {
419     GroupOnCurve->LineEdit1->setFocus();
420     myEditCurrentArgument = GroupOnCurve->LineEdit1;
421     
422     globalSelection( GEOM_EDGE );
423   }
424 }
425
426
427 //=================================================================================
428 // function : enterEvent()
429 // purpose  : to reactivate this dialog box when mouse enter onto the window
430 //=================================================================================
431 void BasicGUI_PointDlg::enterEvent( QEvent* )
432 {
433   if ( !mainFrame()->GroupConstructors->isEnabled() )
434     ActivateThisDialog();
435 }
436
437
438 //=================================================================================
439 // function : ActivateThisDialog()
440 // purpose  :
441 //=================================================================================
442 void BasicGUI_PointDlg::ActivateThisDialog( )
443 {
444   GEOMBase_Skeleton::ActivateThisDialog();
445   // myGeomGUI->SetState( 0 );
446   ConstructorsClicked( getConstructorId() );
447 }
448
449
450 //=================================================================================
451 // function : DeactivateActiveDialog()
452 // purpose  : public slot to deactivate if active
453 //=================================================================================
454 void BasicGUI_PointDlg::DeactivateActiveDialog()
455 {
456   // myGeomGUI->SetState( -1 );
457   GEOMBase_Skeleton::DeactivateActiveDialog();
458 }
459
460
461 //=================================================================================
462 // function : ValueChangedInSpinBox()
463 // purpose  :
464 //=================================================================================
465 void BasicGUI_PointDlg::ValueChangedInSpinBox(double newValue)
466 {
467   displayPreview();
468 }
469
470 //=================================================================================
471 // funcion  : getParameter()
472 // purpose  :
473 //=================================================================================
474 double BasicGUI_PointDlg::getParameter() const
475 {
476   return GroupOnCurve->SpinBox_DX->value();
477 }
478
479 //=================================================================================
480 // function : OnPointSelected
481 // purpose  :
482 //=================================================================================
483 void BasicGUI_PointDlg::OnPointSelected( const gp_Pnt& thePnt )
484 {
485   if ( getConstructorId() == 0 ) {
486     GroupXYZ->SpinBox_DX->setValue( thePnt.X() );
487     GroupXYZ->SpinBox_DY->setValue( thePnt.Y() );
488     GroupXYZ->SpinBox_DZ->setValue( thePnt.Z() );
489
490     displayPreview();
491   }
492 }
493
494 //=================================================================================
495 // function : createOperation
496 // purpose  :
497 //=================================================================================
498 GEOM::GEOM_IOperations_ptr BasicGUI_PointDlg::createOperation()
499 {
500   return myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
501 }
502
503 //=================================================================================
504 // function : isValid
505 // purpose  :
506 //=================================================================================
507 bool BasicGUI_PointDlg::isValid( QString& msg )
508 {
509   const int id = getConstructorId();
510   if ( id == 0 )
511     return true;
512   else if ( id == 1 )
513     return !myRefPoint->_is_nil();
514   else if ( id == 2 )
515     return !myEdge->_is_nil();
516   return false;
517 }
518
519 //=================================================================================
520 // function : execute
521 // purpose  :
522 //=================================================================================
523 bool BasicGUI_PointDlg::execute( ObjectList& objects )
524 {
525   bool res = false;
526
527   GEOM::GEOM_Object_var anObj;
528
529   switch ( getConstructorId() ) {
530   case 0 :
531     {
532       double x = GroupXYZ->SpinBox_DX->value();
533       double y = GroupXYZ->SpinBox_DY->value();
534       double z = GroupXYZ->SpinBox_DZ->value();
535       
536       anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakePointXYZ( x, y, z );
537       res = true;
538       break;
539     }
540   case 1 :
541     {
542       double dx = GroupRefPoint->SpinBox_DX->value();
543       double dy = GroupRefPoint->SpinBox_DY->value();
544       double dz = GroupRefPoint->SpinBox_DZ->value();
545       
546       anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->
547         MakePointWithReference( myRefPoint, dx, dy, dz );
548       res = true;
549       break;
550     }
551   case 2 :
552     anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->
553       MakePointOnCurve( myEdge, getParameter() );
554     res = true;
555     break;
556   }
557   
558   if ( getConstructorId() == 1 || getConstructorId() == 2 ) {
559     TopoDS_Shape aShape;
560     if ( GEOMBase::GetShape( anObj, aShape ) && !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) {
561       gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
562       myX->setText( QString( "%1" ).arg( aPnt.X() ) );
563       myY->setText( QString( "%1" ).arg( aPnt.Y() ) );
564       myZ->setText( QString( "%1" ).arg( aPnt.Z() ) );
565     }
566     else {
567       myX->setText( "" );
568       myY->setText( "" );
569       myZ->setText( "" );
570     }
571   }
572   
573   if ( !anObj->_is_nil() ) {
574     objects.push_back( anObj._retn() );
575   }
576   
577   return res;
578 }
579
580 //=================================================================================
581 // function : closeEvent
582 // purpose  :
583 //=================================================================================
584 void BasicGUI_PointDlg::closeEvent( QCloseEvent* e )
585 {
586   GEOMBase_Skeleton::closeEvent( e );
587 }