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