1 // Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : SMESHGUI_SymmetryDlg.cxx
23 // Author : Michael ZORIN, Open CASCADE S.A.S.
26 #include "SMESHGUI_SymmetryDlg.h"
29 #include "SMESHGUI_SpinBox.h"
30 #include "SMESHGUI_Utils.h"
31 #include "SMESHGUI_VTKUtils.h"
32 #include "SMESHGUI_MeshUtils.h"
33 #include "SMESHGUI_IdValidator.h"
34 #include "SMESHGUI_FilterDlg.h"
35 #include "SMESHGUI_MeshEditPreview.h"
37 #include <SMESH_Actor.h>
38 #include <SMESH_TypeFilter.hxx>
39 #include <SMESH_LogicalFilter.hxx>
40 #include <SMDS_Mesh.hxx>
42 // SALOME GUI includes
43 #include <SUIT_Desktop.h>
44 #include <SUIT_ResourceMgr.h>
45 #include <SUIT_Session.h>
46 #include <SUIT_MessageBox.h>
47 #include <SUIT_OverrideCursor.h>
49 #include <LightApp_Application.h>
50 #include <LightApp_SelectionMgr.h>
52 #include <SVTK_ViewModel.h>
53 #include <SVTK_ViewWindow.h>
54 #include <SALOME_ListIO.hxx>
56 // SALOME KERNEL includes
57 #include <SALOMEDSClient.hxx>
58 #include <SALOMEDSClient_SObject.hxx>
61 #include <TColStd_MapOfInteger.hxx>
64 #include <QApplication>
65 #include <QButtonGroup>
69 #include <QPushButton>
70 #include <QRadioButton>
72 #include <QHBoxLayout>
73 #include <QVBoxLayout>
74 #include <QGridLayout>
78 #include <SALOMEconfig.h>
79 #include CORBA_SERVER_HEADER(SMESH_Group)
80 #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
82 enum { MOVE_ELEMS_BUTTON = 0, COPY_ELEMS_BUTTON, MAKE_MESH_BUTTON }; //!< action type
87 //=================================================================================
88 // class : SMESHGUI_SymmetryDlg()
90 //=================================================================================
92 SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule )
93 : SMESHGUI_MultiPreviewDlg( theModule ),
94 mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
97 QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SMESH_SYMMETRY_POINT")));
98 QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SMESH_SYMMETRY_AXIS")));
99 QPixmap image2 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SMESH_SYMMETRY_PLANE")));
100 QPixmap image3 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
103 setAttribute(Qt::WA_DeleteOnClose, true);
104 setWindowTitle(tr("SMESH_SYMMETRY"));
105 setSizeGripEnabled(true);
107 QVBoxLayout* SMESHGUI_SymmetryDlgLayout = new QVBoxLayout(this);
108 SMESHGUI_SymmetryDlgLayout->setSpacing(SPACING);
109 SMESHGUI_SymmetryDlgLayout->setMargin(MARGIN);
111 /***************************************************************/
112 ConstructorsBox = new QGroupBox(tr("SMESH_SYMMETRY"), this);
113 GroupConstructors = new QButtonGroup(this);
114 QHBoxLayout* ConstructorsBoxLayout = new QHBoxLayout(ConstructorsBox);
115 ConstructorsBoxLayout->setSpacing(SPACING);
116 ConstructorsBoxLayout->setMargin(MARGIN);
118 RadioButton1 = new QRadioButton(ConstructorsBox);
119 RadioButton1->setIcon(image0);
120 RadioButton2 = new QRadioButton(ConstructorsBox);
121 RadioButton2->setIcon(image1);
122 RadioButton3 = new QRadioButton(ConstructorsBox);
123 RadioButton3->setIcon(image2);
125 ConstructorsBoxLayout->addWidget(RadioButton1);
126 ConstructorsBoxLayout->addWidget(RadioButton2);
127 ConstructorsBoxLayout->addWidget(RadioButton3);
128 GroupConstructors->addButton(RadioButton1, 0);
129 GroupConstructors->addButton(RadioButton2, 1);
130 GroupConstructors->addButton(RadioButton3, 2);
132 /***************************************************************/
133 GroupArguments = new QGroupBox(tr("SMESH_ARGUMENTS"), this);
134 QGridLayout* GroupArgumentsLayout = new QGridLayout(GroupArguments);
135 GroupArgumentsLayout->setSpacing(SPACING);
136 GroupArgumentsLayout->setMargin(MARGIN);
138 myIdValidator = new SMESHGUI_IdValidator(this);
140 // Controls for elements selection
141 TextLabelElements = new QLabel(tr("SMESH_ID_ELEMENTS"), GroupArguments);
142 SelectElementsButton = new QPushButton(GroupArguments);
143 SelectElementsButton->setIcon(image3);
144 LineEditElements = new QLineEdit(GroupArguments);
145 LineEditElements->setValidator(myIdValidator);
146 LineEditElements->setMaxLength(-1);
147 myFilterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
148 connect(myFilterBtn, SIGNAL(clicked()), this, SLOT(setFilters()));
150 // Control for the whole mesh selection
151 CheckBoxMesh = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
153 // Controls for mirror selection
154 GroupMirror = new QGroupBox(GroupArguments);
155 QGridLayout* GroupMirrorLayout = new QGridLayout(GroupMirror);
156 GroupMirrorLayout->setSpacing(SPACING);
157 GroupMirrorLayout->setMargin(MARGIN);
159 TextLabelPoint = new QLabel(tr("SMESH_POINT"), GroupMirror);
160 SelectPointButton = new QPushButton(GroupMirror);
161 SelectPointButton->setIcon(image3);
163 TextLabelX = new QLabel(tr("SMESH_X"), GroupMirror);
164 SpinBox_X = new SMESHGUI_SpinBox(GroupMirror);
165 TextLabelY = new QLabel(tr("SMESH_Y"), GroupMirror);
166 SpinBox_Y = new SMESHGUI_SpinBox(GroupMirror);
167 TextLabelZ = new QLabel(tr("SMESH_Z"), GroupMirror);
168 SpinBox_Z = new SMESHGUI_SpinBox(GroupMirror);
170 TextLabelVector = new QLabel(GroupMirror);
171 SelectVectorButton = new QPushButton(GroupMirror);
172 SelectVectorButton->setIcon(image3);
174 TextLabelDX = new QLabel(tr("SMESH_DX"), GroupMirror);
175 SpinBox_DX = new SMESHGUI_SpinBox(GroupMirror);
176 TextLabelDY = new QLabel(tr("SMESH_DY"), GroupMirror);
177 SpinBox_DY = new SMESHGUI_SpinBox(GroupMirror);
178 TextLabelDZ = new QLabel(tr("SMESH_DZ"), GroupMirror);
179 SpinBox_DZ = new SMESHGUI_SpinBox(GroupMirror);
181 GroupMirrorLayout->addWidget(TextLabelPoint, 0, 0);
182 GroupMirrorLayout->addWidget(SelectPointButton, 0, 1);
183 GroupMirrorLayout->addWidget(TextLabelX, 0, 2);
184 GroupMirrorLayout->addWidget(SpinBox_X, 0, 3);
185 GroupMirrorLayout->addWidget(TextLabelY, 0, 4);
186 GroupMirrorLayout->addWidget(SpinBox_Y, 0, 5);
187 GroupMirrorLayout->addWidget(TextLabelZ, 0, 6);
188 GroupMirrorLayout->addWidget(SpinBox_Z, 0, 7);
189 GroupMirrorLayout->addWidget(TextLabelVector, 1, 0);
190 GroupMirrorLayout->addWidget(SelectVectorButton, 1, 1);
191 GroupMirrorLayout->addWidget(TextLabelDX, 1, 2);
192 GroupMirrorLayout->addWidget(SpinBox_DX, 1, 3);
193 GroupMirrorLayout->addWidget(TextLabelDY, 1, 4);
194 GroupMirrorLayout->addWidget(SpinBox_DY, 1, 5);
195 GroupMirrorLayout->addWidget(TextLabelDZ, 1, 6);
196 GroupMirrorLayout->addWidget(SpinBox_DZ, 1, 7);
198 // switch of action type
199 ActionBox = new QGroupBox(GroupArguments);
200 ActionGroup = new QButtonGroup(GroupArguments);
201 QVBoxLayout* ActionBoxLayout = new QVBoxLayout(ActionBox);
202 ActionBoxLayout->addSpacing(SPACING);
203 ActionBoxLayout->setMargin(MARGIN);
205 QRadioButton* aMoveElements = new QRadioButton(tr("SMESH_MOVE_ELEMENTS"), ActionBox);
206 QRadioButton* aCopyElements = new QRadioButton(tr("SMESH_COPY_ELEMENTS"), ActionBox);
207 QRadioButton* aCreateMesh = new QRadioButton(tr("SMESH_CREATE_MESH"), ActionBox);
209 ActionBoxLayout->addWidget(aMoveElements);
210 ActionBoxLayout->addWidget(aCopyElements);
211 ActionBoxLayout->addWidget(aCreateMesh);
212 ActionGroup->addButton(aMoveElements, MOVE_ELEMS_BUTTON);
213 ActionGroup->addButton(aCopyElements, COPY_ELEMS_BUTTON);
214 ActionGroup->addButton(aCreateMesh, MAKE_MESH_BUTTON);
216 // CheckBox for groups generation
217 MakeGroupsCheck = new QCheckBox(tr("SMESH_MAKE_GROUPS"), GroupArguments);
218 MakeGroupsCheck->setChecked(false);
220 // Name of a mesh to create
221 LineEditNewMesh = new QLineEdit(GroupArguments);
225 myPreviewCheckBox = new QCheckBox(tr("PREVIEW"), GroupArguments);
228 GroupArgumentsLayout->addWidget(TextLabelElements, 0, 0);
229 GroupArgumentsLayout->addWidget(SelectElementsButton, 0, 1);
230 GroupArgumentsLayout->addWidget(LineEditElements, 0, 2, 1, 1);
231 GroupArgumentsLayout->addWidget(myFilterBtn, 0, 3);
232 GroupArgumentsLayout->addWidget(CheckBoxMesh, 1, 0, 1, 4);
233 GroupArgumentsLayout->addWidget(GroupMirror, 2, 0, 1, 4);
234 GroupArgumentsLayout->addWidget(ActionBox, 3, 0, 3, 3);
235 GroupArgumentsLayout->addWidget(MakeGroupsCheck, 4, 3);
236 GroupArgumentsLayout->addWidget(LineEditNewMesh, 5, 3);
237 GroupArgumentsLayout->addWidget(myPreviewCheckBox, 6, 0);
239 /***************************************************************/
240 GroupButtons = new QGroupBox(this);
241 QHBoxLayout* GroupButtonsLayout = new QHBoxLayout(GroupButtons);
242 GroupButtonsLayout->setSpacing(SPACING);
243 GroupButtonsLayout->setMargin(MARGIN);
245 buttonOk = new QPushButton(tr("SMESH_BUT_APPLY_AND_CLOSE"), GroupButtons);
246 buttonOk->setAutoDefault(true);
247 buttonOk->setDefault(true);
248 buttonApply = new QPushButton(tr("SMESH_BUT_APPLY"), GroupButtons);
249 buttonApply->setAutoDefault(true);
250 buttonCancel = new QPushButton(tr("SMESH_BUT_CLOSE"), GroupButtons);
251 buttonCancel->setAutoDefault(true);
252 buttonHelp = new QPushButton(tr("SMESH_BUT_HELP"), GroupButtons);
253 buttonHelp->setAutoDefault(true);
255 GroupButtonsLayout->addWidget(buttonOk);
256 GroupButtonsLayout->addSpacing(10);
257 GroupButtonsLayout->addWidget(buttonApply);
258 GroupButtonsLayout->addSpacing(10);
259 GroupButtonsLayout->addStretch();
260 GroupButtonsLayout->addWidget(buttonCancel);
261 GroupButtonsLayout->addWidget(buttonHelp);
263 /***************************************************************/
264 SMESHGUI_SymmetryDlgLayout->addWidget(ConstructorsBox);
265 SMESHGUI_SymmetryDlgLayout->addWidget(GroupArguments);
266 SMESHGUI_SymmetryDlgLayout->addWidget(GroupButtons);
268 /* Initialisations */
269 SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
270 SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
271 SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
272 SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
273 SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
274 SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
276 RadioButton1->setChecked(true);
278 mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
280 mySMESHGUI->SetActiveDialogBox((QDialog*)this);
282 // Costruction of the logical filter
283 SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
284 SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (SMESH::GROUP);
286 QList<SUIT_SelectionFilter*> aListOfFilters;
287 if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
288 if (aSmeshGroupFilter) aListOfFilters.append(aSmeshGroupFilter);
290 myMeshOrSubMeshOrGroupFilter =
291 new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR);
293 myHelpFileName = "symmetry_page.html";
297 /* signals and slots connections */
298 connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
299 connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
300 connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
301 connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
302 connect(GroupConstructors, SIGNAL(buttonClicked(int)), SLOT(ConstructorsClicked(int)));
304 connect(SelectElementsButton, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
305 connect(SelectPointButton, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
306 connect(SelectVectorButton, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
308 connect(SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(onVectorChanged()));
309 connect(SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(onVectorChanged()));
310 connect(SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(onVectorChanged()));
312 connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
313 connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
314 /* to close dialog if study change */
315 connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
316 connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), this, SLOT(onOpenView()));
317 connect(mySMESHGUI, SIGNAL(SignalCloseView()), this, SLOT(onCloseView()));
319 connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
320 connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
321 connect(ActionGroup, SIGNAL(buttonClicked(int)), SLOT(onActionClicked(int)));
323 connect(SpinBox_X, SIGNAL(valueChanged(double)), this, SLOT(toDisplaySimulation()));
324 connect(SpinBox_Y, SIGNAL(valueChanged(double)), this, SLOT(toDisplaySimulation()));
325 connect(SpinBox_Z, SIGNAL(valueChanged(double)), this, SLOT(toDisplaySimulation()));
326 connect(SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(toDisplaySimulation()));
327 connect(SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(toDisplaySimulation()));
328 connect(SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(toDisplaySimulation()));
330 //To Connect preview check box
331 connectPreviewControl();
333 ConstructorsClicked(0);
334 SelectionIntoArgument();
335 onActionClicked(MOVE_ELEMS_BUTTON);
338 //=================================================================================
339 // function : ~SMESHGUI_SymmetryDlg()
340 // purpose : Destroys the object and frees any allocated resources
341 //=================================================================================
342 SMESHGUI_SymmetryDlg::~SMESHGUI_SymmetryDlg()
344 if ( myFilterDlg != 0 ) {
345 myFilterDlg->setParent( 0 );
350 //=================================================================================
353 //=================================================================================
354 void SMESHGUI_SymmetryDlg::Init (bool ResetControls)
359 myObjectsNames.clear();
361 myEditCurrentArgument = 0;
362 LineEditElements->clear();
366 buttonOk->setEnabled(false);
367 buttonApply->setEnabled(false);
372 SpinBox_X->SetValue(0.0);
373 SpinBox_Y->SetValue(0.0);
374 SpinBox_Z->SetValue(0.0);
375 SpinBox_DX->SetValue(0.0);
376 SpinBox_DY->SetValue(0.0);
377 SpinBox_DZ->SetValue(0.0);
379 ActionGroup->button( MOVE_ELEMS_BUTTON )->setChecked(true);
380 CheckBoxMesh->setChecked(false);
381 myPreviewCheckBox->setChecked(false);
382 onDisplaySimulation(false);
384 // MakeGroupsCheck->setChecked(false);
385 // MakeGroupsCheck->setEnabled(false);
390 //=================================================================================
391 // function : ConstructorsClicked()
392 // purpose : Radio button management
393 //=================================================================================
394 void SMESHGUI_SymmetryDlg::ConstructorsClicked (int constructorId)
396 disconnect(mySelectionMgr, 0, this, 0);
398 if (constructorId != 0 && !TextLabelVector->isVisible()) {
399 TextLabelVector->show();
400 SelectVectorButton->show();
409 switch (constructorId) {
412 GroupMirror->setTitle(tr("SMESH_POINT"));
414 TextLabelVector->hide();
415 SelectVectorButton->hide();
426 GroupMirror->setTitle(tr("SMESH_AXIS"));
427 TextLabelVector->setText(tr("SMESH_VECTOR"));
432 GroupMirror->setTitle(tr("SMESH_PLANE"));
433 TextLabelVector->setText(tr("SMESH_NORMAL"));
438 if (myEditCurrentArgument != (QWidget*)LineEditElements) {
439 SMESH::SetPointRepresentation(false);
440 if (!CheckBoxMesh->isChecked())
442 if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
443 aViewWindow->SetSelectionMode(CellSelection);
447 myEditCurrentArgument = (QWidget*)LineEditElements;
448 LineEditElements->setFocus();
450 if (CheckBoxMesh->isChecked())
453 connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
455 onDisplaySimulation(true);
457 QApplication::instance()->processEvents();
458 myEditCurrentArgument->hide();
459 myEditCurrentArgument->show();
464 //=================================================================================
465 // function : ClickOnApply()
467 //=================================================================================
468 bool SMESHGUI_SymmetryDlg::ClickOnApply()
470 if (mySMESHGUI->isActiveStudyLocked())
476 if (myNbOkElements && IsMirrorOk()) {
477 QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
479 SMESH::long_array_var anElementsId = new SMESH::long_array;
481 anElementsId->length(aListElementsId.count());
482 for (int i = 0; i < aListElementsId.count(); i++)
483 anElementsId[i] = aListElementsId[i].toInt();
485 SMESH::AxisStruct aMirror;
486 SMESH::SMESH_MeshEditor::MirrorType aMirrorType;
487 getMirror(aMirror,aMirrorType);
489 QStringList aParameters;
490 aParameters << SpinBox_X->text();
491 aParameters << SpinBox_Y->text();
492 aParameters << SpinBox_Z->text();
493 aParameters << ( GetConstructorId() == 0 ? QString::number(0) : SpinBox_DX->text() );
494 aParameters << ( GetConstructorId() == 0 ? QString::number(0) : SpinBox_DY->text() );
495 aParameters << ( GetConstructorId() == 0 ? QString::number(0) : SpinBox_DZ->text() );
497 int actionButton = ActionGroup->checkedId();
498 bool makeGroups = ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() );
499 QStringList anEntryList;
501 SUIT_OverrideCursor aWaitCursor;
503 switch ( actionButton ) {
504 case MOVE_ELEMS_BUTTON: {
505 if(CheckBoxMesh->isChecked())
506 for ( int i = 0; i < myObjects.count(); i++ ) {
507 SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
508 myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
509 aMeshEditor->MirrorObject(myObjects[i], aMirror, aMirrorType, false );
512 SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
513 myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
514 aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, false );
518 case COPY_ELEMS_BUTTON: {
519 SMESH::ListOfGroups_var groups;
521 if(CheckBoxMesh->isChecked())
522 for ( int i = 0; i < myObjects.count(); i++ ) {
523 SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
524 myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
525 groups = aMeshEditor->MirrorObjectMakeGroups(myObjects[i], aMirror, aMirrorType);
528 SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
529 myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
530 groups = aMeshEditor->MirrorMakeGroups(anElementsId, aMirror, aMirrorType);
534 if(CheckBoxMesh->isChecked())
535 for ( int i = 0; i < myObjects.count(); i++ ) {
536 SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
537 myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
538 aMeshEditor->MirrorObject(myObjects[i], aMirror, aMirrorType, true);
541 SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
542 myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
543 aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, true);
548 case MAKE_MESH_BUTTON: {
549 SMESH::SMESH_Mesh_var mesh;
550 if (CheckBoxMesh->isChecked())
551 for ( int i = 0; i < myObjects.count(); i++ ) {
552 QString aName = SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] ) );
553 SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
554 myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
555 mesh = aMeshEditor->MirrorObjectMakeMesh(myObjects[i], aMirror, aMirrorType, makeGroups,
556 aName.toLatin1().data());
557 if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
558 anEntryList.append( aSObject->GetID().c_str() );
561 SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
562 myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
563 mesh = aMeshEditor->MirrorMakeMesh(anElementsId, aMirror, aMirrorType, makeGroups,
564 LineEditNewMesh->text().toLatin1().data());
565 if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
566 anEntryList.append( aSObject->GetID().c_str() );
574 for ( int i = 0; i < myObjects.count(); i++ ) {
575 SMESH_Actor* actor = SMESH::FindActorByObject( myObjects[i] );
576 if ( actor ) SMESH::Update( actor->getIO(), true );
579 if ( ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ) ||
580 actionButton == MAKE_MESH_BUTTON ) {
581 mySMESHGUI->updateObjBrowser(true); // new groups may appear
582 if( LightApp_Application* anApp =
583 dynamic_cast<LightApp_Application*>( SUIT_Session::session()->activeApplication() ) )
584 anApp->browseObjects( anEntryList, isApplyAndClose() );
587 ConstructorsClicked(GetConstructorId());
588 SelectionIntoArgument();
590 SMESHGUI::Modified();
595 //=================================================================================
596 // function : ClickOnOk()
598 //=================================================================================
599 void SMESHGUI_SymmetryDlg::ClickOnOk()
601 setIsApplyAndClose( true );
606 //=================================================================================
607 // function : reject()
609 //=================================================================================
610 void SMESHGUI_SymmetryDlg::reject()
612 disconnect(mySelectionMgr, 0, this, 0);
613 mySelectionMgr->clearFilters();
614 //mySelectionMgr->clearSelected();
615 if (SMESH::GetCurrentVtkView()) {
616 SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
617 SMESH::SetPointRepresentation(false);
619 if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
620 aViewWindow->SetSelectionMode(ActorSelection);
621 mySMESHGUI->ResetState();
625 //=================================================================================
626 // function : onOpenView()
628 //=================================================================================
629 void SMESHGUI_SymmetryDlg::onOpenView()
632 SMESH::SetPointRepresentation(false);
635 mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
636 ActivateThisDialog();
640 //=================================================================================
641 // function : onCloseView()
643 //=================================================================================
644 void SMESHGUI_SymmetryDlg::onCloseView()
646 DeactivateActiveDialog();
650 //=================================================================================
651 // function : ClickOnHelp()
653 //=================================================================================
654 void SMESHGUI_SymmetryDlg::ClickOnHelp()
656 LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
658 app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
662 platform = "winapplication";
664 platform = "application";
666 SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
667 tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
668 arg(app->resourceMgr()->stringValue("ExternalBrowser",
670 arg(myHelpFileName));
674 //=======================================================================
675 // function : onTextChange()
677 //=======================================================================
678 void SMESHGUI_SymmetryDlg::onTextChange (const QString& theNewText)
680 QLineEdit* send = (QLineEdit*)sender();
685 if (send == LineEditElements)
688 buttonOk->setEnabled(false);
689 buttonApply->setEnabled(false);
691 // hilight entered elements
692 SMDS_Mesh* aMesh = 0;
694 aMesh = myActor->GetObject()->GetMesh();
697 Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
699 TColStd_MapOfInteger newIndices;
701 QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
703 if (send == LineEditElements) {
704 for (int i = 0; i < aListId.count(); i++) {
705 const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
707 newIndices.Add(e->GetID());
711 mySelector->AddOrRemoveIndex( anIO, newIndices, false );
712 if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
713 aViewWindow->highlight( anIO, true, true );
715 myElementsId = theNewText;
719 if (myNbOkElements && IsMirrorOk()) {
720 buttonOk->setEnabled(true);
721 buttonApply->setEnabled(true);
727 //=================================================================================
728 // function : SelectionIntoArgument()
729 // purpose : Called when selection as changed or other case
730 //=================================================================================
731 void SMESHGUI_SymmetryDlg::SelectionIntoArgument()
737 QString aString = "";
738 onDisplaySimulation(false);
741 if (myEditCurrentArgument == (QWidget*)LineEditElements) {
742 LineEditElements->setText(aString);
744 buttonOk->setEnabled(false);
745 buttonApply->setEnabled(false);
749 if (!GroupButtons->isEnabled()) // inactive
754 mySelectionMgr->selectedObjects(aList);
756 int nbSel = aList.Extent();
762 if (myEditCurrentArgument == (QWidget*)LineEditElements) {
765 myObjectsNames.clear();
768 for ( SALOME_ListIteratorOfListIO it( aList ); it.More(); it.Next() ) {
769 Handle(SALOME_InteractiveObject) IO = it.Value();
771 SMESH::SMESH_Mesh_var aMesh = SMESH::GetMeshByIO( IO );
772 if( aMesh->_is_nil() )
775 myActor = SMESH::FindActorByObject( aMesh );
777 myActor = SMESH::FindActorByEntry( IO->getEntry() );
778 if ( !myActor && !CheckBoxMesh->isChecked() )
781 if ( !SMESH::IObjectToInterface<SMESH::SMESH_IDSource>( IO )->_is_nil() ) {
782 if ( _PTR(Study) aStudy = SMESH::GetActiveStudyDocument() ) {
783 _PTR(SObject) obj = aStudy->FindObjectID( qPrintable( QString( IO->getEntry() ) ) );
784 _PTR(GenericAttribute) anAttr;
785 if ( obj && obj->FindAttribute( anAttr, "AttributeName" ) ) {
786 _PTR(AttributeName) aNameAttr( anAttr );
787 myObjects << SMESH::IObjectToInterface<SMESH::SMESH_IDSource>( IO );
788 myObjectsNames << aNameAttr->Value().c_str();
795 // MakeGroups is available if there are groups and "Copy"
797 for ( int i = 0; i < myMeshes.count(); i++ )
798 aNbGroups += myMeshes[i]->NbGroups();
800 if ( aNbGroups == 0 ) {
801 MakeGroupsCheck->setChecked(false);
802 MakeGroupsCheck->setEnabled(false);
804 else if ( ActionGroup->checkedId() != MOVE_ELEMS_BUTTON ) {
805 MakeGroupsCheck->setEnabled(true);
807 if (CheckBoxMesh->isChecked()) {
808 SMESH::GetNameOfSelectedIObjects(mySelectionMgr, aString);
810 if ( myObjects.isEmpty() )
814 SMDS_Mesh* aSMDSMesh = myActor->GetObject()->GetMesh();
818 for (int i = aSMDSMesh->MinElementID(); i <= aSMDSMesh->MaxElementID(); i++) {
819 const SMDS_MeshElement * e = aSMDSMesh->FindElement(i);
821 myElementsId += QString(" %1").arg(i);
825 } else if (!SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO)->_is_nil()) { //SUBMESH
827 SMESH::SMESH_subMesh_var aSubMesh = SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO);
829 // get IDs from submesh
831 SMESH::long_array_var anElementsIds = new SMESH::long_array;
832 anElementsIds = aSubMesh->GetElementsId();
833 for (int i = 0; i < anElementsIds->length(); i++) {
834 myElementsId += QString(" %1").arg(anElementsIds[i]);
836 aNbUnits = anElementsIds->length();
839 SMESH::SMESH_GroupBase_var aGroup =
840 SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(IO);
841 if (aGroup->_is_nil())
844 // get IDs from smesh group
845 SMESH::long_array_var anElementsIds = new SMESH::long_array;
846 anElementsIds = aGroup->GetListOfID();
847 for (int i = 0; i < anElementsIds->length(); i++) {
848 myElementsId += QString(" %1").arg(anElementsIds[i]);
850 aNbUnits = anElementsIds->length();
854 aNbUnits = SMESH::GetNameOfSelectedElements( mySelector, aList.First(), aString);
855 myElementsId = aString;
860 myNbOkElements = true;
862 Handle(SALOME_InteractiveObject) IO = aList.First();
863 if ((SMESH::GetMeshByIO(IO))->_is_nil())
866 SMESH_Actor* anActor = SMESH::FindActorByObject(SMESH::GetMeshByIO(IO));
868 anActor = SMESH::FindActorByEntry(IO->getEntry());
869 if (!anActor && !CheckBoxMesh->isChecked())
872 aNbUnits = SMESH::GetNameOfSelectedNodes(mySelector, IO, aString);
876 SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
880 const SMDS_MeshNode * n = aMesh->FindNode(aString.toInt());
888 if (myEditCurrentArgument == (QWidget*)SpinBox_X) {
889 SpinBox_X->SetValue(x);
890 SpinBox_Y->SetValue(y);
891 SpinBox_Z->SetValue(z);
892 } else if (myEditCurrentArgument == (QWidget*)SpinBox_DX) {
893 SpinBox_DX->SetValue(x - SpinBox_X->GetValue());
894 SpinBox_DY->SetValue(y - SpinBox_Y->GetValue());
895 SpinBox_DZ->SetValue(z - SpinBox_Z->GetValue());
900 if (myEditCurrentArgument == (QWidget*)LineEditElements) {
901 LineEditElements->setText(aString);
902 LineEditElements->repaint();
903 LineEditElements->setEnabled(false); // to update lineedit IPAL 19809
904 LineEditElements->setEnabled(true);
910 if (myNbOkElements && IsMirrorOk()) {
911 buttonOk->setEnabled(true);
912 buttonApply->setEnabled(true);
914 onDisplaySimulation(true);
917 //=================================================================================
918 // function : SetEditCurrentArgument()
920 //=================================================================================
921 void SMESHGUI_SymmetryDlg::SetEditCurrentArgument()
923 QPushButton* send = (QPushButton*)sender();
925 disconnect(mySelectionMgr, 0, this, 0);
926 mySelectionMgr->clearSelected();
927 mySelectionMgr->clearFilters();
929 if (send == SelectElementsButton) {
930 myEditCurrentArgument = (QWidget*)LineEditElements;
931 SMESH::SetPointRepresentation(false);
932 if (CheckBoxMesh->isChecked()) {
933 if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
934 aViewWindow->SetSelectionMode(ActorSelection);
935 mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
937 if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
938 aViewWindow->SetSelectionMode(CellSelection);
940 } else if (send == SelectPointButton) {
941 myEditCurrentArgument = (QWidget*)SpinBox_X;
942 SMESH::SetPointRepresentation(true);
943 if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
944 aViewWindow->SetSelectionMode(NodeSelection);
945 } else if (send == SelectVectorButton) {
946 myEditCurrentArgument = (QWidget*)SpinBox_DX;
947 SMESH::SetPointRepresentation(true);
949 if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
950 aViewWindow->SetSelectionMode(NodeSelection);
954 myEditCurrentArgument->setFocus();
955 connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
956 SelectionIntoArgument();
959 //=================================================================================
960 // function : DeactivateActiveDialog()
962 //=================================================================================
963 void SMESHGUI_SymmetryDlg::DeactivateActiveDialog()
965 if (ConstructorsBox->isEnabled()) {
966 ConstructorsBox->setEnabled(false);
967 GroupArguments->setEnabled(false);
968 GroupButtons->setEnabled(false);
969 mySMESHGUI->ResetState();
970 mySMESHGUI->SetActiveDialogBox(0);
974 //=================================================================================
975 // function : ActivateThisDialog()
977 //=================================================================================
978 void SMESHGUI_SymmetryDlg::ActivateThisDialog()
980 /* Emit a signal to deactivate the active dialog */
981 mySMESHGUI->EmitSignalDeactivateDialog();
982 ConstructorsBox->setEnabled(true);
983 GroupArguments->setEnabled(true);
984 GroupButtons->setEnabled(true);
986 mySMESHGUI->SetActiveDialogBox((QDialog*)this);
988 if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
989 aViewWindow->SetSelectionMode(CellSelection);
990 SelectionIntoArgument();
993 //=================================================================================
994 // function : enterEvent()
996 //=================================================================================
997 void SMESHGUI_SymmetryDlg::enterEvent (QEvent*)
999 if (!ConstructorsBox->isEnabled()) {
1000 SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
1001 if ( aViewWindow && !mySelector) {
1002 mySelector = aViewWindow->GetSelector();
1004 ActivateThisDialog();
1008 //=======================================================================
1009 //function : onSelectMesh
1011 //=======================================================================
1012 void SMESHGUI_SymmetryDlg::onSelectMesh (bool toSelectMesh)
1015 TextLabelElements->setText(tr("SMESH_NAME"));
1017 TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
1018 myFilterBtn->setEnabled(!toSelectMesh);
1020 if (myEditCurrentArgument != LineEditElements) {
1021 LineEditElements->clear();
1025 mySelectionMgr->clearFilters();
1026 SMESH::SetPointRepresentation(false);
1029 if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
1030 aViewWindow->SetSelectionMode(ActorSelection);
1031 mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
1032 LineEditElements->setReadOnly(true);
1033 LineEditElements->setValidator(0);
1035 if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
1036 aViewWindow->SetSelectionMode(CellSelection);
1037 LineEditElements->setReadOnly(false);
1038 LineEditElements->setValidator(myIdValidator);
1039 onTextChange(LineEditElements->text());
1043 SelectionIntoArgument();
1046 //=================================================================================
1047 // function : GetConstructorId()
1049 //=================================================================================
1050 int SMESHGUI_SymmetryDlg::GetConstructorId()
1052 return GroupConstructors->checkedId();
1055 //=================================================================================
1056 // function : IsMirrorOk()
1058 //=================================================================================
1059 bool SMESHGUI_SymmetryDlg::IsMirrorOk()
1063 if (GetConstructorId() != 0)
1064 isOk = (SpinBox_DX->GetValue() != 0 ||
1065 SpinBox_DY->GetValue() != 0 ||
1066 SpinBox_DZ->GetValue() != 0);
1071 //=================================================================================
1072 // function : onVectorChanged()
1074 //=================================================================================
1075 void SMESHGUI_SymmetryDlg::onVectorChanged()
1078 buttonOk->setEnabled(true);
1079 buttonApply->setEnabled(true);
1081 buttonOk->setEnabled(false);
1082 buttonApply->setEnabled(false);
1086 //=======================================================================
1087 //function : onActionClicked
1088 //purpose : slot called when an action type changed
1089 //=======================================================================
1091 void SMESHGUI_SymmetryDlg::onActionClicked(int button)
1094 for ( int i = 0; i < myMeshes.count(); i++ )
1095 aNbGroups += myMeshes[i]->NbGroups();
1098 case MOVE_ELEMS_BUTTON:
1099 MakeGroupsCheck->setEnabled(false);
1100 LineEditNewMesh->setEnabled(false);
1102 case COPY_ELEMS_BUTTON:
1103 LineEditNewMesh->setEnabled(false);
1104 MakeGroupsCheck->setText( tr("SMESH_MAKE_GROUPS"));
1105 MakeGroupsCheck->setEnabled(myMeshes.isEmpty() || aNbGroups > 0);
1107 case MAKE_MESH_BUTTON:
1108 LineEditNewMesh->setEnabled(true);
1109 MakeGroupsCheck->setText( tr("SMESH_COPY_GROUPS"));
1110 MakeGroupsCheck->setEnabled(myMeshes.isEmpty() || aNbGroups > 0);
1114 toDisplaySimulation();
1117 //=======================================================================
1118 //function : setNewMeshName
1119 //purpose : update contents of LineEditNewMesh
1120 //=======================================================================
1122 void SMESHGUI_SymmetryDlg::setNewMeshName()
1124 LineEditNewMesh->setText("");
1125 if ( LineEditNewMesh->isEnabled() && !myMeshes.isEmpty() ) {
1127 if ( CheckBoxMesh->isChecked() ) {
1128 name = myObjects.count() > 1 ? "*" : LineEditElements->text();
1131 _PTR(SObject) meshSO = SMESH::FindSObject( myMeshes[0] );
1132 name = meshSO->GetName().c_str();
1134 if ( !name.isEmpty() )
1135 LineEditNewMesh->setText( SMESH::UniqueMeshName( name, "mirrored"));
1139 //=================================================================================
1140 // function : keyPressEvent()
1142 //=================================================================================
1143 void SMESHGUI_SymmetryDlg::keyPressEvent( QKeyEvent* e )
1145 QDialog::keyPressEvent( e );
1146 if ( e->isAccepted() )
1149 if ( e->key() == Qt::Key_F1 ) {
1155 //=================================================================================
1156 // function : setFilters()
1157 // purpose : SLOT. Called when "Filter" button pressed.
1158 //=================================================================================
1159 void SMESHGUI_SymmetryDlg::setFilters()
1161 if(myMeshes.isEmpty()) {
1162 SUIT_MessageBox::critical(this,
1164 tr("NO_MESH_SELECTED"));
1168 myFilterDlg = new SMESHGUI_FilterDlg( mySMESHGUI, SMESH::ALL );
1170 myFilterDlg->SetSelection();
1171 myFilterDlg->SetMesh( myMeshes[0] );
1172 myFilterDlg->SetSourceWg( LineEditElements );
1174 myFilterDlg->show();
1177 //=================================================================================
1178 // function : isValid
1180 //=================================================================================
1181 bool SMESHGUI_SymmetryDlg::isValid()
1186 ok = SpinBox_X->isValid( msg, true ) && ok;
1187 ok = SpinBox_Y->isValid( msg, true ) && ok;
1188 ok = SpinBox_Z->isValid( msg, true ) && ok;
1189 if (GetConstructorId() != 0) {
1190 ok = SpinBox_DX->isValid( msg, true ) && ok;
1191 ok = SpinBox_DY->isValid( msg, true ) && ok;
1192 ok = SpinBox_DZ->isValid( msg, true ) && ok;
1196 QString str( tr( "SMESH_INCORRECT_INPUT" ) );
1197 if ( !msg.isEmpty() )
1199 SUIT_MessageBox::critical( this, tr( "SMESH_ERROR" ), str );
1205 //=================================================================================
1206 // function : onDisplaySimulation
1207 // purpose : Show/Hide preview
1208 //=================================================================================
1209 void SMESHGUI_SymmetryDlg::onDisplaySimulation( bool toDisplayPreview ) {
1210 if (myPreviewCheckBox->isChecked() && toDisplayPreview) {
1211 if ( myNbOkElements && isValid() && IsMirrorOk() ) {
1212 QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
1213 SMESH::long_array_var anElementsId = new SMESH::long_array;
1215 anElementsId->length(aListElementsId.count());
1216 for (int i = 0; i < aListElementsId.count(); i++)
1217 anElementsId[i] = aListElementsId[i].toInt();
1219 SMESH::AxisStruct aMirror;
1220 SMESH::SMESH_MeshEditor::MirrorType aMirrorType;
1222 getMirror(aMirror,aMirrorType);
1225 bool copy = ( ActionGroup->checkedId() == COPY_ELEMS_BUTTON ||
1226 ActionGroup->checkedId() == MAKE_MESH_BUTTON );
1227 SUIT_OverrideCursor aWaitCursor;
1228 QList<SMESH::MeshPreviewStruct_var> aMeshPreviewStruct;
1229 if(CheckBoxMesh->isChecked())
1230 for ( int i = 0; i < myMeshes.count(); i++ ) {
1231 SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditPreviewer();
1232 aMeshEditor->MirrorObject(myObjects[i], aMirror, aMirrorType, copy );
1233 aMeshPreviewStruct << aMeshEditor->GetPreviewData();
1236 SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditPreviewer();
1237 aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, copy );
1238 aMeshPreviewStruct << aMeshEditor->GetPreviewData();
1240 setSimulationPreview(aMeshPreviewStruct);
1252 //=================================================================================
1253 // function : getMirror
1254 // purpose : return mirror parameters
1255 //=================================================================================
1256 void SMESHGUI_SymmetryDlg::getMirror(SMESH::AxisStruct& theMirror, SMESH::SMESH_MeshEditor::MirrorType& theMirrorType) {
1257 theMirror.x = SpinBox_X->GetValue();
1258 theMirror.y = SpinBox_Y->GetValue();
1259 theMirror.z = SpinBox_Z->GetValue();
1260 if (GetConstructorId() == 0) {
1261 theMirror.vx = theMirror.vy = theMirror.vz = 0;
1263 theMirror.vx = SpinBox_DX->GetValue();
1264 theMirror.vy = SpinBox_DY->GetValue();
1265 theMirror.vz = SpinBox_DZ->GetValue();
1267 if (GetConstructorId() == 0)
1268 theMirrorType = SMESH::SMESH_MeshEditor::POINT;
1269 if (GetConstructorId() == 1)
1270 theMirrorType = SMESH::SMESH_MeshEditor::AXIS;
1271 if (GetConstructorId() == 2)
1272 theMirrorType = SMESH::SMESH_MeshEditor::PLANE;