2004-12-01 15:48:31 +05:00
|
|
|
// SMESH SMESHGUI : GUI for SMESH component
|
|
|
|
//
|
|
|
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
2005-06-07 19:22:20 +06:00
|
|
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
|
|
|
//
|
|
|
|
// This library is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation; either
|
|
|
|
// version 2.1 of the License.
|
|
|
|
//
|
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this library; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
//
|
|
|
|
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
2004-12-01 15:48:31 +05:00
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// File : SMESHGUI_AddMeshElementDlg.cxx
|
|
|
|
// Author : Nicolas REJNERI
|
|
|
|
// Module : SMESH
|
|
|
|
// $Header$
|
|
|
|
|
|
|
|
#include "SMESHGUI_AddMeshElementDlg.h"
|
|
|
|
|
|
|
|
#include "SMESHGUI.h"
|
|
|
|
#include "SMESHGUI_Utils.h"
|
|
|
|
#include "SMESHGUI_VTKUtils.h"
|
|
|
|
#include "SMESHGUI_MeshUtils.h"
|
|
|
|
#include "SMESHGUI_IdValidator.h"
|
|
|
|
#include "SMESH_ActorUtils.h"
|
2005-06-07 19:22:20 +06:00
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
#include "SMDS_Mesh.hxx"
|
|
|
|
#include "SMESH_Actor.h"
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
#include "SUIT_Session.h"
|
|
|
|
|
|
|
|
#include "SVTK_Selection.h"
|
|
|
|
#include "SVTK_Selector.h"
|
|
|
|
#include "SALOME_ListIO.hxx"
|
|
|
|
#include "SALOME_ListIteratorOfListIO.hxx"
|
|
|
|
|
|
|
|
#include "SalomeApp_Study.h"
|
|
|
|
#include "SalomeApp_Application.h"
|
|
|
|
|
|
|
|
#include "SVTK_ViewModel.h"
|
|
|
|
#include "SVTK_ViewWindow.h"
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
#include "utilities.h"
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
// OCCT Includes
|
|
|
|
#include <TColStd_MapOfInteger.hxx>
|
|
|
|
#include <TColStd_IndexedMapOfInteger.hxx>
|
|
|
|
|
|
|
|
// VTK Includes
|
2004-12-01 15:48:31 +05:00
|
|
|
#include <vtkCell.h>
|
|
|
|
#include <vtkIdList.h>
|
|
|
|
#include <vtkIntArray.h>
|
|
|
|
#include <vtkCellArray.h>
|
|
|
|
#include <vtkUnsignedCharArray.h>
|
|
|
|
#include <vtkUnstructuredGrid.h>
|
|
|
|
#include <vtkDataSetMapper.h>
|
|
|
|
|
|
|
|
// QT Includes
|
|
|
|
#include <qbuttongroup.h>
|
|
|
|
#include <qgroupbox.h>
|
|
|
|
#include <qlabel.h>
|
|
|
|
#include <qlineedit.h>
|
|
|
|
#include <qpushbutton.h>
|
|
|
|
#include <qradiobutton.h>
|
|
|
|
#include <qlayout.h>
|
|
|
|
#include <qvariant.h>
|
|
|
|
#include <qtooltip.h>
|
|
|
|
#include <qwhatsthis.h>
|
|
|
|
#include <qimage.h>
|
|
|
|
#include <qpixmap.h>
|
|
|
|
#include <qcheckbox.h>
|
|
|
|
#include <qregexp.h>
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
// STL includes
|
2004-12-01 15:48:31 +05:00
|
|
|
#include <list>
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
namespace SMESH {
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
class TElementSimulation {
|
|
|
|
SalomeApp_Application* myApplication;
|
|
|
|
SUIT_ViewWindow* myViewWindow;
|
|
|
|
SVTK_ViewWindow* myVTKViewWindow;
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
SALOME_Actor* myPreviewActor;
|
2004-12-01 15:48:31 +05:00
|
|
|
vtkDataSetMapper* myMapper;
|
|
|
|
vtkUnstructuredGrid* myGrid;
|
|
|
|
|
|
|
|
public:
|
2005-06-07 19:22:20 +06:00
|
|
|
TElementSimulation (SalomeApp_Application* theApplication)
|
2004-12-01 15:48:31 +05:00
|
|
|
{
|
2005-06-07 19:22:20 +06:00
|
|
|
myApplication = theApplication;
|
|
|
|
SUIT_ViewManager* mgr = theApplication->activeViewManager();
|
|
|
|
if (!mgr) return;
|
|
|
|
myViewWindow = mgr->getActiveView();
|
|
|
|
myVTKViewWindow = GetVtkViewWindow(myViewWindow);
|
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
myGrid = vtkUnstructuredGrid::New();
|
2005-06-07 19:22:20 +06:00
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
// Create and display actor
|
|
|
|
myMapper = vtkDataSetMapper::New();
|
2005-06-07 19:22:20 +06:00
|
|
|
myMapper->SetInput(myGrid);
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
myPreviewActor = SALOME_Actor::New();
|
|
|
|
myPreviewActor->PickableOff();
|
|
|
|
myPreviewActor->VisibilityOff();
|
2005-06-07 19:22:20 +06:00
|
|
|
myPreviewActor->SetMapper(myMapper);
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
vtkProperty* aProp = vtkProperty::New();
|
|
|
|
float anRGB[3];
|
|
|
|
anRGB[0] = GetFloat("SMESH:SettingsFillColorRed", 0)/255.;
|
|
|
|
anRGB[1] = GetFloat("SMESH:SettingsFillColorGreen", 170)/255.;
|
|
|
|
anRGB[2] = GetFloat("SMESH:SettingsFillColorBlue", 255)/255.;
|
|
|
|
aProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
|
2005-06-07 19:22:20 +06:00
|
|
|
myPreviewActor->SetProperty(aProp);
|
2004-12-01 15:48:31 +05:00
|
|
|
aProp->Delete();
|
|
|
|
|
|
|
|
vtkProperty* aBackProp = vtkProperty::New();
|
|
|
|
anRGB[0] = GetFloat("SMESH:SettingsBackFaceColorRed", 0)/255.;
|
|
|
|
anRGB[1] = GetFloat("SMESH:SettingsBackFaceColorGreen", 0)/255.;
|
|
|
|
anRGB[2] = GetFloat("SMESH:SettingsBackFaceColorBlue", 255)/255.;
|
|
|
|
aBackProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
|
2005-06-07 19:22:20 +06:00
|
|
|
myPreviewActor->SetBackfaceProperty(aBackProp);
|
2004-12-01 15:48:31 +05:00
|
|
|
aBackProp->Delete();
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
myVTKViewWindow->AddActor(myPreviewActor);
|
2004-12-01 15:48:31 +05:00
|
|
|
}
|
|
|
|
|
2005-02-03 12:43:07 +05:00
|
|
|
typedef std::vector<vtkIdType> TVTKIds;
|
2005-06-07 19:22:20 +06:00
|
|
|
void SetPosition (SMESH_Actor* theActor,
|
|
|
|
vtkIdType theType,
|
|
|
|
const TVTKIds& theIds)
|
2004-12-01 15:48:31 +05:00
|
|
|
{
|
|
|
|
vtkUnstructuredGrid *aGrid = theActor->GetUnstructuredGrid();
|
|
|
|
myGrid->SetPoints(aGrid->GetPoints());
|
|
|
|
|
2005-02-03 12:43:07 +05:00
|
|
|
const int* aConn = NULL;
|
2005-06-07 19:22:20 +06:00
|
|
|
switch (theType) {
|
|
|
|
case VTK_TETRA:
|
|
|
|
{
|
|
|
|
static int anIds[] = {0,2,1,3};
|
|
|
|
aConn = anIds;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case VTK_PYRAMID:
|
|
|
|
{
|
|
|
|
static int anIds[] = {0,3,2,1,4};
|
|
|
|
aConn = anIds;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case VTK_HEXAHEDRON:
|
|
|
|
{
|
|
|
|
static int anIds[] = {0,3,2,1,4,7,6,5};
|
|
|
|
aConn = anIds;
|
|
|
|
break;
|
|
|
|
}
|
2005-02-03 12:43:07 +05:00
|
|
|
}
|
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
myGrid->Reset();
|
|
|
|
vtkIdList *anIds = vtkIdList::New();
|
2005-02-03 12:43:07 +05:00
|
|
|
|
|
|
|
if(aConn)
|
|
|
|
for (int i = 0, iEnd = theIds.size(); i < iEnd; i++)
|
|
|
|
anIds->InsertId(i,theIds[aConn[i]]);
|
|
|
|
else
|
|
|
|
for (int i = 0, iEnd = theIds.size(); i < iEnd; i++)
|
|
|
|
anIds->InsertId(i,theIds[i]);
|
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
myGrid->InsertNextCell(theType,anIds);
|
|
|
|
anIds->Delete();
|
|
|
|
|
|
|
|
myGrid->Modified();
|
|
|
|
|
|
|
|
SetVisibility(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
void SetVisibility (bool theVisibility)
|
|
|
|
{
|
2004-12-01 15:48:31 +05:00
|
|
|
myPreviewActor->SetVisibility(theVisibility);
|
|
|
|
RepaintCurrentView();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
~TElementSimulation()
|
|
|
|
{
|
|
|
|
if (FindVtkViewWindow(myApplication->activeViewManager(), myViewWindow)) {
|
|
|
|
myVTKViewWindow->RemoveActor(myPreviewActor);
|
2004-12-01 15:48:31 +05:00
|
|
|
}
|
|
|
|
myPreviewActor->Delete();
|
|
|
|
|
|
|
|
myMapper->RemoveAllInputs();
|
|
|
|
myMapper->Delete();
|
|
|
|
|
|
|
|
myGrid->Delete();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
//=================================================================================
|
2005-06-07 19:22:20 +06:00
|
|
|
// function : SMESHGUI_AddMeshElementDlg()
|
|
|
|
// purpose : constructor
|
2004-12-01 15:48:31 +05:00
|
|
|
//=================================================================================
|
2005-06-07 19:22:20 +06:00
|
|
|
SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( SMESHGUI* theModule,
|
|
|
|
const char* name,
|
|
|
|
SMDSAbs_ElementType ElementType, int nbNodes,
|
|
|
|
bool modal, WFlags fl)
|
|
|
|
: QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder |
|
|
|
|
WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
|
|
|
|
mySMESHGUI( theModule ),
|
|
|
|
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
|
|
|
|
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
|
|
|
mySelector( myViewWindow->GetSelector() )
|
2004-12-01 15:48:31 +05:00
|
|
|
{
|
2005-06-07 19:22:20 +06:00
|
|
|
SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>
|
|
|
|
(SUIT_Session::session()->activeApplication());
|
|
|
|
myIsPoly = false;
|
|
|
|
mySimulation = new SMESH::TElementSimulation (anApp);
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
// verify nb nodes and type
|
|
|
|
myNbNodes = nbNodes;
|
|
|
|
myElementType = ElementType;
|
2005-06-07 19:22:20 +06:00
|
|
|
switch (ElementType) {
|
2004-12-01 15:48:31 +05:00
|
|
|
case SMDSAbs_Face:
|
2005-06-07 19:22:20 +06:00
|
|
|
// if (myNbNodes != 3 && myNbNodes != 4)
|
|
|
|
// myNbNodes = 3;
|
|
|
|
// break;
|
2004-12-01 15:48:31 +05:00
|
|
|
case SMDSAbs_Volume:
|
2005-06-07 19:22:20 +06:00
|
|
|
// if (myNbNodes != 4 && myNbNodes != 8) //(nbNodes < 4 || nbNodes > 8 || nbNodes == 7)
|
|
|
|
// myNbNodes = 4;
|
2004-12-01 15:48:31 +05:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
myElementType = SMDSAbs_Edge;
|
|
|
|
myNbNodes = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString elemName;
|
2005-06-07 19:22:20 +06:00
|
|
|
if (myNbNodes == 2)
|
|
|
|
elemName = "EDGE";
|
|
|
|
else if (myNbNodes == 3)
|
|
|
|
elemName = "TRIANGLE";
|
|
|
|
else if (myNbNodes == 4)
|
|
|
|
if (myElementType == SMDSAbs_Face)
|
|
|
|
elemName = "QUADRANGLE";
|
|
|
|
else
|
|
|
|
elemName = "TETRAS";
|
|
|
|
else if (myNbNodes == 8)
|
2004-12-01 15:48:31 +05:00
|
|
|
elemName = "HEXAS";
|
2005-06-07 19:22:20 +06:00
|
|
|
else if (myElementType == SMDSAbs_Face){
|
|
|
|
elemName = "POLYGON";
|
|
|
|
myIsPoly = true;
|
2004-12-01 15:48:31 +05:00
|
|
|
}
|
2005-06-07 19:22:20 +06:00
|
|
|
|
|
|
|
QString iconName = tr(QString("ICON_DLG_%1").arg(elemName));
|
|
|
|
QString buttonGrTitle = tr(QString("SMESH_%1").arg(elemName));
|
|
|
|
QString caption = tr(QString("SMESH_ADD_%1_TITLE").arg(elemName));
|
|
|
|
QString grBoxTitle = tr(QString("SMESH_ADD_%1").arg(elemName));
|
|
|
|
|
2005-06-08 16:45:19 +06:00
|
|
|
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", iconName));
|
|
|
|
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
if (!name)
|
|
|
|
setName("SMESHGUI_AddMeshElementDlg");
|
|
|
|
resize(303, 185);
|
|
|
|
setCaption(caption);
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
setSizeGripEnabled(TRUE);
|
|
|
|
SMESHGUI_AddMeshElementDlgLayout = new QGridLayout(this);
|
|
|
|
SMESHGUI_AddMeshElementDlgLayout->setSpacing(6);
|
|
|
|
SMESHGUI_AddMeshElementDlgLayout->setMargin(11);
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
/***************************************************************/
|
2005-06-07 19:22:20 +06:00
|
|
|
GroupConstructors = new QButtonGroup(this, "GroupConstructors");
|
|
|
|
GroupConstructors->setTitle(buttonGrTitle);
|
|
|
|
|
|
|
|
GroupConstructors->setExclusive(TRUE);
|
|
|
|
GroupConstructors->setColumnLayout(0, Qt::Vertical);
|
|
|
|
GroupConstructors->layout()->setSpacing(0);
|
|
|
|
GroupConstructors->layout()->setMargin(0);
|
|
|
|
GroupConstructorsLayout = new QGridLayout(GroupConstructors->layout());
|
|
|
|
GroupConstructorsLayout->setAlignment(Qt::AlignTop);
|
|
|
|
GroupConstructorsLayout->setSpacing(6);
|
|
|
|
GroupConstructorsLayout->setMargin(11);
|
|
|
|
Constructor1 = new QRadioButton(GroupConstructors, "Constructor1");
|
|
|
|
Constructor1->setText(tr("" ));
|
|
|
|
Constructor1->setPixmap(image0);
|
|
|
|
Constructor1->setChecked(TRUE);
|
|
|
|
Constructor1->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, Constructor1->sizePolicy().hasHeightForWidth()));
|
|
|
|
Constructor1->setMinimumSize(QSize(50, 0));
|
|
|
|
GroupConstructorsLayout->addWidget(Constructor1, 0, 0);
|
|
|
|
QSpacerItem* spacer = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
|
|
|
GroupConstructorsLayout->addItem(spacer, 0, 1);
|
|
|
|
SMESHGUI_AddMeshElementDlgLayout->addWidget(GroupConstructors, 0, 0);
|
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
/***************************************************************/
|
2005-06-07 19:22:20 +06:00
|
|
|
GroupButtons = new QGroupBox(this, "GroupButtons");
|
|
|
|
GroupButtons->setGeometry(QRect(10, 10, 281, 48));
|
|
|
|
GroupButtons->setTitle(tr("" ));
|
|
|
|
GroupButtons->setColumnLayout(0, Qt::Vertical);
|
|
|
|
GroupButtons->layout()->setSpacing(0);
|
|
|
|
GroupButtons->layout()->setMargin(0);
|
|
|
|
GroupButtonsLayout = new QGridLayout(GroupButtons->layout());
|
|
|
|
GroupButtonsLayout->setAlignment(Qt::AlignTop);
|
|
|
|
GroupButtonsLayout->setSpacing(6);
|
|
|
|
GroupButtonsLayout->setMargin(11);
|
|
|
|
buttonCancel = new QPushButton(GroupButtons, "buttonCancel");
|
|
|
|
buttonCancel->setText(tr("SMESH_BUT_CLOSE" ));
|
|
|
|
buttonCancel->setAutoDefault(TRUE);
|
|
|
|
GroupButtonsLayout->addWidget(buttonCancel, 0, 3);
|
|
|
|
buttonApply = new QPushButton(GroupButtons, "buttonApply");
|
|
|
|
buttonApply->setText(tr("SMESH_BUT_APPLY" ));
|
|
|
|
buttonApply->setAutoDefault(TRUE);
|
|
|
|
GroupButtonsLayout->addWidget(buttonApply, 0, 1);
|
|
|
|
QSpacerItem* spacer_9 = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
|
|
|
GroupButtonsLayout->addItem(spacer_9, 0, 2);
|
|
|
|
buttonOk = new QPushButton(GroupButtons, "buttonOk");
|
|
|
|
buttonOk->setText(tr("SMESH_BUT_OK" ));
|
|
|
|
buttonOk->setAutoDefault(TRUE);
|
|
|
|
buttonOk->setDefault(TRUE);
|
|
|
|
GroupButtonsLayout->addWidget(buttonOk, 0, 0);
|
|
|
|
SMESHGUI_AddMeshElementDlgLayout->addWidget(GroupButtons, 2, 0);
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
/***************************************************************/
|
2005-06-07 19:22:20 +06:00
|
|
|
GroupC1 = new QGroupBox(this, "GroupC1");
|
|
|
|
GroupC1->setTitle(grBoxTitle);
|
|
|
|
|
|
|
|
GroupC1->setMinimumSize(QSize(0, 0));
|
|
|
|
GroupC1->setFrameShape(QGroupBox::Box);
|
|
|
|
GroupC1->setFrameShadow(QGroupBox::Sunken);
|
|
|
|
GroupC1->setColumnLayout(0, Qt::Vertical);
|
|
|
|
GroupC1->layout()->setSpacing(0);
|
|
|
|
GroupC1->layout()->setMargin(0);
|
|
|
|
GroupC1Layout = new QGridLayout(GroupC1->layout());
|
|
|
|
GroupC1Layout->setAlignment(Qt::AlignTop);
|
|
|
|
GroupC1Layout->setSpacing(6);
|
|
|
|
GroupC1Layout->setMargin(11);
|
|
|
|
TextLabelC1A1 = new QLabel(GroupC1, "TextLabelC1A1");
|
|
|
|
TextLabelC1A1->setText(tr("SMESH_ID_NODES" ));
|
|
|
|
TextLabelC1A1->setMinimumSize(QSize(50, 0));
|
|
|
|
TextLabelC1A1->setFrameShape(QLabel::NoFrame);
|
|
|
|
TextLabelC1A1->setFrameShadow(QLabel::Plain);
|
|
|
|
GroupC1Layout->addWidget(TextLabelC1A1, 0, 0);
|
|
|
|
SelectButtonC1A1 = new QPushButton(GroupC1, "SelectButtonC1A1");
|
|
|
|
SelectButtonC1A1->setText(tr("" ));
|
|
|
|
SelectButtonC1A1->setPixmap(image1);
|
|
|
|
SelectButtonC1A1->setToggleButton(FALSE);
|
|
|
|
GroupC1Layout->addWidget(SelectButtonC1A1, 0, 1);
|
|
|
|
LineEditC1A1 = new QLineEdit(GroupC1, "LineEditC1A1");
|
|
|
|
// LineEditC1A1->setReadOnly(TRUE);
|
|
|
|
if (!myIsPoly)
|
|
|
|
LineEditC1A1->setValidator(new SMESHGUI_IdValidator(this, "validator", myNbNodes));
|
|
|
|
GroupC1Layout->addWidget(LineEditC1A1, 0, 2);
|
|
|
|
|
|
|
|
if (myElementType == SMDSAbs_Face) {
|
|
|
|
Reverse = new QCheckBox(GroupC1, "Reverse");
|
|
|
|
Reverse->setText(tr("SMESH_REVERSE" ));
|
|
|
|
GroupC1Layout->addWidget(Reverse, 1, 0);
|
2004-12-01 15:48:31 +05:00
|
|
|
}
|
|
|
|
else
|
|
|
|
Reverse = 0;
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
SMESHGUI_AddMeshElementDlgLayout->addWidget(GroupC1, 1, 0);
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
Init(); /* Initialisations */
|
2004-12-01 15:48:31 +05:00
|
|
|
}
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
// function : ~SMESHGUI_AddMeshElementDlg()
|
|
|
|
// purpose : Destroys the object and frees any allocated resources
|
|
|
|
//=================================================================================
|
|
|
|
SMESHGUI_AddMeshElementDlg::~SMESHGUI_AddMeshElementDlg()
|
|
|
|
{
|
2005-06-07 19:22:20 +06:00
|
|
|
// no need to delete child widgets, Qt does it all for us
|
2004-12-01 15:48:31 +05:00
|
|
|
delete mySimulation;
|
|
|
|
}
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
// function : Init()
|
|
|
|
// purpose :
|
|
|
|
//=================================================================================
|
2005-06-07 19:22:20 +06:00
|
|
|
void SMESHGUI_AddMeshElementDlg::Init()
|
2004-12-01 15:48:31 +05:00
|
|
|
{
|
|
|
|
GroupC1->show();
|
2005-06-07 19:22:20 +06:00
|
|
|
Constructor1->setChecked(TRUE);
|
|
|
|
myEditCurrentArgument = LineEditC1A1;
|
|
|
|
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
myNbOkNodes = 0;
|
2004-12-01 15:48:31 +05:00
|
|
|
myActor = 0;
|
|
|
|
|
|
|
|
/* signals and slots connections */
|
2005-06-07 19:22:20 +06:00
|
|
|
connect(buttonOk, SIGNAL(clicked()), SLOT(ClickOnOk()));
|
|
|
|
connect(buttonCancel, SIGNAL(clicked()), SLOT(ClickOnCancel()));
|
|
|
|
connect(buttonApply, SIGNAL(clicked()), SLOT(ClickOnApply()));
|
|
|
|
|
|
|
|
connect(SelectButtonC1A1, SIGNAL(clicked()), SLOT(SetEditCurrentArgument()));
|
|
|
|
connect(LineEditC1A1, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
|
|
|
|
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), SLOT(DeactivateActiveDialog()));
|
|
|
|
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(SelectionIntoArgument()));
|
2004-12-01 15:48:31 +05:00
|
|
|
/* to close dialog if study frame change */
|
2005-06-07 19:22:20 +06:00
|
|
|
connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), SLOT(ClickOnCancel()));
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
if (Reverse)
|
|
|
|
connect(Reverse, SIGNAL(stateChanged(int)), SLOT(CheckBox(int)));
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
// Move widget on the botton right corner of main widget
|
|
|
|
int x, y;
|
|
|
|
mySMESHGUI->DefineDlgPosition(this, x, y);
|
|
|
|
this->move(x, y);
|
|
|
|
this->show(); // displays Dialog
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
// set selection mode
|
|
|
|
SMESH::SetPointRepresentation(true);
|
2005-06-07 19:22:20 +06:00
|
|
|
|
|
|
|
myViewWindow->SetSelectionMode( NodeSelection );
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
myBusy = false;
|
2005-06-07 19:22:20 +06:00
|
|
|
|
2005-03-16 18:22:18 +05:00
|
|
|
SelectionIntoArgument();
|
2004-12-01 15:48:31 +05:00
|
|
|
}
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
// function : ClickOnApply()
|
|
|
|
// purpose :
|
|
|
|
//=================================================================================
|
|
|
|
void SMESHGUI_AddMeshElementDlg::ClickOnApply()
|
|
|
|
{
|
2005-06-07 19:22:20 +06:00
|
|
|
if (myNbOkNodes && !mySMESHGUI->isActiveStudyLocked()) {
|
2004-12-01 15:48:31 +05:00
|
|
|
myBusy = true;
|
|
|
|
SMESH::long_array_var anArrayOfIdeces = new SMESH::long_array;
|
2005-06-07 19:22:20 +06:00
|
|
|
anArrayOfIdeces->length(myNbNodes);
|
|
|
|
bool reverse = (Reverse && Reverse->isChecked());
|
|
|
|
QStringList aListId = QStringList::split(" ", myEditCurrentArgument->text(), false);
|
|
|
|
for (int i = 0; i < aListId.count(); i++)
|
|
|
|
if (reverse)
|
2004-12-01 15:48:31 +05:00
|
|
|
anArrayOfIdeces[i] = aListId[ myNbNodes - i - 1 ].toInt();
|
|
|
|
else
|
|
|
|
anArrayOfIdeces[i] = aListId[ i ].toInt();
|
|
|
|
|
|
|
|
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
|
2005-06-07 19:22:20 +06:00
|
|
|
switch (myElementType) {
|
2004-12-01 15:48:31 +05:00
|
|
|
case SMDSAbs_Edge:
|
|
|
|
aMeshEditor->AddEdge(anArrayOfIdeces.inout()); break;
|
|
|
|
case SMDSAbs_Face:
|
|
|
|
aMeshEditor->AddFace(anArrayOfIdeces.inout()); break;
|
|
|
|
case SMDSAbs_Volume:
|
|
|
|
aMeshEditor->AddVolume(anArrayOfIdeces.inout()); break;
|
|
|
|
default:;
|
|
|
|
}
|
2005-06-07 19:22:20 +06:00
|
|
|
|
|
|
|
SALOME_ListIO aList; aList.Append( myActor->getIO() );
|
|
|
|
mySelectionMgr->setSelectedObjects( aList, false );
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
SMESH::UpdateView();
|
|
|
|
mySimulation->SetVisibility(false);
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
buttonOk->setEnabled(false);
|
|
|
|
buttonApply->setEnabled(false);
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
myEditCurrentArgument->setText("");
|
|
|
|
|
|
|
|
myBusy = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
// function : ClickOnOk()
|
|
|
|
// purpose :
|
|
|
|
//=================================================================================
|
|
|
|
void SMESHGUI_AddMeshElementDlg::ClickOnOk()
|
|
|
|
{
|
2005-06-07 19:22:20 +06:00
|
|
|
this->ClickOnApply();
|
|
|
|
this->ClickOnCancel();
|
|
|
|
return;
|
2004-12-01 15:48:31 +05:00
|
|
|
}
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
// function : ClickOnCancel()
|
|
|
|
// purpose :
|
|
|
|
//=================================================================================
|
|
|
|
void SMESHGUI_AddMeshElementDlg::ClickOnCancel()
|
|
|
|
{
|
2005-06-07 19:22:20 +06:00
|
|
|
mySelectionMgr->clearSelected();
|
2004-12-01 15:48:31 +05:00
|
|
|
mySimulation->SetVisibility(false);
|
|
|
|
SMESH::SetPointRepresentation(false);
|
2005-06-07 19:22:20 +06:00
|
|
|
myViewWindow->SetSelectionMode( ActorSelection );
|
|
|
|
disconnect(mySelectionMgr, 0, this, 0);
|
|
|
|
mySMESHGUI->ResetState();
|
|
|
|
reject();
|
|
|
|
return;
|
2004-12-01 15:48:31 +05:00
|
|
|
}
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
//=================================================================================
|
|
|
|
// function : onTextChange()
|
|
|
|
// purpose :
|
|
|
|
//=================================================================================
|
|
|
|
void SMESHGUI_AddMeshElementDlg::onTextChange (const QString& theNewText)
|
2004-12-01 15:48:31 +05:00
|
|
|
{
|
2005-06-07 19:22:20 +06:00
|
|
|
if (myBusy) return;
|
2004-12-01 15:48:31 +05:00
|
|
|
myBusy = true;
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
myNbOkNodes = 0;
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
buttonOk->setEnabled(false);
|
|
|
|
buttonApply->setEnabled(false);
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
mySimulation->SetVisibility(false);
|
|
|
|
|
|
|
|
// hilight entered nodes
|
|
|
|
SMDS_Mesh* aMesh = 0;
|
2005-06-07 19:22:20 +06:00
|
|
|
if (myActor)
|
2004-12-01 15:48:31 +05:00
|
|
|
aMesh = myActor->GetObject()->GetMesh();
|
2005-06-07 19:22:20 +06:00
|
|
|
|
|
|
|
if (aMesh) {
|
|
|
|
SALOME_ListIO aList; aList.Append( myActor->getIO() );
|
|
|
|
mySelectionMgr->setSelectedObjects( aList, false );
|
|
|
|
|
|
|
|
TColStd_IndexedMapOfInteger selectedIndices;
|
|
|
|
TColStd_MapOfInteger newIndices;
|
|
|
|
mySelector->GetIndex(myActor->getIO(), selectedIndices);
|
|
|
|
|
|
|
|
QStringList aListId = QStringList::split(" ", theNewText, false);
|
|
|
|
for (int i = 0; i < aListId.count(); i++) {
|
|
|
|
if( const SMDS_MeshNode * n = aMesh->FindNode( aListId[ i ].toInt() ) )
|
|
|
|
{
|
|
|
|
if( selectedIndices.Add( n->GetID() ) )
|
|
|
|
newIndices.Add( n->GetID() );
|
|
|
|
myNbOkNodes++;
|
2004-12-01 15:48:31 +05:00
|
|
|
}
|
|
|
|
}
|
2005-06-07 19:22:20 +06:00
|
|
|
|
|
|
|
if( newIndices.Extent()>0 )
|
|
|
|
{
|
|
|
|
mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, true );
|
|
|
|
myViewWindow->highlight( myActor->getIO(), true, true );
|
|
|
|
}
|
|
|
|
bool aNodesOK = false;
|
|
|
|
if (myIsPoly && myElementType == SMDSAbs_Face && aListId.count() >=3 ){
|
|
|
|
myNbOkNodes = aListId.count();
|
|
|
|
aNodesOK = true;
|
2004-12-01 15:48:31 +05:00
|
|
|
}
|
|
|
|
}
|
2005-06-07 19:22:20 +06:00
|
|
|
|
|
|
|
if(myNbOkNodes) {
|
|
|
|
buttonOk->setEnabled(true);
|
|
|
|
buttonApply->setEnabled(true);
|
|
|
|
displaySimulation();
|
|
|
|
}
|
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
myBusy = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
// function : SelectionIntoArgument()
|
|
|
|
// purpose : Called when selection has changed
|
|
|
|
//=================================================================================
|
|
|
|
void SMESHGUI_AddMeshElementDlg::SelectionIntoArgument()
|
|
|
|
{
|
2005-06-07 19:22:20 +06:00
|
|
|
if (myBusy) return;
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
// clear
|
2005-06-07 19:22:20 +06:00
|
|
|
myNbOkNodes = 0;
|
2004-12-01 15:48:31 +05:00
|
|
|
myActor = 0;
|
|
|
|
|
|
|
|
myBusy = true;
|
2005-06-07 19:22:20 +06:00
|
|
|
myEditCurrentArgument->setText("");
|
2004-12-01 15:48:31 +05:00
|
|
|
myBusy = false;
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
if (!GroupButtons->isEnabled()) // inactive
|
2004-12-01 15:48:31 +05:00
|
|
|
return;
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
buttonOk->setEnabled(false);
|
|
|
|
buttonApply->setEnabled(false);
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
mySimulation->SetVisibility(false);
|
|
|
|
// SMESH::SetPointRepresentation(true);
|
|
|
|
|
|
|
|
// get selected mesh
|
2005-06-07 19:22:20 +06:00
|
|
|
SALOME_ListIO aList;
|
|
|
|
mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
if (aList.Extent() != 1)
|
2004-12-01 15:48:31 +05:00
|
|
|
return;
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
Handle(SALOME_InteractiveObject) anIO = aList.First();
|
|
|
|
myMesh = SMESH::GetMeshByIO(anIO);
|
|
|
|
if (myMesh->_is_nil())
|
2004-12-01 15:48:31 +05:00
|
|
|
return;
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
myActor = SMESH::FindActorByEntry(anIO->getEntry());
|
|
|
|
if (!myActor)
|
2004-12-01 15:48:31 +05:00
|
|
|
return;
|
|
|
|
|
|
|
|
// get selected nodes
|
|
|
|
QString aString = "";
|
2005-06-07 19:22:20 +06:00
|
|
|
int nbNodes = SMESH::GetNameOfSelectedNodes(mySelector,myActor->getIO(),aString);
|
2004-12-01 15:48:31 +05:00
|
|
|
myBusy = true;
|
2005-06-07 19:22:20 +06:00
|
|
|
myEditCurrentArgument->setText(aString);
|
2004-12-01 15:48:31 +05:00
|
|
|
myBusy = false;
|
2005-06-07 19:22:20 +06:00
|
|
|
if (myIsPoly && myElementType == SMDSAbs_Face && nbNodes >= 3 ) {
|
|
|
|
myNbNodes = nbNodes;
|
|
|
|
} else if (myNbNodes != nbNodes) {
|
2004-12-01 15:48:31 +05:00
|
|
|
return;
|
2005-06-07 19:22:20 +06:00
|
|
|
}
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
// OK
|
2005-06-07 19:22:20 +06:00
|
|
|
myNbOkNodes = nbNodes;
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
buttonOk->setEnabled(true);
|
|
|
|
buttonApply->setEnabled(true);
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
displaySimulation();
|
|
|
|
}
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
//=================================================================================
|
|
|
|
// function : displaySimulation()
|
|
|
|
// purpose :
|
|
|
|
//=================================================================================
|
2004-12-01 15:48:31 +05:00
|
|
|
void SMESHGUI_AddMeshElementDlg::displaySimulation()
|
|
|
|
{
|
2005-06-07 19:22:20 +06:00
|
|
|
if (myNbOkNodes && GroupButtons->isEnabled()) {
|
2004-12-01 15:48:31 +05:00
|
|
|
SMESH::TElementSimulation::TVTKIds anIds;
|
2005-06-07 19:22:20 +06:00
|
|
|
QStringList aListId = QStringList::split(" ", myEditCurrentArgument->text(), false);
|
|
|
|
for (int i = 0; i < aListId.count(); i++)
|
|
|
|
anIds.push_back(myActor->GetObject()->GetNodeVTKId(aListId[ i ].toInt()));
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
if (Reverse && Reverse->isChecked())
|
2005-02-03 12:43:07 +05:00
|
|
|
reverse(anIds.begin(),anIds.end());
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
vtkIdType aType = 0;
|
2005-06-07 19:22:20 +06:00
|
|
|
if (myIsPoly)
|
|
|
|
switch ( myElementType ) {
|
|
|
|
case SMDSAbs_Face : aType = VTK_POLYGON; break;
|
|
|
|
default: return;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
switch (myNbNodes) {
|
|
|
|
case 2: aType = VTK_LINE; break;
|
|
|
|
case 3: aType = VTK_TRIANGLE; break;
|
|
|
|
case 4: aType = myElementType == SMDSAbs_Face ? VTK_QUAD : VTK_TETRA; break;
|
|
|
|
case 8: aType = VTK_HEXAHEDRON; break;
|
|
|
|
default: return;
|
|
|
|
}
|
2004-12-01 15:48:31 +05:00
|
|
|
}
|
2005-06-07 19:22:20 +06:00
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
mySimulation->SetPosition(myActor,aType,anIds);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
// function : SetEditCurrentArgument()
|
|
|
|
// purpose :
|
|
|
|
//=================================================================================
|
|
|
|
void SMESHGUI_AddMeshElementDlg::SetEditCurrentArgument()
|
|
|
|
{
|
|
|
|
QPushButton* send = (QPushButton*)sender();
|
2005-06-07 19:22:20 +06:00
|
|
|
if (send == SelectButtonC1A1) {
|
|
|
|
LineEditC1A1->setFocus();
|
2004-12-01 15:48:31 +05:00
|
|
|
myEditCurrentArgument = LineEditC1A1;
|
|
|
|
}
|
2005-06-07 19:22:20 +06:00
|
|
|
SelectionIntoArgument();
|
2004-12-01 15:48:31 +05:00
|
|
|
}
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
// function : DeactivateActiveDialog()
|
|
|
|
// purpose :
|
|
|
|
//=================================================================================
|
|
|
|
void SMESHGUI_AddMeshElementDlg::DeactivateActiveDialog()
|
|
|
|
{
|
2005-06-07 19:22:20 +06:00
|
|
|
if (GroupConstructors->isEnabled()) {
|
|
|
|
GroupConstructors->setEnabled(false);
|
|
|
|
GroupC1->setEnabled(false);
|
|
|
|
GroupButtons->setEnabled(false);
|
2004-12-01 15:48:31 +05:00
|
|
|
mySimulation->SetVisibility(false);
|
2005-06-07 19:22:20 +06:00
|
|
|
mySMESHGUI->ResetState();
|
|
|
|
mySMESHGUI->SetActiveDialogBox(0);
|
2004-12-01 15:48:31 +05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
// function : ActivateThisDialog()
|
|
|
|
// purpose :
|
|
|
|
//=================================================================================
|
|
|
|
void SMESHGUI_AddMeshElementDlg::ActivateThisDialog()
|
|
|
|
{
|
|
|
|
/* Emit a signal to deactivate the active dialog */
|
2005-06-07 19:22:20 +06:00
|
|
|
mySMESHGUI->EmitSignalDeactivateDialog();
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
GroupConstructors->setEnabled(true);
|
|
|
|
GroupC1->setEnabled(true);
|
|
|
|
GroupButtons->setEnabled(true);
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
SMESH::SetPointRepresentation(true);
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
myViewWindow->SetSelectionMode( NodeSelection );
|
2004-12-01 15:48:31 +05:00
|
|
|
SelectionIntoArgument();
|
|
|
|
}
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
// function : enterEvent()
|
|
|
|
// purpose :
|
|
|
|
//=================================================================================
|
2005-06-07 19:22:20 +06:00
|
|
|
void SMESHGUI_AddMeshElementDlg::enterEvent (QEvent*)
|
2004-12-01 15:48:31 +05:00
|
|
|
{
|
2005-06-07 19:22:20 +06:00
|
|
|
if (GroupConstructors->isEnabled())
|
|
|
|
return;
|
|
|
|
ActivateThisDialog();
|
|
|
|
return;
|
2004-12-01 15:48:31 +05:00
|
|
|
}
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
// function : closeEvent()
|
|
|
|
// purpose :
|
|
|
|
//=================================================================================
|
2005-06-07 19:22:20 +06:00
|
|
|
void SMESHGUI_AddMeshElementDlg::closeEvent (QCloseEvent*)
|
2004-12-01 15:48:31 +05:00
|
|
|
{
|
|
|
|
/* same than click on cancel button */
|
2005-06-07 19:22:20 +06:00
|
|
|
this->ClickOnCancel();
|
|
|
|
return;
|
2004-12-01 15:48:31 +05:00
|
|
|
}
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
//=================================================================================
|
|
|
|
// function : hideEvent()
|
|
|
|
// purpose : caused by ESC key
|
|
|
|
//=================================================================================
|
|
|
|
void SMESHGUI_AddMeshElementDlg::hideEvent (QHideEvent*)
|
2004-12-01 15:48:31 +05:00
|
|
|
{
|
2005-06-07 19:22:20 +06:00
|
|
|
if (!isMinimized())
|
|
|
|
ClickOnCancel();
|
2004-12-01 15:48:31 +05:00
|
|
|
}
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
//=================================================================================
|
|
|
|
// function : CheckBox()
|
|
|
|
// purpose :
|
|
|
|
//=================================================================================
|
|
|
|
void SMESHGUI_AddMeshElementDlg::CheckBox (int state)
|
2004-12-01 15:48:31 +05:00
|
|
|
{
|
2005-06-07 19:22:20 +06:00
|
|
|
if (!myNbOkNodes)
|
2004-12-01 15:48:31 +05:00
|
|
|
return;
|
2005-06-07 19:22:20 +06:00
|
|
|
|
|
|
|
if (state >= 0) {
|
2004-12-01 15:48:31 +05:00
|
|
|
mySimulation->SetVisibility(false);
|
|
|
|
displaySimulation();
|
|
|
|
}
|
|
|
|
}
|