]> SALOME platform Git repositories - modules/geom.git/blob - src/TransformationGUI/TransformationGUI_RotationDlg.cxx
Salome HOME
0021514: EDF GEOM: Partition failure. A fix by PKV.
[modules/geom.git] / src / TransformationGUI / TransformationGUI_RotationDlg.cxx
1 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  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 // GEOM GEOMGUI : GUI for Geometry component
23 // File   : TransformationGUI_RotationDlg.cxx
24 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
25
26 #include "TransformationGUI_RotationDlg.h"
27
28 #include <DlgRef.h>
29 #include <GeometryGUI.h>
30 #include <GEOMBase.h>
31
32 #include <SUIT_Session.h>
33 #include <SUIT_ResourceMgr.h>
34 #include <SalomeApp_Application.h>
35 #include <LightApp_SelectionMgr.h>
36
37 // OCCT Includes
38 #include <TopoDS_Shape.hxx>
39 #include <TopoDS_Edge.hxx>
40 #include <TopoDS.hxx>
41 #include <TopExp.hxx>
42 #include <TColStd_IndexedMapOfInteger.hxx>
43 #include <TopTools_IndexedMapOfShape.hxx>
44
45 #include <GEOMImpl_Types.hxx>
46
47 //=================================================================================
48 // class    : TransformationGUI_RotationDlg()
49 // purpose  : Constructs a TransformationGUI_RotationDlg which is a child of 'parent', with the
50 //            name 'name' and widget flags set to 'f'.
51 //            The dialog will by default be modeless, unless you set 'modal' to
52 //            TRUE to construct a modal dialog.
53 //=================================================================================
54 TransformationGUI_RotationDlg::TransformationGUI_RotationDlg
55 (GeometryGUI* theGeometryGUI, QWidget* parent, bool modal, Qt::WindowFlags fl)
56   : GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl),
57     myInitial(true)
58 {
59   SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr();
60   QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_ROTATION")));
61   QPixmap image1 (aResMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
62   QPixmap image2 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_ROTATION_THREE_POINTS")));
63
64   setWindowTitle(tr("GEOM_ROTATION_TITLE"));
65
66   /***************************************************************/
67   mainFrame()->GroupConstructors->setTitle(tr("GEOM_ROTATION"));
68   mainFrame()->RadioButton1->setIcon(image0);
69   mainFrame()->RadioButton2->setIcon(image2);
70   mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
71   mainFrame()->RadioButton3->close();
72
73   GroupPoints = new DlgRef_4Sel1Spin2Check(centralWidget());
74   GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
75   GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS"));
76   GroupPoints->TextLabel2->setText(tr("GEOM_AXIS"));
77   GroupPoints->TextLabel3->setText(tr("GEOM_ANGLE"));
78   GroupPoints->TextLabel4->setText(tr("GEOM_POINT_I").arg(1));
79   GroupPoints->TextLabel5->setText(tr("GEOM_POINT_I").arg(2));
80
81   GroupPoints->LineEdit1->setReadOnly(true);
82   GroupPoints->LineEdit2->setReadOnly(true);
83   GroupPoints->LineEdit4->setReadOnly(true);
84   GroupPoints->LineEdit5->setReadOnly(true);
85   GroupPoints->PushButton1->setIcon(image1);
86   GroupPoints->PushButton2->setIcon(image1);
87   GroupPoints->PushButton4->setIcon(image1);
88   GroupPoints->PushButton5->setIcon(image1);
89   GroupPoints->CheckButton1->setText(tr("GEOM_CREATE_COPY"));
90   GroupPoints->CheckButton2->setText(tr("GEOM_REVERSE"));
91
92   QVBoxLayout* layout = new QVBoxLayout(centralWidget());
93   layout->setMargin(0); layout->setSpacing(6);
94   layout->addWidget(GroupPoints);
95   /***************************************************************/
96
97   setHelpFileName("rotation_operation_page.html");
98
99   // Activate Create a Copy mode
100   GroupPoints->CheckButton1->setChecked(true);
101   CreateCopyModeChanged();
102
103   Init();
104 }
105
106 //=================================================================================
107 // function : ~TransformationGUI_RotationDlg()
108 // purpose  : Destroys the object and frees any allocated resources
109 //=================================================================================
110 TransformationGUI_RotationDlg::~TransformationGUI_RotationDlg()
111 {
112   // no need to delete child widgets, Qt does it all for us
113 }
114
115 //=================================================================================
116 // function : Init()
117 // purpose  :
118 //=================================================================================
119 void TransformationGUI_RotationDlg::Init()
120 {
121   double anAngle = 0;
122   double SpecificStep = 5;
123
124   // min, max, step and decimals for spin boxes & initial values
125   initSpinBox(GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, SpecificStep, "angle_precision" );
126   GroupPoints->SpinBox_DX->setValue(anAngle);
127
128   // init variables
129   GroupPoints->LineEdit1->setText("");
130   GroupPoints->LineEdit2->setText("");
131   GroupPoints->LineEdit4->setText("");
132   GroupPoints->LineEdit5->setText("");
133
134   myObjects.clear();
135   myAxis.nullify();
136   myCentPoint.nullify();
137   myPoint1.nullify();
138   myPoint2.nullify();
139
140   mainFrame()->GroupBoxPublish->show();
141
142   // signals and slots connections
143   connect(buttonOk(),    SIGNAL(clicked()), this, SLOT(ClickOnOk()));
144   connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
145
146   connect(this, SIGNAL(constructorsClicked(int)), this, SLOT(ConstructorsClicked(int)));
147
148   connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
149   connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
150   connect(GroupPoints->PushButton4, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
151   connect(GroupPoints->PushButton5, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
152
153   connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
154
155   connect(GroupPoints->SpinBox_DX, SIGNAL(textChanged( const QString& )),
156           this, SLOT(TextValueChangedInSpinBox( const QString&)));
157
158   connect(GroupPoints->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(CreateCopyModeChanged()));
159   connect(GroupPoints->CheckButton2, SIGNAL(toggled(bool)), this, SLOT(onReverse()));
160
161   initName(tr("GEOM_ROTATION"));
162
163   ConstructorsClicked(0);
164 }
165
166 //=================================================================================
167 // function : ConstructorsClicked()
168 // purpose  : Radio button management
169 //=================================================================================
170 void TransformationGUI_RotationDlg::ConstructorsClicked (int constructorId)
171 {
172   disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
173
174   switch (constructorId) {
175   case 0: // rotation an object angle and axis
176     {
177       GroupPoints->ShowRows(2, 3, false);
178       GroupPoints->TextLabel2->setText(tr("GEOM_AXIS"));
179       GroupPoints->LineEdit2->clear();
180       GroupPoints->ShowRows(4, 4, true);
181
182       myAxis.nullify();
183
184       GroupPoints->PushButton1->click();
185     }
186     break;
187   case 1: // rotation an object by 3 points
188     {
189       GroupPoints->ShowRows(4, 4, false);
190       GroupPoints->ShowRows(2, 3, true);
191       GroupPoints->TextLabel2->setText(tr("GEOM_CENTRAL_POINT"));
192       GroupPoints->TextLabel4->setText(tr("GEOM_POINT_I").arg(1));
193       GroupPoints->TextLabel5->setText(tr("GEOM_POINT_I").arg(2));
194
195       GroupPoints->LineEdit2->clear();
196       GroupPoints->LineEdit4->clear();
197       GroupPoints->LineEdit5->clear();
198
199       myCentPoint.nullify();
200       myPoint1.nullify();
201       myPoint2.nullify();
202
203       GroupPoints->PushButton1->click();
204     }
205     break;
206   }
207
208   qApp->processEvents();
209   updateGeometry();
210   resize(minimumSizeHint());
211
212   if (myInitial) {
213     myInitial = false;
214     SelectionIntoArgument();
215   }
216   else {
217     processPreview();
218   }
219 }
220
221 //=================================================================================
222 // function : ClickOnOk()
223 // purpose  :
224 //=================================================================================
225 void TransformationGUI_RotationDlg::ClickOnOk()
226 {
227   setIsApplyAndClose( true );
228   if (ClickOnApply())
229     ClickOnCancel();
230 }
231
232 //=================================================================================
233 // function : ClickOnApply()
234 // purpose  :
235 //=================================================================================
236 bool TransformationGUI_RotationDlg::ClickOnApply()
237 {
238   if (!onAccept(GroupPoints->CheckButton1->isChecked()))
239     return false;
240
241   initName();
242
243   // activate selection and connect selection manager
244   ConstructorsClicked(getConstructorId());
245   SelectionIntoArgument();
246
247   return true;
248 }
249
250 //=================================================================================
251 // function : SelectionIntoArgument()
252 // purpose  : Called when selection is changed or on dialog initialization or activation
253 //=================================================================================
254 void TransformationGUI_RotationDlg::SelectionIntoArgument()
255 {
256   erasePreview();
257
258   if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
259     myObjects = getSelected( TopAbs_SHAPE, -1 );
260     if ( !myObjects.isEmpty() ) {
261       QString aName = myObjects.count() > 1 ? QString( "%1_objects").arg( myObjects.count() ) : GEOMBase::GetName( myObjects[0].get() );
262       myEditCurrentArgument->setText( aName );
263     }
264     else {
265       myEditCurrentArgument->setText("");
266     }
267   }
268   else {
269     TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 0 ) ?
270       TopAbs_EDGE : TopAbs_VERTEX;
271     GEOM::GeomObjPtr aSelectedObject = getSelected( aNeedType );
272     TopoDS_Shape aShape;
273     if ( aSelectedObject && GEOMBase::GetShape( aSelectedObject.get(), aShape ) && !aShape.IsNull() ) {
274       QString aName = GEOMBase::GetName( aSelectedObject.get() );
275       myEditCurrentArgument->setText( aName );
276       if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
277         if ( getConstructorId() == 0 ) {
278           myAxis = aSelectedObject;
279           if ( myObjects.isEmpty() )
280             GroupPoints->PushButton1->click();
281         }
282         else if ( getConstructorId() == 1 ) {
283           myCentPoint = aSelectedObject;
284           if ( !myPoint1 )
285             GroupPoints->PushButton4->click();
286           else if ( !myPoint2 )
287             GroupPoints->PushButton5->click();
288           else if ( myObjects.isEmpty() )
289             GroupPoints->PushButton1->click();
290         }
291       }
292       else if ( myEditCurrentArgument == GroupPoints->LineEdit4 ) {
293         myPoint1 = aSelectedObject;
294         if ( !myPoint2 )
295           GroupPoints->PushButton5->click();
296         else if ( myObjects.isEmpty() )
297           GroupPoints->PushButton1->click();
298         else if ( !myCentPoint )
299           GroupPoints->PushButton2->click();
300       }
301       else if ( myEditCurrentArgument == GroupPoints->LineEdit5 ) {
302         myPoint2 = aSelectedObject;
303         if ( myObjects.isEmpty() )
304           GroupPoints->PushButton1->click();
305         else if ( !myCentPoint )
306           GroupPoints->PushButton2->click();
307         else if ( !myPoint1 )
308           GroupPoints->PushButton4->click();
309       }
310     }
311     else {
312       if (myEditCurrentArgument == GroupPoints->LineEdit2 ) {
313         if ( getConstructorId() == 0 )
314           myAxis.nullify();
315         else if ( getConstructorId() == 1 )
316           myCentPoint.nullify();
317       }
318       else if ( myEditCurrentArgument == GroupPoints->LineEdit4 ) {
319         myPoint1.nullify();
320       }
321       else if ( myEditCurrentArgument == GroupPoints->LineEdit5 ) {
322         myPoint2.nullify();
323       }
324       myEditCurrentArgument->setText("");
325     }
326   }
327
328   processPreview();
329 }
330
331 //=================================================================================
332 // function : SetEditCurrentArgument()
333 // purpose  :
334 //=================================================================================
335 void TransformationGUI_RotationDlg::SetEditCurrentArgument()
336 {
337   QPushButton* send = (QPushButton*)sender();
338
339   disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
340   globalSelection();
341
342   if (send == GroupPoints->PushButton1) {
343     myEditCurrentArgument = GroupPoints->LineEdit1;
344
345     GroupPoints->PushButton2->setDown(false);
346     GroupPoints->PushButton4->setDown(false);
347     GroupPoints->PushButton5->setDown(false);
348     GroupPoints->LineEdit2->setEnabled(false);
349     GroupPoints->LineEdit4->setEnabled(false);
350     GroupPoints->LineEdit5->setEnabled(false);
351   }
352   else if (send == GroupPoints->PushButton2) {
353     myEditCurrentArgument = GroupPoints->LineEdit2;
354
355     GroupPoints->PushButton1->setDown(false);
356     GroupPoints->PushButton4->setDown(false);
357     GroupPoints->PushButton5->setDown(false);
358     GroupPoints->LineEdit1->setEnabled(false);
359     GroupPoints->LineEdit4->setEnabled(false);
360     GroupPoints->LineEdit5->setEnabled(false);
361
362     if (getConstructorId() == 0)
363       localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
364     else
365       localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
366   }
367   else if (send == GroupPoints->PushButton4) {
368     myEditCurrentArgument = GroupPoints->LineEdit4;
369
370     GroupPoints->PushButton1->setDown(false);
371     GroupPoints->PushButton2->setDown(false);
372     GroupPoints->PushButton5->setDown(false);
373     GroupPoints->LineEdit1->setEnabled(false);
374     GroupPoints->LineEdit2->setEnabled(false);
375     GroupPoints->LineEdit5->setEnabled(false);
376
377     localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
378   }
379   else if (send == GroupPoints->PushButton5) {
380     myEditCurrentArgument = GroupPoints->LineEdit5;
381
382     GroupPoints->PushButton1->setDown(false);
383     GroupPoints->PushButton2->setDown(false);
384     GroupPoints->PushButton4->setDown(false);
385     GroupPoints->LineEdit1->setEnabled(false);
386     GroupPoints->LineEdit2->setEnabled(false);
387     GroupPoints->LineEdit4->setEnabled(false);
388
389     localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
390   }
391   connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
392           this, SLOT(SelectionIntoArgument()));
393
394   // enable line edit
395   myEditCurrentArgument->setEnabled(true);
396   myEditCurrentArgument->setFocus();
397   // after setFocus(), because it will be setDown(false) when loses focus
398   send->setDown(true);
399
400   // seems we need it only to avoid preview disappearing, caused by selection mode change
401   processPreview();
402 }
403
404 //=================================================================================
405 // function : ActivateThisDialog()
406 // purpose  :
407 //=================================================================================
408 void TransformationGUI_RotationDlg::ActivateThisDialog()
409 {
410   GEOMBase_Skeleton::ActivateThisDialog();
411   connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
412            this, SLOT( SelectionIntoArgument() ) );
413
414   ConstructorsClicked( getConstructorId() );
415 }
416
417 //=================================================================================
418 // function : enterEvent()
419 // purpose  :
420 //=================================================================================
421 void TransformationGUI_RotationDlg::enterEvent (QEvent*)
422 {
423   if (!mainFrame()->GroupConstructors->isEnabled())
424     ActivateThisDialog();
425 }
426
427 void TransformationGUI_RotationDlg::TextValueChangedInSpinBox( const QString& s)
428 {
429   bool isDigit = true;
430   s.toDouble(&isDigit);
431   if(!isDigit) {
432     GroupPoints->CheckButton2->setChecked(false);
433   }
434   GroupPoints->CheckButton2->setEnabled(isDigit); 
435 }
436
437 //=================================================================================
438 // function : ValueChangedInSpinBox()
439 // purpose  :
440 //=================================================================================
441 void TransformationGUI_RotationDlg::ValueChangedInSpinBox()
442 {
443   processPreview();
444 }
445
446 //=================================================================================
447 // function : createOperation
448 // purpose  :
449 //=================================================================================
450 GEOM::GEOM_IOperations_ptr TransformationGUI_RotationDlg::createOperation()
451 {
452   return getGeomEngine()->GetITransformOperations(getStudyId());
453 }
454
455 //=================================================================================
456 // function : isValid
457 // purpose  :
458 //=================================================================================
459 bool TransformationGUI_RotationDlg::isValid (QString& msg)
460 {
461   bool ok = false;
462   switch (getConstructorId()) {
463   case 0:
464     ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() ) && !myObjects.isEmpty() && myAxis;
465     break;
466   case 1:
467     ok = !myObjects.isEmpty() && myCentPoint && myPoint1 && myPoint2;
468     break;
469   default:
470     break;
471   }
472   return ok;
473 }
474
475 //=================================================================================
476 // function : execute
477 // purpose  :
478 //=================================================================================
479 bool TransformationGUI_RotationDlg::execute (ObjectList& objects)
480 {
481   bool res = false;
482   bool toCreateCopy = IsPreview() || GroupPoints->CheckButton1->isChecked();
483
484   GEOM::GEOM_Object_var anObj;
485
486   GEOM::GEOM_ITransformOperations_var anOper = GEOM::GEOM_ITransformOperations::_narrow(getOperation());
487
488   switch (getConstructorId()) {
489   case 0:
490     {
491       QStringList aParameters;
492       aParameters<<GroupPoints->SpinBox_DX->text();
493       if (toCreateCopy) {
494         for (int i = 0; i < myObjects.count(); i++) {
495           myCurrObject = myObjects[i];
496           anObj = anOper->RotateCopy(myObjects[i].get(), myAxis.get(), GetAngle() * M_PI / 180.);
497           if (!anObj->_is_nil()) {
498             if(!IsPreview()) {
499               anObj->SetParameters(aParameters.join(":").toLatin1().constData());
500             }
501             objects.push_back(anObj._retn());
502           }
503         }
504       }
505       else {
506         for (int i = 0; i < myObjects.count(); i++) {
507           myCurrObject = myObjects[i];
508           anObj = anOper->Rotate(myObjects[i].get(), myAxis.get(), GetAngle() * M_PI / 180.);
509           if (!anObj->_is_nil()) {
510             if(!IsPreview()) {
511               anObj->SetParameters(aParameters.join(":").toLatin1().constData());
512               updateAttributes(anObj, aParameters);
513             }
514             objects.push_back(anObj._retn());
515           }
516         }
517       }
518       res = true;
519       break;
520     }
521   case 1:
522     {
523       if (toCreateCopy) {
524         for (int i = 0; i < myObjects.count(); i++) {
525           myCurrObject = myObjects[i];
526           anObj = anOper->RotateThreePointsCopy(myObjects[i].get(), myCentPoint.get(), myPoint1.get(), myPoint2.get());
527           if (!anObj->_is_nil())
528             objects.push_back(anObj._retn());
529         }
530       }
531       else {
532         for (int i = 0; i < myObjects.count(); i++) {
533           myCurrObject = myObjects[i];
534           anObj = anOper->RotateThreePoints(myObjects[i].get(), myCentPoint.get(), myPoint1.get(), myPoint2.get());
535           if (!anObj->_is_nil())
536             objects.push_back(anObj._retn());
537         }
538       }
539       res = true;
540       break;
541     }
542   }
543
544   return res;
545 }
546
547 //=================================================================================
548 // function : restoreSubShapes
549 // purpose  :
550 //=================================================================================
551 void TransformationGUI_RotationDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
552                                                       SALOMEDS::SObject_ptr theSObject)
553 {
554   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
555     // we pass here the first operation argument (object) through the list of arguments
556     // because the rotation operation place its arguments in the data structure in another order,
557     // and we need to point the first argument directly
558     GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO;
559     anArgs->length(1);
560     anArgs[0] = myCurrObject.copy();
561     getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
562                                         /*theFindMethod=*/GEOM::FSM_Transformed,
563                                         /*theInheritFirstArg=*/true,
564                                         mainFrame()->CheckBoxAddPrefix->isChecked());
565   }
566 }
567
568 //=================================================================================
569 // function : GetAngle()
570 // purpose  :
571 //=================================================================================
572 double TransformationGUI_RotationDlg::GetAngle() const
573 {
574   return GroupPoints->SpinBox_DX->value();
575 }
576
577 //=================================================================================
578 // function :  CreateCopyModeChanged()
579 // purpose  :
580 //=================================================================================
581 void TransformationGUI_RotationDlg::CreateCopyModeChanged()
582 {
583   mainFrame()->GroupBoxName->setEnabled(GroupPoints->CheckButton1->isChecked());
584 }
585
586 //=================================================================================
587 // function :  onReverse()
588 // purpose  :
589 //=================================================================================
590 void TransformationGUI_RotationDlg::onReverse()
591 {
592   double anOldValue = GroupPoints->SpinBox_DX->value();
593   GroupPoints->SpinBox_DX->setValue(-anOldValue);
594 }
595
596 //=================================================================================
597 // function : addSubshapesToStudy
598 // purpose  : virtual method to add new SubObjects if local selection
599 //=================================================================================
600 void TransformationGUI_RotationDlg::addSubshapesToStudy()
601 {
602   bool toCreateCopy = IsPreview() || GroupPoints->CheckButton1->isChecked();
603   if (toCreateCopy) {
604     switch (getConstructorId()) {
605     case 0:
606       GEOMBase::PublishSubObject( myAxis.get() );
607       break;
608     case 1:
609       GEOMBase::PublishSubObject( myCentPoint.get() );
610       GEOMBase::PublishSubObject( myPoint1.get() );
611       GEOMBase::PublishSubObject( myPoint2.get() );
612       break;
613     default:
614       break;
615     }
616   }
617 }