From: nicolas Date: Mon, 25 Mar 2013 14:32:53 +0000 (+0000) Subject: Suivi de frontières 2D sur des cônes (suite) X-Git-Tag: V7_2_0b1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=633ecb2c6133ab4f266d218ff13da5e46310c90f;p=modules%2Fhomard.git Suivi de frontières 2D sur des cônes (suite) --- diff --git a/doc/gui_create_boundary.rst b/doc/gui_create_boundary.rst index 9fb18473..1fa7c415 100644 --- a/doc/gui_create_boundary.rst +++ b/doc/gui_create_boundary.rst @@ -71,10 +71,11 @@ Cette op Inversement, une frontière peut très bien n'être retenue par aucun groupe. Cela arrive si elle a été définie pour un cas précédent et qu'elle est sans objet pour le cas en cours de définition. -Il existe deux types de frontière analytique : +Il existe trois types de frontière analytique : - Cylindre - Sphère + - Cône, décrit par un axe et un angle ou par deux rayons .. note:: Les valeurs numériques proposées par défaut tiennent compte de la géométrie du maillage. @@ -100,6 +101,24 @@ La sph .. index:: single: arbre d'étude +Ue cône +""""""" +.. index:: single: cone + +Un cône est défini de deux manières différentes : le centre, l'axe et l'angle d'ouverture en degré ou par deux points centrés sur l'axe et le rayon associé. Un nom de frontière est proposé automatiquement : Boun_1, Boun_2, etc. Ce nom peut être modifié. Il ne doit pas avoir déjà été utilisé pour une autre frontière. + +Création par une origine, un axe et un angle d'ouverture : + +.. image:: images/create_boundary_an_co_1.png + :align: center + +Création par deux points centrés sur l'axe et le rayon associé : + +.. image:: images/create_boundary_an_co_2.png + :align: center + +.. index:: single: arbre d'étude + L'arbre d'étude """"""""""""""" A l'issue de cette création de frontières, l'arbre d'études a été enrichi. On y trouve toutes les frontières créées, identifiées par leur nom, avec la possibilité de les éditer. diff --git a/doc/images/create_boundary_an_co_1.png b/doc/images/create_boundary_an_co_1.png new file mode 100644 index 00000000..7212cba3 Binary files /dev/null and b/doc/images/create_boundary_an_co_1.png differ diff --git a/doc/images/create_boundary_an_co_2.png b/doc/images/create_boundary_an_co_2.png new file mode 100644 index 00000000..017b56d9 Binary files /dev/null and b/doc/images/create_boundary_an_co_2.png differ diff --git a/doc/images/create_boundary_an_cy.png b/doc/images/create_boundary_an_cy.png index e3fef853..2efc3fdc 100644 Binary files a/doc/images/create_boundary_an_cy.png and b/doc/images/create_boundary_an_cy.png differ diff --git a/doc/images/create_boundary_an_sp.png b/doc/images/create_boundary_an_sp.png index 27b94430..be7b28b7 100644 Binary files a/doc/images/create_boundary_an_sp.png and b/doc/images/create_boundary_an_sp.png differ diff --git a/doc/intro.rst b/doc/intro.rst index efc780bf..5964b53f 100644 --- a/doc/intro.rst +++ b/doc/intro.rst @@ -183,6 +183,9 @@ SALOME VERSION 7.1 : ``cas.LastIteration()`` : retourne la dernière itération de la descendance du cas (voir :ref:`tui_create_iteration`) - Analyse de maillages (voir :ref:`gui_mesh_info`) +SALOME VERSION 7.2 : + - Possibilité d'utiliser un cone comme support de frontiere 2D (voir :ref:`tui_create_boundary`) + diff --git a/doc/tui_create_boundary.rst b/doc/tui_create_boundary.rst index aed6017d..842717f9 100644 --- a/doc/tui_create_boundary.rst +++ b/doc/tui_create_boundary.rst @@ -46,6 +46,29 @@ Ces m | - ``Xcen``, ``Ycen``, ``Zcen`` : coordonnées du centre de la sphère | | - ``R`` : rayon de la sphère | +----------------------------------------------------------------------------------------+ +| .. module:: CreateBoundaryConeA | +| | +| **CreateBoundaryConeA(boundary_name, Xaxe, Yaxe, Zaxe, Angle, Xcen, Ycen, Zcen)** | +| Retourne une instance de la classe ``boundary`` analytique de type conique | +| après sa création | +| | +| - ``boundary_name`` : le nom de la frontière analytique basée sur un cone | +| - ``Xaxe``, ``Yaxe``, ``Zaxe`` : vecteur de l'axe | +| - ``Angle`` : angle d'ouverture du cone en degre (entre 0 et 90) | +| - ``Xcen``, ``Ycen``, ``Zcen`` : coordonnées du centre du cone | ++----------------------------------------------------------------------------------------+ +| .. module:: CreateBoundaryConeR | +| | +| **CreateBoundaryConeR(boundary_name, Xc1, Yc1, Zc1, R1, Xc2, Yc2, Zc2, R2)** | +| Retourne une instance de la classe ``boundary`` analytique de type conique | +| après sa création | +| | +| - ``boundary_name`` : le nom de la frontière analytique basée sur un cone | +| - ``Xc1``, ``Yc1``, ``Zc1`` : coordonnées du premier centre du cone | +| - ``R1`` : rayon du cone à la hauteur du premier centre | +| - ``Xc2``, ``Yc2``, ``Zc2`` : coordonnées du second centre du cone | +| - ``R2`` : rayon du cone à la hauteur du second centre | ++----------------------------------------------------------------------------------------+ +---------------------------------------------------------------+ +---------------------------------------------------------------+ @@ -108,6 +131,8 @@ M | * 0 : discrète | | * 1 : cylindre | | * 2 : sphère | +| * 3 : cone défini par un axe et un angle | +| * 4 : cone défini par deux rayons | +---------------------------------------------------------------+ | .. module:: GetCoords | | | diff --git a/doc/tui_create_iteration.rst b/doc/tui_create_iteration.rst index afb8b964..e17607b8 100644 --- a/doc/tui_create_iteration.rst +++ b/doc/tui_create_iteration.rst @@ -148,7 +148,7 @@ G | | | **GetLogFile()** | | Retourne le nom du fichier retraçant le déroulement de | -| l'exécuion de HOMARD | +| l'exécution de HOMARD | +---------------------------------------------------------------+ | .. module:: GetFileInfo | | | diff --git a/idl/HOMARD_Boundary.idl b/idl/HOMARD_Boundary.idl index 78954a34..ef93fb73 100644 --- a/idl/HOMARD_Boundary.idl +++ b/idl/HOMARD_Boundary.idl @@ -66,6 +66,15 @@ module HOMARD void SetSphere (in double Xcentre, in double Ycentre, in double Zcentre, in double rayon) raises (SALOME::SALOME_Exception); + void SetConeR (in double Xcentre1, in double Ycentre1, in double Zcentre1, in double Rayon1, + in double Xcentre2, in double Ycentre2, in double Zcentre2, in double Rayon2) + raises (SALOME::SALOME_Exception); + + void SetConeA(in double Xaxe,in double Yaxe,in double Zaxe,in double Angle, + in double Xcentre,in double Ycentre,in double ZCentre) + raises (SALOME::SALOME_Exception); + + HOMARD::double_array GetCoords() raises (SALOME::SALOME_Exception); void SetLimit (in double Xincr, in double Yincr, in double Zincr) diff --git a/idl/HOMARD_Gen.idl b/idl/HOMARD_Gen.idl index b91f3524..14716c63 100644 --- a/idl/HOMARD_Gen.idl +++ b/idl/HOMARD_Gen.idl @@ -58,6 +58,14 @@ module HOMARD in double Xcentre, in double Ycentre, in double Zcentre, in double Radius) raises (SALOME::SALOME_Exception); + HOMARD_Boundary CreateBoundaryConeR (in string BoundaryName, + in double Xcentre1, in double Ycentre1, in double Zcentre1, in double Radius1, + in double Xcentre2, in double Ycentre2, in double Zcentre2, in double Radius2) + raises (SALOME::SALOME_Exception); + HOMARD_Boundary CreateBoundaryConeA (in string BoundaryName, + in double Xaxis, in double Yaxis, in double Zaxis, in double Angle, + in double Xcentre, in double Ycentre, in double Zcentre) + raises (SALOME::SALOME_Exception); HOMARD_Cas CreateCase(in string CaseName, in string MeshName, in string FileName ) raises (SALOME::SALOME_Exception); HOMARD_Hypothesis CreateHypothesis(in string HypoName ) diff --git a/resources/Makefile.am b/resources/Makefile.am index 5c8decf0..09f1d0b3 100644 --- a/resources/Makefile.am +++ b/resources/Makefile.am @@ -28,6 +28,9 @@ dist_salomeres_DATA = \ boxdxyz_2.png \ cas_calcule.png \ cas_non_calcule.png \ + conedxyz.png \ + cone.png \ + conepointvector.png \ cylinderpointvector.png \ cylinderpointvector_2.png \ delete.png \ diff --git a/resources/cone.png b/resources/cone.png new file mode 100644 index 00000000..677e2c72 Binary files /dev/null and b/resources/cone.png differ diff --git a/resources/conedxyz.png b/resources/conedxyz.png new file mode 100644 index 00000000..2d468342 Binary files /dev/null and b/resources/conedxyz.png differ diff --git a/resources/conepointvector.png b/resources/conepointvector.png new file mode 100644 index 00000000..4df78513 Binary files /dev/null and b/resources/conepointvector.png differ diff --git a/src/HOMARD/HOMARD_Boundary.cxx b/src/HOMARD/HOMARD_Boundary.cxx index f73659de..f39ac47f 100644 --- a/src/HOMARD/HOMARD_Boundary.cxx +++ b/src/HOMARD/HOMARD_Boundary.cxx @@ -93,11 +93,25 @@ std::string HOMARD_Boundary::GetDumpPython() const } case 2: { - aScript << "sphere" << _Name << "\n"; + aScript << "sphere " << _Name << "\n"; aScript << "\t" << _Name << " = homard.CreateBoundarySphere(\"" << _Name << "\", "; aScript << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _rayon << ")\n"; break ; } + case 3: + { + aScript << "cone " << _Name << "\n"; + aScript << "\t" << _Name << " = homard.CreateBoundaryConeA(\"" << _Name << "\", "; + aScript << _Xaxe << ", " << _Yaxe << ", " << _Zaxe << ", " << _Angle << ", " << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ")\n"; + break ; + } + case 4: + { + aScript << "cone " << _Name << "\n"; + aScript << "\t" << _Name << " = homard.CreateBoundaryConeR(\"" << _Name << "\", "; + aScript << _Xcentre1 << ", " << _Ycentre1 << ", " << _Zcentre1 << ", " << _Rayon1 << ", " << _Xcentre2 << ", " << _Ycentre2 << ", " << _Zcentre2 << ", " << _Rayon2 << ")\n"; + break ; + } } return aScript.str(); @@ -140,9 +154,8 @@ std::string HOMARD_Boundary::GetMeshFile() const void HOMARD_Boundary::SetCylinder( double X0, double X1, double X2, double X3, double X4, double X5, double X6 ) { - _Xcentre = X0; _Ycentre = X1; - _Zcentre = X2; _Xaxe = X3; - _Yaxe = X4; _Zaxe = X5; + _Xcentre = X0; _Ycentre = X1; _Zcentre = X2; + _Xaxe = X3; _Yaxe = X4; _Zaxe = X5; _rayon = X6; } //====================================================================== @@ -151,6 +164,23 @@ void HOMARD_Boundary::SetSphere( double X0, double X1, double X2, double X3 ) _Xcentre = X0; _Ycentre = X1; _Zcentre = X2; _rayon = X3; } +//====================================================================== +void HOMARD_Boundary::SetConeR( double Xcentre1, double Ycentre1, double Zcentre1, double Rayon1, + double Xcentre2, double Ycentre2, double Zcentre2, double Rayon2) +{ + _Xcentre1 = Xcentre1; _Ycentre1 = Ycentre1; _Zcentre1 = Zcentre1; + _Rayon1 = Rayon1; + _Xcentre2 = Xcentre2; _Ycentre2 = Ycentre2; _Zcentre2 = Zcentre2; + _Rayon2 = Rayon2; +} +//====================================================================== +void HOMARD_Boundary::SetConeA( double Xaxe, double Yaxe, double Zaxe, double Angle, + double Xcentre, double Ycentre, double Zcentre) +{ + _Xaxe = Xaxe; _Yaxe = Yaxe; _Zaxe = Zaxe; + _Angle = Angle; + _Xcentre = Xcentre; _Ycentre = Ycentre; _Zcentre = Zcentre; +} //======================================================================================= std::vector HOMARD_Boundary::GetCoords() const { @@ -179,6 +209,31 @@ std::vector HOMARD_Boundary::GetCoords() const mesCoor.push_back( _rayon ); break ; } +// Cone defini par un axe et un angle + case 3: + { + mesCoor.push_back( _Xaxe ); + mesCoor.push_back( _Yaxe ); + mesCoor.push_back( _Zaxe ); + mesCoor.push_back( _Angle ); + mesCoor.push_back( _Xcentre ); + mesCoor.push_back( _Ycentre ); + mesCoor.push_back( _Zcentre ); + break ; + } +// Cone defini par les 2 rayons + case 4: + { + mesCoor.push_back( _Xcentre1 ); + mesCoor.push_back( _Ycentre1 ); + mesCoor.push_back( _Zcentre1 ); + mesCoor.push_back( _Rayon1 ); + mesCoor.push_back( _Xcentre2 ); + mesCoor.push_back( _Ycentre2 ); + mesCoor.push_back( _Zcentre2 ); + mesCoor.push_back( _Rayon2 ); + break ; + } ASSERT ( _Type == -1 ) ; } return mesCoor; diff --git a/src/HOMARD/HOMARD_Boundary.hxx b/src/HOMARD/HOMARD_Boundary.hxx index 5cf972aa..87b4970d 100644 --- a/src/HOMARD/HOMARD_Boundary.hxx +++ b/src/HOMARD/HOMARD_Boundary.hxx @@ -63,6 +63,10 @@ public: void SetCylinder( double X0, double X1, double X2, double X3, double X4, double X5, double X6 ); void SetSphere( double X0, double X1, double X2, double X3 ); + void SetConeR( double Xcentre1, double Ycentre1, double Zcentre1, double Rayon1, + double Xcentre2, double Ycentre2, double Zcentre2, double Rayon2); + void SetConeA( double Xaxe, double Yaxe, double Zaxe, double Angle, + double Xcentre, double Ycentre, double ZCentre); std::vector GetCoords() const; @@ -87,6 +91,9 @@ private: double _Xaxe, _Yaxe, _Zaxe; double _Xcentre, _Ycentre, _Zcentre, _rayon; double _Xincr, _Yincr, _Zincr; + double _Xcentre1, _Ycentre1, _Zcentre1, _Rayon1; + double _Xcentre2, _Ycentre2, _Zcentre2, _Rayon2; + double _Angle; std::list _ListGroupSelected; diff --git a/src/HOMARD/HOMARD_DriverTools.cxx b/src/HOMARD/HOMARD_DriverTools.cxx index b6211887..ab29a7df 100644 --- a/src/HOMARD/HOMARD_DriverTools.cxx +++ b/src/HOMARD/HOMARD_DriverTools.cxx @@ -730,6 +730,10 @@ namespace HOMARD { boundary.SetCylinder(coords[0],coords[1],coords[2],coords[3],coords[4],coords[5],coords[6]); } else if ( BoundaryType == 2 ) { boundary.SetSphere( coords[0], coords[1], coords[2], coords[3]); } + else if ( BoundaryType == 3 ) + { boundary.SetConeA( coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6]); } + else if ( BoundaryType == 4 ) + { boundary.SetConeR( coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7]); } // Remarque : la taille de coords est suffisante pour les limites for ( int i = 0; i < 3; i++ ) { chunk = getNextChunk( stream, start, ok ); diff --git a/src/HOMARD/HomardDriver.cxx b/src/HOMARD/HomardDriver.cxx index 1cfa5f32..b24af8e9 100644 --- a/src/HOMARD/HomardDriver.cxx +++ b/src/HOMARD/HomardDriver.cxx @@ -666,12 +666,12 @@ void HomardDriver::TexteBoundaryDiGr( const std::string GroupName ) // } //=============================================================================== -void HomardDriver::TexteBoundaryAn( const std::string NameBoundary, int NumeBoundary, int BoundaryType, double x0, double x1, double x2, double x3, double x4, double x5, double x6 ) +void HomardDriver::TexteBoundaryAn( const std::string NameBoundary, int NumeBoundary, int BoundaryType, double x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7 ) { MESSAGE("TexteBoundaryAn, NameBoundary = "< #include #include -#include +#include #include #include #include #include +QT_BEGIN_NAMESPACE + class Ui_CreateBoundaryAn { public: - QGridLayout *gridLayout; - QGroupBox *GBButtons; - QGridLayout *gridLayout1; - QPushButton *buttonHelp; - QPushButton *buttonCancel; - QPushButton *buttonApply; - QPushButton *buttonOk; + QGridLayout *gridLayout_4; QLabel *Name; QLineEdit *LEBoundaryName; QGroupBox *TypeBoundary; - QHBoxLayout *hboxLayout; + QGridLayout *gridLayout; QRadioButton *RBCylindre; QRadioButton *RBSphere; - QGroupBox *gBSphere; - QGridLayout *gridLayout2; - QDoubleSpinBox *SpinBox_Rayon; - QDoubleSpinBox *SpinBox_Zcentre; - QLabel *TLRayon; - QLabel *TLZcentre; - QLabel *TLYcentre; - QDoubleSpinBox *SpinBox_Ycentre; - QDoubleSpinBox *SpinBox_Xcentre; - QLabel *TLXcentre; + QRadioButton *RBCone; QGroupBox *gBCylindre; - QGridLayout *gridLayout3; + QGridLayout *gridLayout1; QDoubleSpinBox *SpinBox_Xcent; QLabel *TLXcent; QDoubleSpinBox *SpinBox_Radius; @@ -66,373 +53,563 @@ public: QDoubleSpinBox *SpinBox_Zaxis; QDoubleSpinBox *SpinBox_Yaxis; QDoubleSpinBox *SpinBox_Xaxis; + QGroupBox *gBSphere; + QGridLayout *gridLayout2; + QDoubleSpinBox *SpinBox_Rayon; + QDoubleSpinBox *SpinBox_Zcentre; + QLabel *TLRayon; + QLabel *TLZcentre; + QLabel *TLYcentre; + QDoubleSpinBox *SpinBox_Ycentre; + QDoubleSpinBox *SpinBox_Xcentre; + QLabel *TLXcentre; + QGroupBox *gBCone; + QGridLayout *gridLayout_3; + QGroupBox *groupBox; + QGridLayout *gridLayout_2; + QRadioButton *RB_Def_radius; + QRadioButton *RB_Def_angle; + QLabel *TLCone_X1; + QDoubleSpinBox *SpinBox_Cone_X1; + QLabel *TLCone_X2; + QDoubleSpinBox *SpinBox_Cone_X2; + QLabel *TLCone_Y1; + QDoubleSpinBox *SpinBox_Cone_Y1; + QLabel *TLCone_Y2; + QDoubleSpinBox *SpinBox_Cone_Y2; + QLabel *TLCone_Z1; + QDoubleSpinBox *SpinBox_Cone_Z1; + QLabel *TLCone_Z2; + QDoubleSpinBox *SpinBox_Cone_Z2; + QLabel *TLCone_V1; + QDoubleSpinBox *SpinBox_Cone_V1; + QLabel *TLCone_V2; + QDoubleSpinBox *SpinBox_Cone_V2; + QGroupBox *GBButtons; + QGridLayout *gridLayout3; + QPushButton *buttonHelp; + QPushButton *buttonCancel; + QPushButton *buttonApply; + QPushButton *buttonOk; void setupUi(QDialog *CreateBoundaryAn) { - CreateBoundaryAn->setObjectName(QString::fromUtf8("CreateBoundaryAn")); - CreateBoundaryAn->setAutoFillBackground(true); - CreateBoundaryAn->setSizeGripEnabled(true); - gridLayout = new QGridLayout(CreateBoundaryAn); - gridLayout->setSpacing(6); - gridLayout->setMargin(9); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - GBButtons = new QGroupBox(CreateBoundaryAn); - GBButtons->setObjectName(QString::fromUtf8("GBButtons")); - QSizePolicy sizePolicy(static_cast(0), static_cast(0)); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(GBButtons->sizePolicy().hasHeightForWidth()); - GBButtons->setSizePolicy(sizePolicy); - gridLayout1 = new QGridLayout(GBButtons); - gridLayout1->setSpacing(6); - gridLayout1->setMargin(9); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); - buttonHelp = new QPushButton(GBButtons); - buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - - gridLayout1->addWidget(buttonHelp, 0, 3, 1, 1); - - buttonCancel = new QPushButton(GBButtons); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - - gridLayout1->addWidget(buttonCancel, 0, 2, 1, 1); - - buttonApply = new QPushButton(GBButtons); - buttonApply->setObjectName(QString::fromUtf8("buttonApply")); - - gridLayout1->addWidget(buttonApply, 0, 1, 1, 1); - - buttonOk = new QPushButton(GBButtons); - buttonOk->setObjectName(QString::fromUtf8("buttonOk")); - - gridLayout1->addWidget(buttonOk, 0, 0, 1, 1); - - - gridLayout->addWidget(GBButtons, 4, 0, 1, 2); - - Name = new QLabel(CreateBoundaryAn); - Name->setObjectName(QString::fromUtf8("Name")); - - gridLayout->addWidget(Name, 0, 0, 1, 1); - - LEBoundaryName = new QLineEdit(CreateBoundaryAn); - LEBoundaryName->setObjectName(QString::fromUtf8("LEBoundaryName")); - LEBoundaryName->setMaxLength(32); - - gridLayout->addWidget(LEBoundaryName, 0, 1, 1, 1); - - TypeBoundary = new QGroupBox(CreateBoundaryAn); - TypeBoundary->setObjectName(QString::fromUtf8("TypeBoundary")); - QSizePolicy sizePolicy1(static_cast(0), static_cast(0)); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(TypeBoundary->sizePolicy().hasHeightForWidth()); - TypeBoundary->setSizePolicy(sizePolicy1); - TypeBoundary->setMinimumSize(QSize(340, 0)); - hboxLayout = new QHBoxLayout(TypeBoundary); - hboxLayout->setSpacing(6); - hboxLayout->setMargin(9); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); - RBCylindre = new QRadioButton(TypeBoundary); - RBCylindre->setObjectName(QString::fromUtf8("RBCylindre")); - RBCylindre->setIcon(QIcon(QString::fromUtf8("../../resources/cylinderpointvector.png"))); - RBCylindre->setCheckable(true); - RBCylindre->setChecked(true); - - hboxLayout->addWidget(RBCylindre); - - RBSphere = new QRadioButton(TypeBoundary); - RBSphere->setObjectName(QString::fromUtf8("RBSphere")); - RBSphere->setIcon(QIcon(QString::fromUtf8("../../resources/zone_spherepoint.png"))); - - hboxLayout->addWidget(RBSphere); - - - gridLayout->addWidget(TypeBoundary, 1, 0, 1, 2); - - gBSphere = new QGroupBox(CreateBoundaryAn); - gBSphere->setObjectName(QString::fromUtf8("gBSphere")); - QSizePolicy sizePolicy2(static_cast(0), static_cast(0)); - sizePolicy2.setHorizontalStretch(0); - sizePolicy2.setVerticalStretch(0); - sizePolicy2.setHeightForWidth(gBSphere->sizePolicy().hasHeightForWidth()); - gBSphere->setSizePolicy(sizePolicy2); - gridLayout2 = new QGridLayout(gBSphere); - gridLayout2->setSpacing(6); - gridLayout2->setMargin(9); - gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); - SpinBox_Rayon = new QDoubleSpinBox(gBSphere); - SpinBox_Rayon->setObjectName(QString::fromUtf8("SpinBox_Rayon")); - SpinBox_Rayon->setDecimals(5); - SpinBox_Rayon->setMaximum(1e+09); - SpinBox_Rayon->setMinimum(0); - SpinBox_Rayon->setValue(0); - - gridLayout2->addWidget(SpinBox_Rayon, 1, 3, 1, 1); - - SpinBox_Zcentre = new QDoubleSpinBox(gBSphere); - SpinBox_Zcentre->setObjectName(QString::fromUtf8("SpinBox_Zcentre")); - SpinBox_Zcentre->setDecimals(5); - SpinBox_Zcentre->setMaximum(1e+09); - SpinBox_Zcentre->setMinimum(-1e+09); - SpinBox_Zcentre->setValue(0); - - gridLayout2->addWidget(SpinBox_Zcentre, 2, 1, 1, 1); - - TLRayon = new QLabel(gBSphere); - TLRayon->setObjectName(QString::fromUtf8("TLRayon")); - QSizePolicy sizePolicy3(static_cast(0), static_cast(0)); - sizePolicy3.setHorizontalStretch(0); - sizePolicy3.setVerticalStretch(0); - sizePolicy3.setHeightForWidth(TLRayon->sizePolicy().hasHeightForWidth()); - TLRayon->setSizePolicy(sizePolicy3); - TLRayon->setWordWrap(false); - - gridLayout2->addWidget(TLRayon, 1, 2, 1, 1); - - TLZcentre = new QLabel(gBSphere); - TLZcentre->setObjectName(QString::fromUtf8("TLZcentre")); - QSizePolicy sizePolicy4(static_cast(0), static_cast(0)); - sizePolicy4.setHorizontalStretch(0); - sizePolicy4.setVerticalStretch(0); - sizePolicy4.setHeightForWidth(TLZcentre->sizePolicy().hasHeightForWidth()); - TLZcentre->setSizePolicy(sizePolicy4); - TLZcentre->setWordWrap(false); - - gridLayout2->addWidget(TLZcentre, 2, 0, 1, 1); - - TLYcentre = new QLabel(gBSphere); - TLYcentre->setObjectName(QString::fromUtf8("TLYcentre")); - QSizePolicy sizePolicy5(static_cast(0), static_cast(0)); - sizePolicy5.setHorizontalStretch(0); - sizePolicy5.setVerticalStretch(0); - sizePolicy5.setHeightForWidth(TLYcentre->sizePolicy().hasHeightForWidth()); - TLYcentre->setSizePolicy(sizePolicy5); - TLYcentre->setWordWrap(false); - - gridLayout2->addWidget(TLYcentre, 1, 0, 1, 1); - - SpinBox_Ycentre = new QDoubleSpinBox(gBSphere); - SpinBox_Ycentre->setObjectName(QString::fromUtf8("SpinBox_Ycentre")); - SpinBox_Ycentre->setDecimals(5); - SpinBox_Ycentre->setMaximum(1e+09); - SpinBox_Ycentre->setMinimum(-1e+09); - SpinBox_Ycentre->setValue(0); - - gridLayout2->addWidget(SpinBox_Ycentre, 1, 1, 1, 1); - - SpinBox_Xcentre = new QDoubleSpinBox(gBSphere); - SpinBox_Xcentre->setObjectName(QString::fromUtf8("SpinBox_Xcentre")); - SpinBox_Xcentre->setDecimals(5); - SpinBox_Xcentre->setMaximum(1e+09); - SpinBox_Xcentre->setMinimum(-1e+09); - SpinBox_Xcentre->setValue(0); - - gridLayout2->addWidget(SpinBox_Xcentre, 0, 1, 1, 1); - - TLXcentre = new QLabel(gBSphere); - TLXcentre->setObjectName(QString::fromUtf8("TLXcentre")); - QSizePolicy sizePolicy6(static_cast(0), static_cast(0)); - sizePolicy6.setHorizontalStretch(0); - sizePolicy6.setVerticalStretch(0); - sizePolicy6.setHeightForWidth(TLXcentre->sizePolicy().hasHeightForWidth()); - TLXcentre->setSizePolicy(sizePolicy6); - TLXcentre->setWordWrap(false); - - gridLayout2->addWidget(TLXcentre, 0, 0, 1, 1); - - - gridLayout->addWidget(gBSphere, 3, 0, 1, 2); - - gBCylindre = new QGroupBox(CreateBoundaryAn); - gBCylindre->setObjectName(QString::fromUtf8("gBCylindre")); - QSizePolicy sizePolicy7(static_cast(0), static_cast(0)); - sizePolicy7.setHorizontalStretch(0); - sizePolicy7.setVerticalStretch(0); - sizePolicy7.setHeightForWidth(gBCylindre->sizePolicy().hasHeightForWidth()); - gBCylindre->setSizePolicy(sizePolicy7); - gridLayout3 = new QGridLayout(gBCylindre); - gridLayout3->setSpacing(6); - gridLayout3->setMargin(9); - gridLayout3->setObjectName(QString::fromUtf8("gridLayout3")); - SpinBox_Xcent = new QDoubleSpinBox(gBCylindre); - SpinBox_Xcent->setObjectName(QString::fromUtf8("SpinBox_Xcent")); - SpinBox_Xcent->setDecimals(5); - SpinBox_Xcent->setMaximum(1e+09); - SpinBox_Xcent->setMinimum(-1e+09); - SpinBox_Xcent->setValue(0); - - gridLayout3->addWidget(SpinBox_Xcent, 0, 1, 1, 1); - - TLXcent = new QLabel(gBCylindre); - TLXcent->setObjectName(QString::fromUtf8("TLXcent")); - QSizePolicy sizePolicy8(static_cast(0), static_cast(0)); - sizePolicy8.setHorizontalStretch(0); - sizePolicy8.setVerticalStretch(0); - sizePolicy8.setHeightForWidth(TLXcent->sizePolicy().hasHeightForWidth()); - TLXcent->setSizePolicy(sizePolicy8); - TLXcent->setWordWrap(false); - - gridLayout3->addWidget(TLXcent, 0, 0, 1, 1); - - SpinBox_Radius = new QDoubleSpinBox(gBCylindre); - SpinBox_Radius->setObjectName(QString::fromUtf8("SpinBox_Radius")); - SpinBox_Radius->setDecimals(5); - SpinBox_Radius->setMaximum(1e+09); - - gridLayout3->addWidget(SpinBox_Radius, 3, 1, 1, 2); - - SpinBox_Zcent = new QDoubleSpinBox(gBCylindre); - SpinBox_Zcent->setObjectName(QString::fromUtf8("SpinBox_Zcent")); - SpinBox_Zcent->setDecimals(5); - SpinBox_Zcent->setMaximum(1e+09); - SpinBox_Zcent->setMinimum(-1e+09); - SpinBox_Zcent->setValue(0); - - gridLayout3->addWidget(SpinBox_Zcent, 2, 1, 1, 1); - - TLradius = new QLabel(gBCylindre); - TLradius->setObjectName(QString::fromUtf8("TLradius")); - QSizePolicy sizePolicy9(static_cast(0), static_cast(0)); - sizePolicy9.setHorizontalStretch(0); - sizePolicy9.setVerticalStretch(0); - sizePolicy9.setHeightForWidth(TLradius->sizePolicy().hasHeightForWidth()); - TLradius->setSizePolicy(sizePolicy9); - TLradius->setWordWrap(false); - - gridLayout3->addWidget(TLradius, 3, 0, 1, 1); - - TLZcent = new QLabel(gBCylindre); - TLZcent->setObjectName(QString::fromUtf8("TLZcent")); - QSizePolicy sizePolicy10(static_cast(0), static_cast(0)); - sizePolicy10.setHorizontalStretch(0); - sizePolicy10.setVerticalStretch(0); - sizePolicy10.setHeightForWidth(TLZcent->sizePolicy().hasHeightForWidth()); - TLZcent->setSizePolicy(sizePolicy10); - TLZcent->setWordWrap(false); - - gridLayout3->addWidget(TLZcent, 2, 0, 1, 1); - - TLYcent = new QLabel(gBCylindre); - TLYcent->setObjectName(QString::fromUtf8("TLYcent")); - QSizePolicy sizePolicy11(static_cast(0), static_cast(0)); - sizePolicy11.setHorizontalStretch(0); - sizePolicy11.setVerticalStretch(0); - sizePolicy11.setHeightForWidth(TLYcent->sizePolicy().hasHeightForWidth()); - TLYcent->setSizePolicy(sizePolicy11); - TLYcent->setWordWrap(false); - - gridLayout3->addWidget(TLYcent, 1, 0, 1, 1); - - SpinBox_Ycent = new QDoubleSpinBox(gBCylindre); - SpinBox_Ycent->setObjectName(QString::fromUtf8("SpinBox_Ycent")); - SpinBox_Ycent->setDecimals(5); - SpinBox_Ycent->setMaximum(1e+09); - SpinBox_Ycent->setMinimum(-1e+09); - SpinBox_Ycent->setValue(0); - - gridLayout3->addWidget(SpinBox_Ycent, 1, 1, 1, 1); - - TLXaxis = new QLabel(gBCylindre); - TLXaxis->setObjectName(QString::fromUtf8("TLXaxis")); - QSizePolicy sizePolicy12(static_cast(0), static_cast(0)); - sizePolicy12.setHorizontalStretch(0); - sizePolicy12.setVerticalStretch(0); - sizePolicy12.setHeightForWidth(TLXaxis->sizePolicy().hasHeightForWidth()); - TLXaxis->setSizePolicy(sizePolicy12); - TLXaxis->setWordWrap(false); - - gridLayout3->addWidget(TLXaxis, 0, 2, 1, 1); - - TLYaxis = new QLabel(gBCylindre); - TLYaxis->setObjectName(QString::fromUtf8("TLYaxis")); - QSizePolicy sizePolicy13(static_cast(0), static_cast(0)); - sizePolicy13.setHorizontalStretch(0); - sizePolicy13.setVerticalStretch(0); - sizePolicy13.setHeightForWidth(TLYaxis->sizePolicy().hasHeightForWidth()); - TLYaxis->setSizePolicy(sizePolicy13); - TLYaxis->setWordWrap(false); - - gridLayout3->addWidget(TLYaxis, 1, 2, 1, 1); - - TLZaxis = new QLabel(gBCylindre); - TLZaxis->setObjectName(QString::fromUtf8("TLZaxis")); - QSizePolicy sizePolicy14(static_cast(0), static_cast(0)); - sizePolicy14.setHorizontalStretch(0); - sizePolicy14.setVerticalStretch(0); - sizePolicy14.setHeightForWidth(TLZaxis->sizePolicy().hasHeightForWidth()); - TLZaxis->setSizePolicy(sizePolicy14); - TLZaxis->setWordWrap(false); - - gridLayout3->addWidget(TLZaxis, 2, 2, 1, 1); - - SpinBox_Zaxis = new QDoubleSpinBox(gBCylindre); - SpinBox_Zaxis->setObjectName(QString::fromUtf8("SpinBox_Zaxis")); - SpinBox_Zaxis->setDecimals(5); - SpinBox_Zaxis->setMaximum(1e+09); - SpinBox_Zaxis->setMinimum(-1e+09); - SpinBox_Zaxis->setValue(0); - - gridLayout3->addWidget(SpinBox_Zaxis, 2, 3, 1, 1); - - SpinBox_Yaxis = new QDoubleSpinBox(gBCylindre); - SpinBox_Yaxis->setObjectName(QString::fromUtf8("SpinBox_Yaxis")); - SpinBox_Yaxis->setDecimals(5); - SpinBox_Yaxis->setMaximum(1e+09); - SpinBox_Yaxis->setMinimum(-1e+09); - SpinBox_Yaxis->setValue(0); - - gridLayout3->addWidget(SpinBox_Yaxis, 1, 3, 1, 1); - - SpinBox_Xaxis = new QDoubleSpinBox(gBCylindre); - SpinBox_Xaxis->setObjectName(QString::fromUtf8("SpinBox_Xaxis")); - SpinBox_Xaxis->setDecimals(5); - SpinBox_Xaxis->setMaximum(1e+09); - SpinBox_Xaxis->setMinimum(-1e+09); - SpinBox_Xaxis->setValue(0); - - gridLayout3->addWidget(SpinBox_Xaxis, 0, 3, 1, 1); - - - gridLayout->addWidget(gBCylindre, 2, 0, 1, 2); - - - retranslateUi(CreateBoundaryAn); + if (CreateBoundaryAn->objectName().isEmpty()) + CreateBoundaryAn->setObjectName(QString::fromUtf8("CreateBoundaryAn")); + CreateBoundaryAn->resize(527, 701); + CreateBoundaryAn->setAutoFillBackground(true); + CreateBoundaryAn->setSizeGripEnabled(true); + gridLayout_4 = new QGridLayout(CreateBoundaryAn); + gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); + Name = new QLabel(CreateBoundaryAn); + Name->setObjectName(QString::fromUtf8("Name")); + + gridLayout_4->addWidget(Name, 0, 0, 1, 1); + + LEBoundaryName = new QLineEdit(CreateBoundaryAn); + LEBoundaryName->setObjectName(QString::fromUtf8("LEBoundaryName")); + LEBoundaryName->setMaxLength(32); + + gridLayout_4->addWidget(LEBoundaryName, 0, 1, 1, 1); + + TypeBoundary = new QGroupBox(CreateBoundaryAn); + TypeBoundary->setObjectName(QString::fromUtf8("TypeBoundary")); + QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(TypeBoundary->sizePolicy().hasHeightForWidth()); + TypeBoundary->setSizePolicy(sizePolicy); + TypeBoundary->setMinimumSize(QSize(340, 0)); + gridLayout = new QGridLayout(TypeBoundary); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + RBCylindre = new QRadioButton(TypeBoundary); + RBCylindre->setObjectName(QString::fromUtf8("RBCylindre")); + QIcon icon; + icon.addFile(QString::fromUtf8("../../resources/cylinderpointvector.png"), QSize(), QIcon::Normal, QIcon::Off); + RBCylindre->setIcon(icon); + RBCylindre->setCheckable(true); + RBCylindre->setChecked(true); + + gridLayout->addWidget(RBCylindre, 0, 0, 1, 1); + + RBSphere = new QRadioButton(TypeBoundary); + RBSphere->setObjectName(QString::fromUtf8("RBSphere")); + QIcon icon1; + icon1.addFile(QString::fromUtf8("../../resources/zone_spherepoint.png"), QSize(), QIcon::Normal, QIcon::Off); + RBSphere->setIcon(icon1); + + gridLayout->addWidget(RBSphere, 0, 1, 1, 1); + + RBCone = new QRadioButton(TypeBoundary); + RBCone->setObjectName(QString::fromUtf8("RBCone")); + QIcon icon2; + icon2.addFile(QString::fromUtf8("../../resources/cone.png"), QSize(), QIcon::Normal, QIcon::Off); + RBCone->setIcon(icon2); + + gridLayout->addWidget(RBCone, 0, 2, 1, 1); + + + gridLayout_4->addWidget(TypeBoundary, 1, 0, 1, 2); + + gBCylindre = new QGroupBox(CreateBoundaryAn); + gBCylindre->setObjectName(QString::fromUtf8("gBCylindre")); + sizePolicy.setHeightForWidth(gBCylindre->sizePolicy().hasHeightForWidth()); + gBCylindre->setSizePolicy(sizePolicy); + gridLayout1 = new QGridLayout(gBCylindre); +#ifndef Q_OS_MAC + gridLayout1->setSpacing(6); +#endif +#ifndef Q_OS_MAC + gridLayout1->setContentsMargins(9, 9, 9, 9); +#endif + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + SpinBox_Xcent = new QDoubleSpinBox(gBCylindre); + SpinBox_Xcent->setObjectName(QString::fromUtf8("SpinBox_Xcent")); + SpinBox_Xcent->setDecimals(5); + SpinBox_Xcent->setMinimum(-1e+09); + SpinBox_Xcent->setMaximum(1e+09); + SpinBox_Xcent->setValue(0); + + gridLayout1->addWidget(SpinBox_Xcent, 0, 1, 1, 1); + + TLXcent = new QLabel(gBCylindre); + TLXcent->setObjectName(QString::fromUtf8("TLXcent")); + sizePolicy.setHeightForWidth(TLXcent->sizePolicy().hasHeightForWidth()); + TLXcent->setSizePolicy(sizePolicy); + TLXcent->setWordWrap(false); + + gridLayout1->addWidget(TLXcent, 0, 0, 1, 1); + + SpinBox_Radius = new QDoubleSpinBox(gBCylindre); + SpinBox_Radius->setObjectName(QString::fromUtf8("SpinBox_Radius")); + SpinBox_Radius->setDecimals(5); + SpinBox_Radius->setMaximum(1e+09); + + gridLayout1->addWidget(SpinBox_Radius, 3, 1, 1, 2); + + SpinBox_Zcent = new QDoubleSpinBox(gBCylindre); + SpinBox_Zcent->setObjectName(QString::fromUtf8("SpinBox_Zcent")); + SpinBox_Zcent->setDecimals(5); + SpinBox_Zcent->setMinimum(-1e+09); + SpinBox_Zcent->setMaximum(1e+09); + SpinBox_Zcent->setValue(0); + + gridLayout1->addWidget(SpinBox_Zcent, 2, 1, 1, 1); + + TLradius = new QLabel(gBCylindre); + TLradius->setObjectName(QString::fromUtf8("TLradius")); + sizePolicy.setHeightForWidth(TLradius->sizePolicy().hasHeightForWidth()); + TLradius->setSizePolicy(sizePolicy); + TLradius->setWordWrap(false); + + gridLayout1->addWidget(TLradius, 3, 0, 1, 1); + + TLZcent = new QLabel(gBCylindre); + TLZcent->setObjectName(QString::fromUtf8("TLZcent")); + sizePolicy.setHeightForWidth(TLZcent->sizePolicy().hasHeightForWidth()); + TLZcent->setSizePolicy(sizePolicy); + TLZcent->setWordWrap(false); + + gridLayout1->addWidget(TLZcent, 2, 0, 1, 1); + + TLYcent = new QLabel(gBCylindre); + TLYcent->setObjectName(QString::fromUtf8("TLYcent")); + sizePolicy.setHeightForWidth(TLYcent->sizePolicy().hasHeightForWidth()); + TLYcent->setSizePolicy(sizePolicy); + TLYcent->setWordWrap(false); + + gridLayout1->addWidget(TLYcent, 1, 0, 1, 1); + + SpinBox_Ycent = new QDoubleSpinBox(gBCylindre); + SpinBox_Ycent->setObjectName(QString::fromUtf8("SpinBox_Ycent")); + SpinBox_Ycent->setDecimals(5); + SpinBox_Ycent->setMinimum(-1e+09); + SpinBox_Ycent->setMaximum(1e+09); + SpinBox_Ycent->setValue(0); + + gridLayout1->addWidget(SpinBox_Ycent, 1, 1, 1, 1); + + TLXaxis = new QLabel(gBCylindre); + TLXaxis->setObjectName(QString::fromUtf8("TLXaxis")); + sizePolicy.setHeightForWidth(TLXaxis->sizePolicy().hasHeightForWidth()); + TLXaxis->setSizePolicy(sizePolicy); + TLXaxis->setWordWrap(false); + + gridLayout1->addWidget(TLXaxis, 0, 2, 1, 1); + + TLYaxis = new QLabel(gBCylindre); + TLYaxis->setObjectName(QString::fromUtf8("TLYaxis")); + sizePolicy.setHeightForWidth(TLYaxis->sizePolicy().hasHeightForWidth()); + TLYaxis->setSizePolicy(sizePolicy); + TLYaxis->setWordWrap(false); + + gridLayout1->addWidget(TLYaxis, 1, 2, 1, 1); + + TLZaxis = new QLabel(gBCylindre); + TLZaxis->setObjectName(QString::fromUtf8("TLZaxis")); + sizePolicy.setHeightForWidth(TLZaxis->sizePolicy().hasHeightForWidth()); + TLZaxis->setSizePolicy(sizePolicy); + TLZaxis->setWordWrap(false); + + gridLayout1->addWidget(TLZaxis, 2, 2, 1, 1); + + SpinBox_Zaxis = new QDoubleSpinBox(gBCylindre); + SpinBox_Zaxis->setObjectName(QString::fromUtf8("SpinBox_Zaxis")); + SpinBox_Zaxis->setDecimals(5); + SpinBox_Zaxis->setMinimum(-1e+09); + SpinBox_Zaxis->setMaximum(1e+09); + SpinBox_Zaxis->setValue(0); + + gridLayout1->addWidget(SpinBox_Zaxis, 2, 3, 1, 1); + + SpinBox_Yaxis = new QDoubleSpinBox(gBCylindre); + SpinBox_Yaxis->setObjectName(QString::fromUtf8("SpinBox_Yaxis")); + SpinBox_Yaxis->setDecimals(5); + SpinBox_Yaxis->setMinimum(-1e+09); + SpinBox_Yaxis->setMaximum(1e+09); + SpinBox_Yaxis->setValue(0); + + gridLayout1->addWidget(SpinBox_Yaxis, 1, 3, 1, 1); + + SpinBox_Xaxis = new QDoubleSpinBox(gBCylindre); + SpinBox_Xaxis->setObjectName(QString::fromUtf8("SpinBox_Xaxis")); + SpinBox_Xaxis->setDecimals(5); + SpinBox_Xaxis->setMinimum(-1e+09); + SpinBox_Xaxis->setMaximum(1e+09); + SpinBox_Xaxis->setValue(0); + + gridLayout1->addWidget(SpinBox_Xaxis, 0, 3, 1, 1); + + + gridLayout_4->addWidget(gBCylindre, 2, 0, 1, 2); + + gBSphere = new QGroupBox(CreateBoundaryAn); + gBSphere->setObjectName(QString::fromUtf8("gBSphere")); + sizePolicy.setHeightForWidth(gBSphere->sizePolicy().hasHeightForWidth()); + gBSphere->setSizePolicy(sizePolicy); + gridLayout2 = new QGridLayout(gBSphere); +#ifndef Q_OS_MAC + gridLayout2->setSpacing(6); +#endif +#ifndef Q_OS_MAC + gridLayout2->setContentsMargins(9, 9, 9, 9); +#endif + gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); + SpinBox_Rayon = new QDoubleSpinBox(gBSphere); + SpinBox_Rayon->setObjectName(QString::fromUtf8("SpinBox_Rayon")); + SpinBox_Rayon->setDecimals(5); + SpinBox_Rayon->setMinimum(0); + SpinBox_Rayon->setMaximum(1e+09); + SpinBox_Rayon->setValue(0); + + gridLayout2->addWidget(SpinBox_Rayon, 1, 3, 1, 1); + + SpinBox_Zcentre = new QDoubleSpinBox(gBSphere); + SpinBox_Zcentre->setObjectName(QString::fromUtf8("SpinBox_Zcentre")); + SpinBox_Zcentre->setDecimals(5); + SpinBox_Zcentre->setMinimum(-1e+09); + SpinBox_Zcentre->setMaximum(1e+09); + SpinBox_Zcentre->setValue(0); + + gridLayout2->addWidget(SpinBox_Zcentre, 2, 1, 1, 1); + + TLRayon = new QLabel(gBSphere); + TLRayon->setObjectName(QString::fromUtf8("TLRayon")); + sizePolicy.setHeightForWidth(TLRayon->sizePolicy().hasHeightForWidth()); + TLRayon->setSizePolicy(sizePolicy); + TLRayon->setWordWrap(false); + + gridLayout2->addWidget(TLRayon, 1, 2, 1, 1); + + TLZcentre = new QLabel(gBSphere); + TLZcentre->setObjectName(QString::fromUtf8("TLZcentre")); + sizePolicy.setHeightForWidth(TLZcentre->sizePolicy().hasHeightForWidth()); + TLZcentre->setSizePolicy(sizePolicy); + TLZcentre->setWordWrap(false); + + gridLayout2->addWidget(TLZcentre, 2, 0, 1, 1); + + TLYcentre = new QLabel(gBSphere); + TLYcentre->setObjectName(QString::fromUtf8("TLYcentre")); + sizePolicy.setHeightForWidth(TLYcentre->sizePolicy().hasHeightForWidth()); + TLYcentre->setSizePolicy(sizePolicy); + TLYcentre->setWordWrap(false); + + gridLayout2->addWidget(TLYcentre, 1, 0, 1, 1); + + SpinBox_Ycentre = new QDoubleSpinBox(gBSphere); + SpinBox_Ycentre->setObjectName(QString::fromUtf8("SpinBox_Ycentre")); + SpinBox_Ycentre->setDecimals(5); + SpinBox_Ycentre->setMinimum(-1e+09); + SpinBox_Ycentre->setMaximum(1e+09); + SpinBox_Ycentre->setValue(0); + + gridLayout2->addWidget(SpinBox_Ycentre, 1, 1, 1, 1); + + SpinBox_Xcentre = new QDoubleSpinBox(gBSphere); + SpinBox_Xcentre->setObjectName(QString::fromUtf8("SpinBox_Xcentre")); + SpinBox_Xcentre->setDecimals(5); + SpinBox_Xcentre->setMinimum(-1e+09); + SpinBox_Xcentre->setMaximum(1e+09); + SpinBox_Xcentre->setValue(0); + + gridLayout2->addWidget(SpinBox_Xcentre, 0, 1, 1, 1); + + TLXcentre = new QLabel(gBSphere); + TLXcentre->setObjectName(QString::fromUtf8("TLXcentre")); + sizePolicy.setHeightForWidth(TLXcentre->sizePolicy().hasHeightForWidth()); + TLXcentre->setSizePolicy(sizePolicy); + TLXcentre->setWordWrap(false); + + gridLayout2->addWidget(TLXcentre, 0, 0, 1, 1); + + + gridLayout_4->addWidget(gBSphere, 3, 0, 1, 2); + + gBCone = new QGroupBox(CreateBoundaryAn); + gBCone->setObjectName(QString::fromUtf8("gBCone")); + sizePolicy.setHeightForWidth(gBCone->sizePolicy().hasHeightForWidth()); + gBCone->setSizePolicy(sizePolicy); + gridLayout_3 = new QGridLayout(gBCone); + gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); + groupBox = new QGroupBox(gBCone); + groupBox->setObjectName(QString::fromUtf8("groupBox")); + gridLayout_2 = new QGridLayout(groupBox); + gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + RB_Def_radius = new QRadioButton(groupBox); + RB_Def_radius->setObjectName(QString::fromUtf8("RB_Def_radius")); + QIcon icon3; + icon3.addFile(QString::fromUtf8("../../resources/conedxyz.png"), QSize(), QIcon::Normal, QIcon::Off); + RB_Def_radius->setIcon(icon3); + RB_Def_radius->setChecked(true); + + gridLayout_2->addWidget(RB_Def_radius, 0, 0, 1, 1); + + RB_Def_angle = new QRadioButton(groupBox); + RB_Def_angle->setObjectName(QString::fromUtf8("RB_Def_angle")); + QIcon icon4; + icon4.addFile(QString::fromUtf8("../../resources/conepointvector.png"), QSize(), QIcon::Normal, QIcon::Off); + RB_Def_angle->setIcon(icon4); + + gridLayout_2->addWidget(RB_Def_angle, 0, 1, 1, 1); + + + gridLayout_3->addWidget(groupBox, 0, 0, 1, 2); + + TLCone_X1 = new QLabel(gBCone); + TLCone_X1->setObjectName(QString::fromUtf8("TLCone_X1")); + sizePolicy.setHeightForWidth(TLCone_X1->sizePolicy().hasHeightForWidth()); + TLCone_X1->setSizePolicy(sizePolicy); + TLCone_X1->setWordWrap(false); + + gridLayout_3->addWidget(TLCone_X1, 1, 0, 1, 1); + + SpinBox_Cone_X1 = new QDoubleSpinBox(gBCone); + SpinBox_Cone_X1->setObjectName(QString::fromUtf8("SpinBox_Cone_X1")); + SpinBox_Cone_X1->setDecimals(5); + SpinBox_Cone_X1->setMinimum(-1e+09); + SpinBox_Cone_X1->setMaximum(1e+09); + SpinBox_Cone_X1->setValue(0); + + gridLayout_3->addWidget(SpinBox_Cone_X1, 1, 1, 1, 1); + + TLCone_X2 = new QLabel(gBCone); + TLCone_X2->setObjectName(QString::fromUtf8("TLCone_X2")); + sizePolicy.setHeightForWidth(TLCone_X2->sizePolicy().hasHeightForWidth()); + TLCone_X2->setSizePolicy(sizePolicy); + TLCone_X2->setWordWrap(false); + + gridLayout_3->addWidget(TLCone_X2, 1, 2, 1, 1); + + SpinBox_Cone_X2 = new QDoubleSpinBox(gBCone); + SpinBox_Cone_X2->setObjectName(QString::fromUtf8("SpinBox_Cone_X2")); + SpinBox_Cone_X2->setDecimals(5); + SpinBox_Cone_X2->setMinimum(-1e+09); + SpinBox_Cone_X2->setMaximum(1e+09); + SpinBox_Cone_X2->setValue(0); + + gridLayout_3->addWidget(SpinBox_Cone_X2, 1, 3, 1, 1); + + TLCone_Y1 = new QLabel(gBCone); + TLCone_Y1->setObjectName(QString::fromUtf8("TLCone_Y1")); + sizePolicy.setHeightForWidth(TLCone_Y1->sizePolicy().hasHeightForWidth()); + TLCone_Y1->setSizePolicy(sizePolicy); + TLCone_Y1->setWordWrap(false); + + gridLayout_3->addWidget(TLCone_Y1, 2, 0, 1, 1); + + SpinBox_Cone_Y1 = new QDoubleSpinBox(gBCone); + SpinBox_Cone_Y1->setObjectName(QString::fromUtf8("SpinBox_Cone_Y1")); + SpinBox_Cone_Y1->setDecimals(5); + SpinBox_Cone_Y1->setMinimum(-1e+09); + SpinBox_Cone_Y1->setMaximum(1e+09); + SpinBox_Cone_Y1->setValue(0); + + gridLayout_3->addWidget(SpinBox_Cone_Y1, 2, 1, 1, 1); + + TLCone_Y2 = new QLabel(gBCone); + TLCone_Y2->setObjectName(QString::fromUtf8("TLCone_Y2")); + sizePolicy.setHeightForWidth(TLCone_Y2->sizePolicy().hasHeightForWidth()); + TLCone_Y2->setSizePolicy(sizePolicy); + TLCone_Y2->setWordWrap(false); + + gridLayout_3->addWidget(TLCone_Y2, 2, 2, 1, 1); + + SpinBox_Cone_Y2 = new QDoubleSpinBox(gBCone); + SpinBox_Cone_Y2->setObjectName(QString::fromUtf8("SpinBox_Cone_Y2")); + SpinBox_Cone_Y2->setDecimals(5); + SpinBox_Cone_Y2->setMinimum(-1e+09); + SpinBox_Cone_Y2->setMaximum(1e+09); + SpinBox_Cone_Y2->setValue(0); + + gridLayout_3->addWidget(SpinBox_Cone_Y2, 2, 3, 1, 1); + + TLCone_Z1 = new QLabel(gBCone); + TLCone_Z1->setObjectName(QString::fromUtf8("TLCone_Z1")); + sizePolicy.setHeightForWidth(TLCone_Z1->sizePolicy().hasHeightForWidth()); + TLCone_Z1->setSizePolicy(sizePolicy); + TLCone_Z1->setWordWrap(false); + + gridLayout_3->addWidget(TLCone_Z1, 3, 0, 1, 1); + + SpinBox_Cone_Z1 = new QDoubleSpinBox(gBCone); + SpinBox_Cone_Z1->setObjectName(QString::fromUtf8("SpinBox_Cone_Z1")); + SpinBox_Cone_Z1->setDecimals(5); + SpinBox_Cone_Z1->setMinimum(-1e+09); + SpinBox_Cone_Z1->setMaximum(1e+09); + SpinBox_Cone_Z1->setValue(0); + + gridLayout_3->addWidget(SpinBox_Cone_Z1, 3, 1, 1, 1); + + TLCone_Z2 = new QLabel(gBCone); + TLCone_Z2->setObjectName(QString::fromUtf8("TLCone_Z2")); + sizePolicy.setHeightForWidth(TLCone_Z2->sizePolicy().hasHeightForWidth()); + TLCone_Z2->setSizePolicy(sizePolicy); + TLCone_Z2->setWordWrap(false); + + gridLayout_3->addWidget(TLCone_Z2, 3, 2, 1, 1); + + SpinBox_Cone_Z2 = new QDoubleSpinBox(gBCone); + SpinBox_Cone_Z2->setObjectName(QString::fromUtf8("SpinBox_Cone_Z2")); + SpinBox_Cone_Z2->setDecimals(5); + SpinBox_Cone_Z2->setMinimum(-1e+09); + SpinBox_Cone_Z2->setMaximum(1e+09); + SpinBox_Cone_Z2->setValue(0); + + gridLayout_3->addWidget(SpinBox_Cone_Z2, 3, 3, 1, 1); + + TLCone_V1 = new QLabel(gBCone); + TLCone_V1->setObjectName(QString::fromUtf8("TLCone_V1")); + sizePolicy.setHeightForWidth(TLCone_V1->sizePolicy().hasHeightForWidth()); + TLCone_V1->setSizePolicy(sizePolicy); + TLCone_V1->setWordWrap(false); + + gridLayout_3->addWidget(TLCone_V1, 4, 0, 1, 1); + + SpinBox_Cone_V1 = new QDoubleSpinBox(gBCone); + SpinBox_Cone_V1->setObjectName(QString::fromUtf8("SpinBox_Cone_V1")); + SpinBox_Cone_V1->setDecimals(14); + SpinBox_Cone_V1->setMaximum(1e+09); + + gridLayout_3->addWidget(SpinBox_Cone_V1, 4, 1, 1, 1); + + TLCone_V2 = new QLabel(gBCone); + TLCone_V2->setObjectName(QString::fromUtf8("TLCone_V2")); + sizePolicy.setHeightForWidth(TLCone_V2->sizePolicy().hasHeightForWidth()); + TLCone_V2->setSizePolicy(sizePolicy); + TLCone_V2->setWordWrap(false); + + gridLayout_3->addWidget(TLCone_V2, 4, 2, 1, 1); - QSize size(458, 500); - size = size.expandedTo(CreateBoundaryAn->minimumSizeHint()); - CreateBoundaryAn->resize(size); - - - QMetaObject::connectSlotsByName(CreateBoundaryAn); + SpinBox_Cone_V2 = new QDoubleSpinBox(gBCone); + SpinBox_Cone_V2->setObjectName(QString::fromUtf8("SpinBox_Cone_V2")); + SpinBox_Cone_V2->setDecimals(14); + SpinBox_Cone_V2->setMaximum(1e+09); + + gridLayout_3->addWidget(SpinBox_Cone_V2, 4, 3, 1, 1); + + + gridLayout_4->addWidget(gBCone, 4, 0, 1, 2); + + GBButtons = new QGroupBox(CreateBoundaryAn); + GBButtons->setObjectName(QString::fromUtf8("GBButtons")); + sizePolicy.setHeightForWidth(GBButtons->sizePolicy().hasHeightForWidth()); + GBButtons->setSizePolicy(sizePolicy); + gridLayout3 = new QGridLayout(GBButtons); +#ifndef Q_OS_MAC + gridLayout3->setSpacing(6); +#endif +#ifndef Q_OS_MAC + gridLayout3->setContentsMargins(9, 9, 9, 9); +#endif + gridLayout3->setObjectName(QString::fromUtf8("gridLayout3")); + buttonHelp = new QPushButton(GBButtons); + buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); + + gridLayout3->addWidget(buttonHelp, 0, 3, 1, 1); + + buttonCancel = new QPushButton(GBButtons); + buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + + gridLayout3->addWidget(buttonCancel, 0, 2, 1, 1); + + buttonApply = new QPushButton(GBButtons); + buttonApply->setObjectName(QString::fromUtf8("buttonApply")); + + gridLayout3->addWidget(buttonApply, 0, 1, 1, 1); + + buttonOk = new QPushButton(GBButtons); + buttonOk->setObjectName(QString::fromUtf8("buttonOk")); + + gridLayout3->addWidget(buttonOk, 0, 0, 1, 1); + + + gridLayout_4->addWidget(GBButtons, 5, 0, 1, 2); + + + retranslateUi(CreateBoundaryAn); + + QMetaObject::connectSlotsByName(CreateBoundaryAn); } // setupUi void retranslateUi(QDialog *CreateBoundaryAn) { - CreateBoundaryAn->setWindowTitle(QApplication::translate("CreateBoundaryAn", "Create an analytical boundary", 0, QApplication::UnicodeUTF8)); - GBButtons->setTitle(QString()); - buttonHelp->setText(QApplication::translate("CreateBoundaryAn", "Help", 0, QApplication::UnicodeUTF8)); - buttonCancel->setText(QApplication::translate("CreateBoundaryAn", "Cancel", 0, QApplication::UnicodeUTF8)); - buttonApply->setText(QApplication::translate("CreateBoundaryAn", "Apply", 0, QApplication::UnicodeUTF8)); - buttonOk->setText(QApplication::translate("CreateBoundaryAn", "OK", 0, QApplication::UnicodeUTF8)); - Name->setText(QApplication::translate("CreateBoundaryAn", "Name", 0, QApplication::UnicodeUTF8)); - TypeBoundary->setTitle(QApplication::translate("CreateBoundaryAn", "Type of boundary", 0, QApplication::UnicodeUTF8)); - RBCylindre->setText(QApplication::translate("CreateBoundaryAn", "Cylinder", 0, QApplication::UnicodeUTF8)); - RBSphere->setText(QApplication::translate("CreateBoundaryAn", "Sphere", 0, QApplication::UnicodeUTF8)); - gBSphere->setTitle(QApplication::translate("CreateBoundaryAn", "Coordinates", 0, QApplication::UnicodeUTF8)); - TLRayon->setText(QApplication::translate("CreateBoundaryAn", "Radius", 0, QApplication::UnicodeUTF8)); - TLZcentre->setText(QApplication::translate("CreateBoundaryAn", "Z centre", 0, QApplication::UnicodeUTF8)); - TLYcentre->setText(QApplication::translate("CreateBoundaryAn", "Y centre", 0, QApplication::UnicodeUTF8)); - TLXcentre->setText(QApplication::translate("CreateBoundaryAn", "X centre", 0, QApplication::UnicodeUTF8)); - gBCylindre->setTitle(QApplication::translate("CreateBoundaryAn", "Coordinates", 0, QApplication::UnicodeUTF8)); - TLXcent->setText(QApplication::translate("CreateBoundaryAn", "X centre", 0, QApplication::UnicodeUTF8)); - TLradius->setText(QApplication::translate("CreateBoundaryAn", "Radius", 0, QApplication::UnicodeUTF8)); - TLZcent->setText(QApplication::translate("CreateBoundaryAn", "Z centre", 0, QApplication::UnicodeUTF8)); - TLYcent->setText(QApplication::translate("CreateBoundaryAn", "Y centre", 0, QApplication::UnicodeUTF8)); - TLXaxis->setText(QApplication::translate("CreateBoundaryAn", "X axis", 0, QApplication::UnicodeUTF8)); - TLYaxis->setText(QApplication::translate("CreateBoundaryAn", "Y axis", 0, QApplication::UnicodeUTF8)); - TLZaxis->setText(QApplication::translate("CreateBoundaryAn", "Z axis", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(CreateBoundaryAn); + CreateBoundaryAn->setWindowTitle(QApplication::translate("CreateBoundaryAn", "Create an analytical boundary", 0, QApplication::UnicodeUTF8)); + Name->setText(QApplication::translate("CreateBoundaryAn", "Name", 0, QApplication::UnicodeUTF8)); + TypeBoundary->setTitle(QApplication::translate("CreateBoundaryAn", "Type of boundary", 0, QApplication::UnicodeUTF8)); + RBCylindre->setText(QApplication::translate("CreateBoundaryAn", "Cylinder", 0, QApplication::UnicodeUTF8)); + RBSphere->setText(QApplication::translate("CreateBoundaryAn", "Sphere", 0, QApplication::UnicodeUTF8)); + RBCone->setText(QApplication::translate("CreateBoundaryAn", "Cone", 0, QApplication::UnicodeUTF8)); + gBCylindre->setTitle(QApplication::translate("CreateBoundaryAn", "Coordinates", 0, QApplication::UnicodeUTF8)); + TLXcent->setText(QApplication::translate("CreateBoundaryAn", "X centre", 0, QApplication::UnicodeUTF8)); + TLradius->setText(QApplication::translate("CreateBoundaryAn", "Radius", 0, QApplication::UnicodeUTF8)); + TLZcent->setText(QApplication::translate("CreateBoundaryAn", "Z centre", 0, QApplication::UnicodeUTF8)); + TLYcent->setText(QApplication::translate("CreateBoundaryAn", "Y centre", 0, QApplication::UnicodeUTF8)); + TLXaxis->setText(QApplication::translate("CreateBoundaryAn", "X axis", 0, QApplication::UnicodeUTF8)); + TLYaxis->setText(QApplication::translate("CreateBoundaryAn", "Y axis", 0, QApplication::UnicodeUTF8)); + TLZaxis->setText(QApplication::translate("CreateBoundaryAn", "Z axis", 0, QApplication::UnicodeUTF8)); + gBSphere->setTitle(QApplication::translate("CreateBoundaryAn", "Coordinates", 0, QApplication::UnicodeUTF8)); + TLRayon->setText(QApplication::translate("CreateBoundaryAn", "Radius", 0, QApplication::UnicodeUTF8)); + TLZcentre->setText(QApplication::translate("CreateBoundaryAn", "Z centre", 0, QApplication::UnicodeUTF8)); + TLYcentre->setText(QApplication::translate("CreateBoundaryAn", "Y centre", 0, QApplication::UnicodeUTF8)); + TLXcentre->setText(QApplication::translate("CreateBoundaryAn", "X centre", 0, QApplication::UnicodeUTF8)); + gBCone->setTitle(QApplication::translate("CreateBoundaryAn", "Coordinates", 0, QApplication::UnicodeUTF8)); + groupBox->setTitle(QApplication::translate("CreateBoundaryAn", "Definition", 0, QApplication::UnicodeUTF8)); + RB_Def_radius->setText(QApplication::translate("CreateBoundaryAn", "Radius", 0, QApplication::UnicodeUTF8)); + RB_Def_angle->setText(QApplication::translate("CreateBoundaryAn", "Angle", 0, QApplication::UnicodeUTF8)); + TLCone_X1->setText(QApplication::translate("CreateBoundaryAn", "X 1", 0, QApplication::UnicodeUTF8)); + TLCone_X2->setText(QApplication::translate("CreateBoundaryAn", "X 2", 0, QApplication::UnicodeUTF8)); + TLCone_Y1->setText(QApplication::translate("CreateBoundaryAn", "Y 1", 0, QApplication::UnicodeUTF8)); + TLCone_Y2->setText(QApplication::translate("CreateBoundaryAn", "Y 2", 0, QApplication::UnicodeUTF8)); + TLCone_Z1->setText(QApplication::translate("CreateBoundaryAn", "Z 1", 0, QApplication::UnicodeUTF8)); + TLCone_Z2->setText(QApplication::translate("CreateBoundaryAn", "Z 2", 0, QApplication::UnicodeUTF8)); + TLCone_V1->setText(QApplication::translate("CreateBoundaryAn", "V 1", 0, QApplication::UnicodeUTF8)); + TLCone_V2->setText(QApplication::translate("CreateBoundaryAn", "V 2", 0, QApplication::UnicodeUTF8)); + GBButtons->setTitle(QString()); + buttonHelp->setText(QApplication::translate("CreateBoundaryAn", "Help", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("CreateBoundaryAn", "Cancel", 0, QApplication::UnicodeUTF8)); + buttonApply->setText(QApplication::translate("CreateBoundaryAn", "Apply", 0, QApplication::UnicodeUTF8)); + buttonOk->setText(QApplication::translate("CreateBoundaryAn", "OK", 0, QApplication::UnicodeUTF8)); } // retranslateUi }; @@ -441,4 +618,6 @@ namespace Ui { class CreateBoundaryAn: public Ui_CreateBoundaryAn {}; } // namespace Ui +QT_END_NAMESPACE + #endif // CREATEBOUNDARYAN_H diff --git a/src/HOMARDGUI/CreateBoundaryAn.ui b/src/HOMARDGUI/CreateBoundaryAn.ui index 0750df02..b35422c3 100644 --- a/src/HOMARDGUI/CreateBoundaryAn.ui +++ b/src/HOMARDGUI/CreateBoundaryAn.ui @@ -1,558 +1,823 @@ - + + CreateBoundaryAn - - + + 0 0 - 458 - 500 + 527 + 701 - + Create an analytical boundary - + true - + true - - - 9 - - - 6 - - - - - - 0 - 0 - 0 - 0 - - - - - - - - 9 - - - 6 - - - - - Help - - - - - - - Cancel - - - - - - - Apply - - - - - - - OK - - - - - - - - - + + + + Name - - - + + + 32 - - - - - 0 - 0 + + + + 0 0 - + 340 0 - + Type of boundary - - - 9 - - - 6 - - - - + + + + Cylinder - - ../../resources/cylinderpointvector.png + + + ../../resources/cylinderpointvector.png../../resources/cylinderpointvector.png - + true - + true - - - + + + Sphere - - ../../resources/zone_spherepoint.png + + + ../../resources/zone_spherepoint.png../../resources/zone_spherepoint.png + + + + + + + Cone + + + + ../../resources/cone.png../../resources/cone.png - - - - - 0 - 0 + + + + 0 0 - + Coordinates - - + + 9 - + 6 - - - + + + 5 - + + -999999999.000000000000000 + + 999999999.000000000000000 - + 0.000000000000000 - - 0.000000000000000 + + + + + + + 0 + 0 + + + + X centre + + + false - - - + + + 5 - - 999999999.000000000000000 + + 1000000000.000000000000000 + + + + + + + 5 - + -999999999.000000000000000 - + + 999999999.000000000000000 + + 0.000000000000000 - - - - - 0 - 0 + + + + 0 0 - + Radius - + false - - - - - 0 - 0 + + + + 0 0 - + Z centre - + false - - - - - 0 - 0 + + + + 0 0 - + Y centre - + false - - - + + + 5 - - 999999999.000000000000000 - - + -999999999.000000000000000 - + + 999999999.000000000000000 + + 0.000000000000000 - - - - 5 + + + + + 0 + 0 + - - 999999999.000000000000000 + + X axis - - -999999999.000000000000000 + + false - - 0.000000000000000 + + + + + + + 0 + 0 + + + + Y axis + + + false - - - - - 0 - 0 + + + + 0 0 - - X centre + + Z axis - + false + + + + 5 + + + -999999999.000000000000000 + + + 999999999.000000000000000 + + + 0.000000000000000 + + + + + + + 5 + + + -999999999.000000000000000 + + + 999999999.000000000000000 + + + 0.000000000000000 + + + + + + + 5 + + + -999999999.000000000000000 + + + 999999999.000000000000000 + + + 0.000000000000000 + + + - - - - - 0 - 0 + + + + 0 0 - + Coordinates - - + + 9 - + 6 - - - + + + 5 - + + 0.000000000000000 + + 999999999.000000000000000 - + + 0.000000000000000 + + + + + + + 5 + + -999999999.000000000000000 - + + 999999999.000000000000000 + + 0.000000000000000 - - - - - 0 - 0 + + + + 0 0 - - X centre + + Radius - + false - - - - 5 + + + + + 0 + 0 + - - 1000000000.000000000000000 + + Z centre + + + false - - - + + + + + 0 + 0 + + + + Y centre + + + false + + + + + + 5 - + + -999999999.000000000000000 + + 999999999.000000000000000 - + + 0.000000000000000 + + + + + + + 5 + + -999999999.000000000000000 - + + 999999999.000000000000000 + + 0.000000000000000 - - - - - 0 - 0 + + + + 0 0 - - Radius + + X centre - + false - - - - - 0 - 0 + + + + + + + + 0 + 0 + + + + Coordinates + + + + + + Definition + + + + + + Radius + + + + ../../resources/conedxyz.png../../resources/conedxyz.png + + + true + + + + + + + Angle + + + + ../../resources/conepointvector.png../../resources/conepointvector.png + + + + + + + + + + 0 0 - - Z centre + + X 1 - + false - - - - - 0 - 0 + + + + 5 + + + -999999999.000000000000000 + + + 999999999.000000000000000 + + + 0.000000000000000 + + + + + + + 0 0 - - Y centre + + X 2 - + false - - - + + + 5 - - 999999999.000000000000000 - - + -999999999.000000000000000 - + + 999999999.000000000000000 + + 0.000000000000000 - - - - - 0 - 0 + + + + 0 0 - - X axis + + Y 1 - + false - - - - - 0 - 0 + + + + 5 + + + -999999999.000000000000000 + + + 999999999.000000000000000 + + + 0.000000000000000 + + + + + + + 0 0 - - Y axis + + Y 2 - + false - - - - - 0 - 0 + + + + 5 + + + -999999999.000000000000000 + + + 999999999.000000000000000 + + + 0.000000000000000 + + + + + + + 0 0 - - Z axis + + Z 1 - + false - - - + + + 5 - - 999999999.000000000000000 - - + -999999999.000000000000000 - + + 999999999.000000000000000 + + 0.000000000000000 - - - - 5 + + + + + 0 + 0 + - - 999999999.000000000000000 + + Z 2 - + + false + + + + + + + 5 + + -999999999.000000000000000 - + + 999999999.000000000000000 + + 0.000000000000000 - - - - 5 + + + + + 0 + 0 + - - 999999999.000000000000000 + + V 1 - - -999999999.000000000000000 + + false - - 0.000000000000000 + + + + + + 14 + + + 1000000000.000000000000000 + + + + + + + + 0 + 0 + + + + V 2 + + + false + + + + + + + 14 + + + 1000000000.000000000000000 + + + + + + + + + + + 0 + 0 + + + + + + + + 9 + + + 6 + + + + + Help + + + + + + + Cancel + + + + + + + Apply + + + + + + + OK diff --git a/src/HOMARDGUI/HOMARDGUI.cxx b/src/HOMARDGUI/HOMARDGUI.cxx index 610157b3..1009c23e 100644 --- a/src/HOMARDGUI/HOMARDGUI.cxx +++ b/src/HOMARDGUI/HOMARDGUI.cxx @@ -287,7 +287,7 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID) catch( SALOME::SALOME_Exception& S_ex ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QString(CORBA::string_dup(S_ex.details.text)) ); + QObject::tr(CORBA::string_dup(S_ex.details.text)) ); getApp()->updateObjectBrowser(); return false; } @@ -370,7 +370,7 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID) catch( SALOME::SALOME_Exception& S_ex ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QString(CORBA::string_dup(S_ex.details.text)) ); + QObject::tr(CORBA::string_dup(S_ex.details.text)) ); getApp()->updateObjectBrowser(); return false; } @@ -383,7 +383,7 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID) catch( SALOME::SALOME_Exception& S_ex ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QString(CORBA::string_dup(S_ex.details.text)) ); + QObject::tr(CORBA::string_dup(S_ex.details.text)) ); getApp()->updateObjectBrowser(); return false; } @@ -396,7 +396,7 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID) catch( SALOME::SALOME_Exception& S_ex ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QString(CORBA::string_dup(S_ex.details.text)) ); + QObject::tr(CORBA::string_dup(S_ex.details.text)) ); getApp()->updateObjectBrowser(); return false; } @@ -409,7 +409,7 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID) catch( SALOME::SALOME_Exception& S_ex ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QString(CORBA::string_dup(S_ex.details.text)) ); + QObject::tr(CORBA::string_dup(S_ex.details.text)) ); getApp()->updateObjectBrowser(); return false; } @@ -422,7 +422,7 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID) catch( SALOME::SALOME_Exception& S_ex ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QString(CORBA::string_dup(S_ex.details.text)) ); + QObject::tr(CORBA::string_dup(S_ex.details.text)) ); getApp()->updateObjectBrowser(); return false; } diff --git a/src/HOMARDGUI/HOMARD_msg_fr.ts b/src/HOMARDGUI/HOMARD_msg_fr.ts index 4d0509b9..40abcbdb 100644 --- a/src/HOMARDGUI/HOMARD_msg_fr.ts +++ b/src/HOMARDGUI/HOMARD_msg_fr.ts @@ -351,6 +351,74 @@ Previous iteration Itération précédente + + Invalid boundary + Frontière non valable + + + Invalid case + Cas non valable + + + Invalid case context + Cas contextuel non valable + + + Invalid hypothesis + Hypothèse non valable + + + Invalid iteration + Itération non valable + + + Invalid zone + Zone non valable + + + This boundary has already been defined. + Cette frontière est déjà définie. + + + This case has already been defined. + Ce cas est déjà défini. + + + This hypothesis has already been defined. + Cette hypothèse est déjà définie. + + + This iteration has already been defined. + Cette itération est déjà définie. + + + This zone has already been defined. + Cette zone est déjà définie. + + + The parent iteration is not defined. + L'itération parent n'est pas définie. + + + Unable to create the iteration. + Impossible de créer l'itération. + + + This iteration is the first of the case and cannot be computed. + Cette itération définit le point de départ du cas. Elle ne peut pas être calculée. + + + This iteration does not have any associated hypothesis. + Cette itération n'est associée à aucune hypothèse. + + + The mesh file does not exist. + Le fichier du maillage n'existe pas. + + + The mesh file cannot be deleted. + Impossible de supprimer le fichier du maillage. + Mesh n Maillage n @@ -603,6 +671,14 @@ Radius Rayon + + Radius 1 + Rayon 1 + + + Radius 2 + Rayon 2 + External radius Rayon externe @@ -641,7 +717,7 @@ HOM_AXE - L'axe doit être un vecteur non nul. + L'axe doit être un vecteur non nul. HOM_BOUN_A_EDIT_WINDOW_TITLE @@ -655,6 +731,58 @@ HOM_GROU_EDIT_WINDOW_TITLE Groupes choisis + + The height must be positive. + La hauteur doit être positive. + + + The radius must be positive. + Un rayon doit être positif. + + + The axis must be a non 0 vector. + L'axe doit être un vecteur non nul. + + + The angle must be included higher than 0 degree and lower than 90 degrees. + L'angle doit être compris entre 0 et 90 degrés. + + + The radius must be different. + Les rayons doivent être différents. + + + The centers must be different. + Les centres doivent être différents. + + + The external radius must be higher than the internal radius. + Le rayon externe doit être supérieur au rayon interne. + + + The X coordinates are not coherent. + Les coordonnées en X ne sont pas cohérentes. + + + The Y coordinates are not coherent. + Les coordonnées en Y ne sont pas cohérentes. + + + The Z coordinates are not coherent. + Les coordonnées en Z ne sont pas cohérentes. + + + The first coordinates are not coherent. + Les premières coordonnées ne sont pas cohérentes. + + + The second coordinates are not coherent. + Les secondes coordonnées ne sont pas cohérentes. + + + The orientation must be 1, 2 or 3. + L'orientation vaut 1, 2 ou 3. + HOM_MESH_INFO_0 Analyse de maillage @@ -707,6 +835,30 @@ Entanglement Interpénétration + + No change is allowed in a boundary. Ask for evolution. + Impossible de changer une donnée dans une frontière. Demander une évolution. + + + This boundary is used in a case and cannot be deleted. + Cette frontière est utilisée dans un cas ; elle ne peut pas être détruite. + + + This hypothesis is used and cannot be deleted. + Cette hypothèse est utilisée dans une itération ; elle ne peut pas être détruite. + + + This iteration cannot be deleted. + Cette itération ne peut pas être détruite. + + + This zone is used in an hypothesis and cannot be deleted. + Cette zone est utilisée dans une hypothèse ; elle ne peut pas être détruite. + + + The directory for the calculation cannot be cleared. + Menage du repertoire de calcul impossible + Edit a file Affichage d'un fichier @@ -715,5 +867,9 @@ Print Imprimer + + Invalid study context + Etude contextuelle non valable + diff --git a/src/HOMARDGUI/HomardQtCommun.cxx b/src/HOMARDGUI/HomardQtCommun.cxx index f0168645..6f00f3ce 100644 --- a/src/HOMARDGUI/HomardQtCommun.cxx +++ b/src/HOMARDGUI/HomardQtCommun.cxx @@ -310,7 +310,7 @@ std::list HOMARD_QT_COMMUN::GetListeChamps(QString aFile) if (ncha < 1 ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QObject::tr("HOM_MED_FILE_5") ); + QObject::tr("HOM_MED_FILE_5") ); MEDfileClose(medIdt); return ListeChamp; } @@ -364,7 +364,7 @@ std::list HOMARD_QT_COMMUN::GetListeComposants(QString aFile, QString a if (ncha < 1 ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QObject::tr("HOM_MED_FILE_5") ); + QObject::tr("HOM_MED_FILE_5") ); MEDfileClose(medIdt); return ListeComposants; } diff --git a/src/HOMARDGUI/MonCreateBoundaryAn.cxx b/src/HOMARDGUI/MonCreateBoundaryAn.cxx index 57fa3090..5a2425b8 100644 --- a/src/HOMARDGUI/MonCreateBoundaryAn.cxx +++ b/src/HOMARDGUI/MonCreateBoundaryAn.cxx @@ -36,6 +36,8 @@ using namespace std; #include #include +#include "math.h" +#define PI 3.141592653589793 // ------------------------------------------------------------------------------------------------------------------------ MonCreateBoundaryAn::MonCreateBoundaryAn(MonCreateCase* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen, @@ -49,11 +51,15 @@ MonCreateBoundaryAn::MonCreateBoundaryAn(MonCreateCase* parent, bool modal, _parent(parent), _aName (""), _aCaseName(caseName), + _Xmin(0), _Xmax(0), _Xincr(0), _Ymin(0), _Ymax(0), _Yincr(0), _Zmin(0), _Zmax(0), _Zincr(0), _DMax(0), _Type(1), _BoundaryAnXcentre(0), _BoundaryAnYcentre(0), _BoundaryAnZcentre(0), _BoundaryAnRayon(0), _BoundaryAnXaxis(0), _BoundaryAnYaxis(0), _BoundaryAnZaxis(0), _Xcentre(0), _Ycentre(0), _Zcentre(0), _Rayon(0), - _Xmin(0), _Xmax(0), _Xincr(0), _Ymin(0), _Ymax(0), _Yincr(0), _Zmin(0), _Zmax(0), _Zincr(0), _DMax(0), + _BoundaryAnXcone1(0), _BoundaryAnYcone1(0), _BoundaryAnZcone1(0), _BoundaryAnRayon1(0), + _BoundaryAnXcone2(0), _BoundaryAnYcone2(0), _BoundaryAnZcone2(0), _BoundaryAnRayon2(0), + _BoundaryAnXaxisCone(0), _BoundaryAnYaxisCone(0), _BoundaryAnZaxisCone(0), + _BoundaryAngle(0), Chgt (false) { MESSAGE("Constructeur") ; @@ -69,6 +75,15 @@ MonCreateBoundaryAn::MonCreateBoundaryAn(MonCreateCase* parent, bool modal, QPixmap pix2 = resMgr->loadPixmap( "HOMARD", "cylinderpointvector.png" ); QIcon IS2=QIcon(pix2); RBCylindre->setIcon(IS2); + QPixmap pix3 = resMgr->loadPixmap( "HOMARD", "cone.png" ); + QIcon IS3=QIcon(pix3); + RBCone->setIcon(IS3); + QPixmap pix4 = resMgr->loadPixmap( "HOMARD", "conepointvector.png" ); + QIcon IS4=QIcon(pix4); + RB_Def_angle->setIcon(IS4); + QPixmap pix5 = resMgr->loadPixmap( "HOMARD", "conedxyz.png" ); + QIcon IS5=QIcon(pix5); + RB_Def_radius->setIcon(IS5); InitConnect( ); @@ -106,6 +121,15 @@ MonCreateBoundaryAn::MonCreateBoundaryAn(MonCreateCase* parent, QPixmap pix2 = resMgr->loadPixmap( "HOMARD", "cylinderpointvector.png" ); QIcon IS2=QIcon(pix2); RBCylindre->setIcon(IS2); + QPixmap pix3 = resMgr->loadPixmap( "HOMARD", "cone.png" ); + QIcon IS3=QIcon(pix3); + RBCone->setIcon(IS3); + QPixmap pix4 = resMgr->loadPixmap( "HOMARD", "conepointvector.png" ); + QIcon IS4=QIcon(pix4); + RB_Def_angle->setIcon(IS4); + QPixmap pix5 = resMgr->loadPixmap( "HOMARD", "conedxyz.png" ); + QIcon IS5=QIcon(pix5); + RB_Def_radius->setIcon(IS5); setModal(true); InitConnect(); } @@ -120,8 +144,11 @@ MonCreateBoundaryAn::~MonCreateBoundaryAn() void MonCreateBoundaryAn::InitConnect() // ------------------------------------------------------------------------ { - connect( RBCylindre, SIGNAL(clicked()) , this, SLOT(SetCylinder()) ) ; - connect( RBSphere, SIGNAL(clicked()) , this, SLOT(SetSphere()) ) ; + connect( RBCylindre, SIGNAL(clicked()) , this, SLOT(SetCylinder()) ) ; + connect( RBSphere, SIGNAL(clicked()) , this, SLOT(SetSphere()) ) ; + connect( RBCone, SIGNAL(clicked()) , this, SLOT(SetCone()) ) ; + connect( RB_Def_radius, SIGNAL(clicked()) , this, SLOT(SetConeR()) ); + connect( RB_Def_angle, SIGNAL(clicked()) , this, SLOT(SetConeA()) ); connect( buttonOk, SIGNAL( pressed() ), this, SLOT( PushOnOK() ) ); connect( buttonApply, SIGNAL( pressed() ), this, SLOT( PushOnApply() ) ); connect( buttonCancel, SIGNAL( pressed() ), this, SLOT( close() ) ); @@ -164,20 +191,77 @@ void MonCreateBoundaryAn::InitValBoundaryAn() void MonCreateBoundaryAn::InitMinMax() // ------------------------------------------------------------------------ { -// en X + // Cylindre + // . X du centre + SpinBox_Xcent->setValue(_Xcentre); + SpinBox_Xcent->setSingleStep(_Xincr); + // . Y du centre + SpinBox_Ycent->setValue(_Ycentre); + SpinBox_Ycent->setSingleStep(_Yincr); + // . Z du centre + SpinBox_Zcent->setValue(_Zcentre); + SpinBox_Zcent->setSingleStep(_Zincr); + // . X de l'axe + SpinBox_Xaxis->setValue(0.); SpinBox_Xaxis->setSingleStep(0.1); - SpinBox_Xcentre->setSingleStep(_Xincr); -//en Y + // . Y de l'axe + SpinBox_Yaxis->setValue(0.); SpinBox_Yaxis->setSingleStep(0.1); - SpinBox_Ycentre->setSingleStep(_Yincr); -//en Z + // . Z de l'axe + SpinBox_Zaxis->setValue(1.); SpinBox_Zaxis->setSingleStep(0.1); - SpinBox_Zcentre->setSingleStep(_Zincr); -// Rayon + // . Rayon + SpinBox_Radius->setValue(_Rayon); SpinBox_Radius->setSingleStep(_Rayon/10.); SpinBox_Radius->setMinimum(0.); + + // Sphere + // . X du centre + SpinBox_Xcentre->setValue(_Xcentre); + SpinBox_Xcentre->setSingleStep(_Xincr); + // . Y du centre + SpinBox_Ycentre->setValue(_Ycentre); + SpinBox_Ycentre->setSingleStep(_Yincr); + // . Z du centre + SpinBox_Zcentre->setValue(_Zcentre); + SpinBox_Zcentre->setSingleStep(_Zincr); + // . Rayon + SpinBox_Rayon->setValue(_Rayon); SpinBox_Rayon->setSingleStep(_Rayon/10.); SpinBox_Rayon->setMinimum(0.); + + // Cone en rayons + // . X des centres + _BoundaryAnXcone1 = _Xcentre ; + SpinBox_Cone_X1->setSingleStep(_Xincr); + _BoundaryAnXcone2 = _Xcentre ; + SpinBox_Cone_X2->setSingleStep(_Xincr); + // . Y des centres + _BoundaryAnYcone1 = _Ycentre ; + SpinBox_Cone_Y1->setSingleStep(_Yincr); + _BoundaryAnYcone2 = _Ycentre ; + SpinBox_Cone_Y2->setSingleStep(_Yincr); + // . Z des centres + _BoundaryAnZcone1 = _Zmin ; + SpinBox_Cone_Z1->setSingleStep(_Zincr); + _BoundaryAnZcone2 = _Zmax ; + SpinBox_Cone_Z2->setSingleStep(_Zincr); + // . Rayons/Angles + _BoundaryAnRayon1 = 0. ; + SpinBox_Cone_V1->setMinimum(0.); + _BoundaryAnRayon2 = _Rayon ; + SpinBox_Cone_V2->setSingleStep(_Rayon/10.); + SpinBox_Cone_V2->setMinimum(0.); + + // Cone en angle + convertRayonAngle(1) ; + SpinBox_Cone_X1->setValue(_BoundaryAnXaxisCone); + SpinBox_Cone_Y1->setValue(_BoundaryAnYaxisCone); + SpinBox_Cone_Z1->setValue(_BoundaryAnZaxisCone); + SpinBox_Cone_V1->setValue(_BoundaryAngle); + SpinBox_Cone_X2->setValue(_BoundaryAnXorigCone); + SpinBox_Cone_Y2->setValue(_BoundaryAnYorigCone); + SpinBox_Cone_Z2->setValue(_BoundaryAnZorigCone); } // ------------------------------------------------------------------------ bool MonCreateBoundaryAn::PushOnApply() @@ -213,13 +297,6 @@ bool MonCreateBoundaryAn::PushOnApply() _BoundaryAnYcentre=SpinBox_Ycent->value(); _BoundaryAnZcentre=SpinBox_Zcent->value(); _BoundaryAnRayon=SpinBox_Radius->value(); - double daux = _BoundaryAnXaxis*_BoundaryAnXaxis + _BoundaryAnYaxis*_BoundaryAnYaxis + _BoundaryAnZaxis*_BoundaryAnZaxis ; - if ( daux < 0.0000001 ) - { - QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QObject::tr("HOM_AXE") ); - return false; - } } break; } @@ -239,9 +316,58 @@ bool MonCreateBoundaryAn::PushOnApply() } break; } - } + + case 3 : // il s agit d un cone defini par un axe et un angle + { + if ((_BoundaryAnXaxisCone != SpinBox_Cone_X1->value()) or + (_BoundaryAnYaxisCone != SpinBox_Cone_Y1->value()) or + (_BoundaryAnZaxisCone != SpinBox_Cone_Z1->value()) or + (_BoundaryAnXorigCone != SpinBox_Cone_X2->value()) or + (_BoundaryAnYorigCone != SpinBox_Cone_Y2->value()) or + (_BoundaryAnZorigCone != SpinBox_Cone_Z2->value()) or + (_BoundaryAngle != SpinBox_Cone_V1->value()) ) + { + Chgt = true; + _BoundaryAnXaxisCone = SpinBox_Cone_X1->value() ; + _BoundaryAnYaxisCone = SpinBox_Cone_Y1->value() ; + _BoundaryAnZaxisCone = SpinBox_Cone_Z1->value() ; + _BoundaryAnXorigCone = SpinBox_Cone_X2->value() ; + _BoundaryAnYorigCone = SpinBox_Cone_Y2->value() ; + _BoundaryAnZorigCone = SpinBox_Cone_Z2->value() ; + _BoundaryAngle = SpinBox_Cone_V1->value() ; + } + break; + } + + case 4 : // il s agit d un cone defini par les 2 rayons + { + if ((_BoundaryAnXcone1 != SpinBox_Cone_X1->value()) or + (_BoundaryAnYcone1 != SpinBox_Cone_Y1->value()) or + (_BoundaryAnZcone1 != SpinBox_Cone_Z1->value()) or + (_BoundaryAnRayon1 != SpinBox_Cone_V1->value()) or + (_BoundaryAnXcone2 != SpinBox_Cone_X2->value()) or + (_BoundaryAnYcone2 != SpinBox_Cone_Y2->value()) or + (_BoundaryAnZcone2 != SpinBox_Cone_Z2->value()) or + (_BoundaryAnRayon2 != SpinBox_Cone_V2->value()) ) + { + Chgt = true; + _BoundaryAnXcone1 = SpinBox_Cone_X1->value() ; + _BoundaryAnYcone1 = SpinBox_Cone_Y1->value() ; + _BoundaryAnZcone1 = SpinBox_Cone_Z1->value() ; + _BoundaryAnRayon1 = SpinBox_Cone_V1->value() ; + _BoundaryAnXcone2 = SpinBox_Cone_X2->value() ; + _BoundaryAnYcone2 = SpinBox_Cone_Y2->value() ; + _BoundaryAnZcone2 = SpinBox_Cone_Z2->value() ; + _BoundaryAnRayon2 = SpinBox_Cone_V2->value() ; + } + break; + } + } bool bOK = CreateOrUpdateBoundaryAn(); + + if ( bOK ) { HOMARD_UTILS::updateObjBrowser() ; } + return bOK; } @@ -250,31 +376,81 @@ bool MonCreateBoundaryAn:: CreateOrUpdateBoundaryAn() //---------------------------------------------------- // Creation de l'objet boundary { - if (_aName != LEBoundaryName->text().trimmed()) - { +// if (_aName != LEBoundaryName->text().trimmed()) +// { _aName = LEBoundaryName->text().trimmed(); switch (_Type) { case 1 : // il s agit d un cylindre { - aBoundaryAn = _myHomardGen->CreateBoundaryCylinder(CORBA::string_dup(_aName.toStdString().c_str()), \ - _BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnXaxis, _BoundaryAnYaxis, _BoundaryAnZaxis, _BoundaryAnRayon ); + try + { + aBoundaryAn = _myHomardGen->CreateBoundaryCylinder(CORBA::string_dup(_aName.toStdString().c_str()), \ + _BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnXaxis, _BoundaryAnYaxis, _BoundaryAnZaxis, _BoundaryAnRayon ); + } + catch( SALOME::SALOME_Exception& S_ex ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr(CORBA::string_dup(S_ex.details.text)) ); + return false ; + } break; } case 2 : // il s agit d une sphere { - aBoundaryAn = _myHomardGen->CreateBoundarySphere(CORBA::string_dup(_aName.toStdString().c_str()), \ - _BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnRayon); + try + { + aBoundaryAn = _myHomardGen->CreateBoundarySphere(CORBA::string_dup(_aName.toStdString().c_str()), \ + _BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnRayon); + } + catch( SALOME::SALOME_Exception& S_ex ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr(CORBA::string_dup(S_ex.details.text)) ); + return false ; + } + break; + } + case 3 : // il s agit d un cone defini par un axe et un angle + { + try + { + aBoundaryAn = _myHomardGen->CreateBoundaryConeA(CORBA::string_dup(_aName.toStdString().c_str()), \ + _BoundaryAnXaxisCone, _BoundaryAnYaxisCone, _BoundaryAnZaxisCone, _BoundaryAngle, \ + _BoundaryAnXorigCone, _BoundaryAnYorigCone, _BoundaryAnYorigCone); + } + catch( SALOME::SALOME_Exception& S_ex ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr(CORBA::string_dup(S_ex.details.text)) ); + return false ; + } + break; + } + case 4 : // il s agit d un cone defini par les 2 rayons + { + try + { + aBoundaryAn = _myHomardGen->CreateBoundaryConeR(CORBA::string_dup(_aName.toStdString().c_str()), \ + _BoundaryAnXcone1, _BoundaryAnYcone1, _BoundaryAnZcone1, _BoundaryAnRayon1, \ + _BoundaryAnXcone2, _BoundaryAnYcone2, _BoundaryAnZcone2, _BoundaryAnRayon2); + } + catch( SALOME::SALOME_Exception& S_ex ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr(CORBA::string_dup(S_ex.details.text)) ); + return false ; + } break; } } _parent->AddBoundaryAn(_aName); - } // Mise en place des attributs - aBoundaryAn->SetLimit(_Xincr, _Yincr, _Zincr); + aBoundaryAn->SetLimit(_Xincr, _Yincr, _Zincr); - HOMARD_UTILS::updateObjBrowser(); - return true; + return true; +// } +// else { return false ; } } // ------------------------------------------------------------------------ void MonCreateBoundaryAn::PushOnOK() @@ -321,15 +497,9 @@ void MonCreateBoundaryAn::SetCylinder() MESSAGE("Debut de SetCylinder") gBCylindre->setVisible(1); gBSphere->setVisible(0); + gBCone->setVisible(0); adjustSize(); _Type=1; - SpinBox_Xcent->setValue(_Xcentre); - SpinBox_Xaxis->setValue(0.); - SpinBox_Ycent->setValue(_Ycentre); - SpinBox_Yaxis->setValue(0.); - SpinBox_Zcent->setValue(_Zcentre); - SpinBox_Zaxis->setValue(1.); - SpinBox_Radius->setValue(_Rayon); // MESSAGE("Fin de SetCylinder") } // ------------------------------------------------------------------------ @@ -339,13 +509,229 @@ void MonCreateBoundaryAn::SetSphere() MESSAGE("Debut de SetSphere") gBCylindre->setVisible(0); gBSphere->setVisible(1); + gBCone->setVisible(0); adjustSize(); _Type=2; - SpinBox_Xcentre->setValue(_Xcentre); - SpinBox_Ycentre->setValue(_Ycentre); - SpinBox_Zcentre->setValue(_Zcentre); - SpinBox_Rayon->setValue(_Rayon); // MESSAGE("Fin de SetSphere") } +// ------------------------------------------------------------------------ +void MonCreateBoundaryAn::SetConeR() +// ------------------------------------------------------------------------ +{ + MESSAGE("Debut de SetConeR") +// +// Stockage et conversion des valeurs si elles ont change + if ((_BoundaryAnXaxisCone != SpinBox_Cone_X1->value()) or + (_BoundaryAnYaxisCone != SpinBox_Cone_Y1->value()) or + (_BoundaryAnZaxisCone != SpinBox_Cone_Z1->value()) or + (_BoundaryAnXorigCone != SpinBox_Cone_X2->value()) or + (_BoundaryAnYorigCone != SpinBox_Cone_Y2->value()) or + (_BoundaryAnZorigCone != SpinBox_Cone_Z2->value()) or + (_BoundaryAngle != SpinBox_Cone_V1->value()) ) + { + MESSAGE("Stockage et conversion") + _BoundaryAnXaxisCone = SpinBox_Cone_X1->value() ; + _BoundaryAnYaxisCone = SpinBox_Cone_Y1->value() ; + _BoundaryAnZaxisCone = SpinBox_Cone_Z1->value() ; + _BoundaryAnXorigCone = SpinBox_Cone_X2->value() ; + _BoundaryAnYorigCone = SpinBox_Cone_Y2->value() ; + _BoundaryAnZorigCone = SpinBox_Cone_Z2->value() ; + _BoundaryAngle = SpinBox_Cone_V1->value() ; + convertRayonAngle(-1) ; + } +// + _Type=4; +// + TLCone_X1->setText(QApplication::translate("CreateBoundaryAn", "X centre 1", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_X1->setValue(_BoundaryAnXcone1); + TLCone_Y1->setText(QApplication::translate("CreateBoundaryAn", "Y centre 1", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_Y1->setValue(_BoundaryAnYcone1); + TLCone_Z1->setText(QApplication::translate("CreateBoundaryAn", "Z centre 1", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_Z1->setValue(_BoundaryAnZcone1); +// + TLCone_V1->setText(QApplication::translate("CreateBoundaryAn", "Radius 1", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_V1->setSingleStep(_Rayon/10.); + SpinBox_Cone_V1->setMaximum(100000.*_DMax); + SpinBox_Cone_V1->setValue(_BoundaryAnRayon1); +// + TLCone_X2->setText(QApplication::translate("CreateBoundaryAn", "X centre 2", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_X2->setValue(_BoundaryAnXcone2); + TLCone_Y2->setText(QApplication::translate("CreateBoundaryAn", "Y centre 2", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_Y2->setValue(_BoundaryAnYcone2); + TLCone_Z2->setText(QApplication::translate("CreateBoundaryAn", "Z centre 2", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_Z2->setValue(_BoundaryAnZcone2); +// + TLCone_V2->setVisible(1); + SpinBox_Cone_V2->setVisible(1); + TLCone_V2->setText(QApplication::translate("CreateBoundaryAn", "Radius 2", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_V2->setValue(_BoundaryAnRayon2); +// +// MESSAGE("Fin de SetConeR") +} +// ------------------------------------------------------------------------ +void MonCreateBoundaryAn::SetConeA() +// ------------------------------------------------------------------------ +{ + MESSAGE("Debut de SetConeA") +// Stockage et conversion des valeurs si elles ont change + if ((_BoundaryAnXcone1 != SpinBox_Cone_X1->value()) or + (_BoundaryAnYcone1 != SpinBox_Cone_Y1->value()) or + (_BoundaryAnZcone1 != SpinBox_Cone_Z1->value()) or + (_BoundaryAnRayon1 != SpinBox_Cone_V1->value()) or + (_BoundaryAnXcone2 != SpinBox_Cone_X2->value()) or + (_BoundaryAnYcone2 != SpinBox_Cone_Y2->value()) or + (_BoundaryAnZcone2 != SpinBox_Cone_Z2->value()) or + (_BoundaryAnRayon2 != SpinBox_Cone_V2->value()) ) + { + MESSAGE("Stockage et conversion") + _BoundaryAnXcone1 = SpinBox_Cone_X1->value() ; + _BoundaryAnYcone1 = SpinBox_Cone_Y1->value() ; + _BoundaryAnZcone1 = SpinBox_Cone_Z1->value() ; + _BoundaryAnRayon1 = SpinBox_Cone_V1->value() ; + _BoundaryAnXcone2 = SpinBox_Cone_X2->value() ; + _BoundaryAnYcone2 = SpinBox_Cone_Y2->value() ; + _BoundaryAnZcone2 = SpinBox_Cone_Z2->value() ; + _BoundaryAnRayon2 = SpinBox_Cone_V2->value() ; + convertRayonAngle(1) ; + } +// + _Type=3; +// + TLCone_X1->setText(QApplication::translate("CreateBoundaryAn", "X axis", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_X1->setValue(_BoundaryAnXaxisCone); + TLCone_Y1->setText(QApplication::translate("CreateBoundaryAn", "Y axis", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_Y1->setValue(_BoundaryAnYaxisCone); + TLCone_Z1->setText(QApplication::translate("CreateBoundaryAn", "Z axis", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_Z1->setValue(_BoundaryAnZaxisCone); +// + TLCone_X2->setText(QApplication::translate("CreateBoundaryAn", "X centre", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_X2->setValue(_BoundaryAnXorigCone); + TLCone_Y2->setText(QApplication::translate("CreateBoundaryAn", "Y centre", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_Y2->setValue(_BoundaryAnYorigCone); + TLCone_Z2->setText(QApplication::translate("CreateBoundaryAn", "Z centre", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_Z2->setValue(_BoundaryAnZorigCone); +// + TLCone_V1->setText(QApplication::translate("CreateBoundaryAn", "Angle", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_V1->setValue(_BoundaryAngle); + SpinBox_Cone_V1->setSingleStep(1.); + SpinBox_Cone_V1->setMaximum(90.); +// + TLCone_V2->setVisible(0); + SpinBox_Cone_V2->setVisible(0); +// MESSAGE("Fin de SetConeA") +} + + +// ------------------------------------------------------------------------ +void MonCreateBoundaryAn::SetCone() +// ------------------------------------------------------------------------ +{ + MESSAGE("Debut de SetCone") + gBCylindre->setVisible(0); + gBSphere->setVisible(0); + gBCone->setVisible(1); +// + adjustSize(); + if ( RB_Def_radius->isChecked() ) + { + SetConeR(); + } + else + { + SetConeA(); + } +// MESSAGE("Fin de SetCone") +} +// ------------------------------------------------------------------------ +void MonCreateBoundaryAn::convertRayonAngle(int option) +// ------------------------------------------------------------------------ +// Conversion entre les deux formulations du cone : +// par deux rayons ou avec un axe et un angle. +// Voir sfcoi1 de HOMARD +{ + MESSAGE("Debut de convertRayonAngle, option = "< BO = AB*RB/(RA-RB) +// Angle : tg(alpha) = RA/AO +// + double daux ; +// De rayon vers angle : + if ( option == 1 ) + { + double xa, ya, za, ra ; + double xb, yb, zb, rb ; +// Positionnement de A vers B, avec RA>RB + if ( _BoundaryAnRayon1 > _BoundaryAnRayon2 ) + { + xa = _BoundaryAnXcone1 ; + ya = _BoundaryAnYcone1 ; + za = _BoundaryAnZcone1 ; + ra = _BoundaryAnRayon1 ; + xb = _BoundaryAnXcone2 ; + yb = _BoundaryAnYcone2 ; + zb = _BoundaryAnZcone2 ; + rb = _BoundaryAnRayon2 ; + } + else + { + xa = _BoundaryAnXcone2 ; + ya = _BoundaryAnYcone2 ; + za = _BoundaryAnZcone2 ; + ra = _BoundaryAnRayon2 ; + xb = _BoundaryAnXcone1 ; + yb = _BoundaryAnYcone1 ; + zb = _BoundaryAnZcone1 ; + rb = _BoundaryAnRayon1 ; + } +// Axe : relie les deux centres, de A vers B. L'axe est normalise + _BoundaryAnXaxisCone = xb - xa ; + _BoundaryAnYaxisCone = yb - ya ; + _BoundaryAnZaxisCone = zb - za ; + daux = sqrt ( _BoundaryAnXaxisCone*_BoundaryAnXaxisCone + _BoundaryAnYaxisCone*_BoundaryAnYaxisCone + _BoundaryAnZaxisCone*_BoundaryAnZaxisCone ) ; + _BoundaryAnXaxisCone = _BoundaryAnXaxisCone/daux ; + _BoundaryAnYaxisCone = _BoundaryAnYaxisCone/daux ; + _BoundaryAnZaxisCone = _BoundaryAnZaxisCone/daux ; +// Origine + daux = daux * rb / (ra-rb) ; + _BoundaryAnXorigCone = xb + daux*_BoundaryAnXaxisCone ; + _BoundaryAnYorigCone = yb + daux*_BoundaryAnYaxisCone ; + _BoundaryAnZorigCone = zb + daux*_BoundaryAnZaxisCone ; +// Angle en degre + daux = ra / sqrt((_BoundaryAnXorigCone-xa)*(_BoundaryAnXorigCone-xa) + (_BoundaryAnYorigCone-ya)*(_BoundaryAnYorigCone-ya) + (_BoundaryAnZorigCone-za)*(_BoundaryAnZorigCone-za) ) ; + _BoundaryAngle = atan(daux)*180./PI ; + } +// D'angle vers rayon : + else + { + double xax, yax, zax ; +// L'axe est normalise + daux = sqrt ( _BoundaryAnXaxisCone*_BoundaryAnXaxisCone + _BoundaryAnYaxisCone*_BoundaryAnYaxisCone + _BoundaryAnZaxisCone*_BoundaryAnZaxisCone ) ; + xax = _BoundaryAnXaxisCone/daux ; + yax = _BoundaryAnYaxisCone/daux ; + zax = _BoundaryAnZaxisCone/daux ; +// Centre 1 : l'origine + _BoundaryAnXcone1 = _BoundaryAnXorigCone ; + _BoundaryAnYcone1 = _BoundaryAnYorigCone ; + _BoundaryAnZcone1 = _BoundaryAnZorigCone ; +// Rayon 1 : nul + _BoundaryAnRayon1 = 0. ; +// Centre 2 : l'origine decalee d'une longueur arbitraire le long de l'axe + _BoundaryAnXcone2 = _BoundaryAnXorigCone + _DMax*xax ; + _BoundaryAnYcone2 = _BoundaryAnYorigCone + _DMax*yax ; + _BoundaryAnZcone2 = _BoundaryAnZorigCone + _DMax*zax ; +// Rayon 2 : a calculer + _BoundaryAnRayon2 = _DMax*tan(_BoundaryAngle*PI/180.) ; + } +// MESSAGE("Fin de convertRayonAngle") +} diff --git a/src/HOMARDGUI/MonCreateBoundaryAn.h b/src/HOMARDGUI/MonCreateBoundaryAn.h index f9c9f22d..1467da11 100644 --- a/src/HOMARDGUI/MonCreateBoundaryAn.h +++ b/src/HOMARDGUI/MonCreateBoundaryAn.h @@ -52,11 +52,16 @@ protected : QString _aName; QString _aCaseName; + double _Xmin, _Xmax, _Xincr, _Ymin, _Ymax, _Yincr, _Zmin, _Zmax, _Zincr, _DMax ; int _Type; double _BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnRayon; double _BoundaryAnXaxis, _BoundaryAnYaxis, _BoundaryAnZaxis; - double _Xmin, _Xmax, _Xincr, _Ymin, _Ymax, _Yincr, _Zmin, _Zmax, _Zincr, _DMax ; double _Xcentre, _Ycentre, _Zcentre, _Rayon ; + double _BoundaryAnXcone1, _BoundaryAnYcone1, _BoundaryAnZcone1, _BoundaryAnRayon1; + double _BoundaryAnXcone2, _BoundaryAnYcone2, _BoundaryAnZcone2, _BoundaryAnRayon2; + double _BoundaryAnXaxisCone, _BoundaryAnYaxisCone, _BoundaryAnZaxisCone; + double _BoundaryAnXorigCone, _BoundaryAnYorigCone, _BoundaryAnZorigCone; + double _BoundaryAngle; bool Chgt; @@ -68,11 +73,15 @@ protected : virtual void InitValBoundaryAn(); virtual void InitMinMax(); virtual void SetNewBoundaryAnName(); + virtual void convertRayonAngle(int option); virtual bool CreateOrUpdateBoundaryAn(); public slots: virtual void SetCylinder(); virtual void SetSphere(); + virtual void SetCone(); + virtual void SetConeR(); + virtual void SetConeA(); virtual void PushOnOK(); virtual bool PushOnApply(); virtual void PushOnHelp(); diff --git a/src/HOMARDGUI/MonCreateBoundaryDi.cxx b/src/HOMARDGUI/MonCreateBoundaryDi.cxx index 08d9799a..635e8548 100644 --- a/src/HOMARDGUI/MonCreateBoundaryDi.cxx +++ b/src/HOMARDGUI/MonCreateBoundaryDi.cxx @@ -115,7 +115,7 @@ bool MonCreateBoundaryDi::PushOnApply() catch( SALOME::SALOME_Exception& S_ex ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QString(CORBA::string_dup(S_ex.details.text)) ); + QObject::tr(CORBA::string_dup(S_ex.details.text)) ); return false; } } diff --git a/src/HOMARDGUI/MonCreateCase.cxx b/src/HOMARDGUI/MonCreateCase.cxx index 1d9fafc5..40e97c74 100644 --- a/src/HOMARDGUI/MonCreateCase.cxx +++ b/src/HOMARDGUI/MonCreateCase.cxx @@ -224,7 +224,7 @@ bool MonCreateCase::PushOnApply() catch( SALOME::SALOME_Exception& S_ex ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QString(CORBA::string_dup(S_ex.details.text)) ); + QObject::tr(CORBA::string_dup(S_ex.details.text)) ); try { aCase = _myHomardGen->GetCase(_aCaseName.toStdString().c_str()); @@ -288,6 +288,7 @@ bool MonCreateCase::PushOnApply() } HOMARD_UTILS::updateObjBrowser(); + return true; } // --------------------------- diff --git a/src/HOMARDGUI/MonCreateHypothesis.cxx b/src/HOMARDGUI/MonCreateHypothesis.cxx index 6f0dc14b..5711dcdf 100644 --- a/src/HOMARDGUI/MonCreateHypothesis.cxx +++ b/src/HOMARDGUI/MonCreateHypothesis.cxx @@ -186,7 +186,8 @@ bool MonCreateHypothesis::PushOnApply() _aHypothesis->SetLevelOutput(_LevelOutput); } - HOMARD_UTILS::updateObjBrowser(); + HOMARD_UTILS::updateObjBrowser() ; + return true; } @@ -318,7 +319,7 @@ void MonCreateHypothesis::PushZoneDelete() { MESSAGE("Debut de MonCreateHypothesis::PushZoneDelete") QMessageBox::warning( 0, QObject::tr("HOM_WARNING"), - QObject::tr("HOM_INACTIVE_BUTTON") ); + QObject::tr("HOM_INACTIVE_BUTTON") ); return; } diff --git a/src/HOMARDGUI/MonCreateIteration.cxx b/src/HOMARDGUI/MonCreateIteration.cxx index b5da354d..378f78b7 100644 --- a/src/HOMARDGUI/MonCreateIteration.cxx +++ b/src/HOMARDGUI/MonCreateIteration.cxx @@ -158,7 +158,7 @@ bool MonCreateIteration::PushOnApply() catch( SALOME::SALOME_Exception& S_ex ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QString(CORBA::string_dup(S_ex.details.text)) ); + QObject::tr(CORBA::string_dup(S_ex.details.text)) ); return false; } } @@ -179,7 +179,8 @@ bool MonCreateIteration::PushOnApply() _myHomardGen->AssociateIterHypo (IterName, monHypoName.toStdString().c_str()); aIter->SetMeshName(CORBA::string_dup(aMeshName_np1.toStdString().c_str())); - HOMARD_UTILS::updateObjBrowser(); + HOMARD_UTILS::updateObjBrowser() ; + return true; } diff --git a/src/HOMARDGUI/MonCreateZone.cxx b/src/HOMARDGUI/MonCreateZone.cxx index 1445a8a0..ff865ad1 100644 --- a/src/HOMARDGUI/MonCreateZone.cxx +++ b/src/HOMARDGUI/MonCreateZone.cxx @@ -477,6 +477,9 @@ bool MonCreateZone::PushOnApply() } } bool bOK = CreateOrUpdateZone() ; + + if ( bOK ) { HOMARD_UTILS::updateObjBrowser() ; } + return bOK; } @@ -489,81 +492,90 @@ bool MonCreateZone:: CreateOrUpdateZone() if (_aZoneName != LEZoneName->text().trimmed()) { _aZoneName = LEZoneName->text().trimmed() ; - switch (_Type) + try { - case 11 : // il s agit d un rectangle - { aZone = _myHomardGen->CreateZoneBox2D(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ - _ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _Orient ); - break; - } - case 12 : // il s agit d un rectangle - { aZone = _myHomardGen->CreateZoneBox2D(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ - _ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax, _Orient ); - break; - } - case 13 : // il s agit d un rectangle - { aZone = _myHomardGen->CreateZoneBox2D(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ - _ZoneZmin, _ZoneZmax, _ZoneXmin, _ZoneXmax, _Orient ); - break; - } - case 2 : // il s agit d un parallelepipede - { aZone = _myHomardGen->CreateZoneBox(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ - _ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax ); - break; - } - case 4 : // il s agit d une sphere - { aZone = _myHomardGen->CreateZoneSphere(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ - _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneRayon ); - break; - } - case 31 : // il s agit d un disque issu d'un cylindre - { aZone = _myHomardGen->CreateZoneDisk(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ - _ZoneXcentre, _ZoneYcentre, _ZoneRayon, _Orient ); - break; + switch (_Type) + { + case 11 : // il s agit d un rectangle + { aZone = _myHomardGen->CreateZoneBox2D(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _Orient ); + break; } - case 32 : // il s agit d un disque issu d'un cylindre - { aZone = _myHomardGen->CreateZoneDisk(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ - _ZoneYcentre, _ZoneZcentre, _ZoneRayon, _Orient ); - break; - } - case 33 : // il s agit d un disque issu d'un cylindre - { aZone = _myHomardGen->CreateZoneDisk(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ - _ZoneZcentre, _ZoneXcentre, _ZoneRayon, _Orient ); - break; - } - case 5 : // il s agit d un cylindre - { aZone = _myHomardGen->CreateZoneCylinder(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ - _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneXaxis, _ZoneYaxis, _ZoneZaxis, _ZoneRayon, _ZoneHaut ); - break; - } - case 61 : // il s agit d un disque avec trou - { aZone = _myHomardGen->CreateZoneDiskWithHole(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ - _ZoneXcentre, _ZoneYcentre, _ZoneRayon, _ZoneRayonInt, _Orient ); - break; + case 12 : // il s agit d un rectangle + { aZone = _myHomardGen->CreateZoneBox2D(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax, _Orient ); + break; } - case 62 : // il s agit d un disque avec trou - { aZone = _myHomardGen->CreateZoneDiskWithHole(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ - _ZoneYcentre, _ZoneZcentre, _ZoneRayon, _ZoneRayonInt, _Orient ); - break; + case 13 : // il s agit d un rectangle + { aZone = _myHomardGen->CreateZoneBox2D(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneZmin, _ZoneZmax, _ZoneXmin, _ZoneXmax, _Orient ); + break; } - case 63 : // il s agit d un disque avec trou - { aZone = _myHomardGen->CreateZoneDiskWithHole(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ - _ZoneZcentre, _ZoneXcentre, _ZoneRayon, _ZoneRayonInt, _Orient ); - break; + case 2 : // il s agit d un parallelepipede + { aZone = _myHomardGen->CreateZoneBox(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax ); + break; } - case 7 : // il s agit d un tuyau - { aZone = _myHomardGen->CreateZonePipe(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ - _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneXaxis, _ZoneYaxis, _ZoneZaxis, _ZoneRayon, _ZoneHaut, _ZoneRayonInt ); - break; + case 4 : // il s agit d une sphere + { aZone = _myHomardGen->CreateZoneSphere(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneRayon ); + break; } + case 31 : // il s agit d un disque issu d'un cylindre + { aZone = _myHomardGen->CreateZoneDisk(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXcentre, _ZoneYcentre, _ZoneRayon, _Orient ); + break; + } + case 32 : // il s agit d un disque issu d'un cylindre + { aZone = _myHomardGen->CreateZoneDisk(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneYcentre, _ZoneZcentre, _ZoneRayon, _Orient ); + break; + } + case 33 : // il s agit d un disque issu d'un cylindre + { aZone = _myHomardGen->CreateZoneDisk(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneZcentre, _ZoneXcentre, _ZoneRayon, _Orient ); + break; + } + case 5 : // il s agit d un cylindre + { aZone = _myHomardGen->CreateZoneCylinder(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneXaxis, _ZoneYaxis, _ZoneZaxis, _ZoneRayon, _ZoneHaut ); + break; + } + case 61 : // il s agit d un disque avec trou + { aZone = _myHomardGen->CreateZoneDiskWithHole(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXcentre, _ZoneYcentre, _ZoneRayon, _ZoneRayonInt, _Orient ); + break; + } + case 62 : // il s agit d un disque avec trou + { aZone = _myHomardGen->CreateZoneDiskWithHole(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneYcentre, _ZoneZcentre, _ZoneRayon, _ZoneRayonInt, _Orient ); + break; + } + case 63 : // il s agit d un disque avec trou + { aZone = _myHomardGen->CreateZoneDiskWithHole(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneZcentre, _ZoneXcentre, _ZoneRayon, _ZoneRayonInt, _Orient ); + break; + } + case 7 : // il s agit d un tuyau + { aZone = _myHomardGen->CreateZonePipe(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneXaxis, _ZoneYaxis, _ZoneZaxis, _ZoneRayon, _ZoneHaut, _ZoneRayonInt ); + break; + } + } + } + catch( SALOME::SALOME_Exception& S_ex ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr(CORBA::string_dup(S_ex.details.text)) ); + return false ; } _parent->addZoneinTWZone(_aZoneName) ; - } // Mise en place des attributs - aZone->SetLimit(_Xincr, _Yincr, _Zincr) ; + aZone->SetLimit(_Xincr, _Yincr, _Zincr) ; - HOMARD_UTILS::updateObjBrowser() ; - return true; + return true; + } + else { return false ; } } // ------------------------------------------------------------------------ void MonCreateZone::PushOnOK() diff --git a/src/HOMARDGUI/MonEditBoundaryAn.cxx b/src/HOMARDGUI/MonEditBoundaryAn.cxx index 4703c6c8..63082733 100644 --- a/src/HOMARDGUI/MonEditBoundaryAn.cxx +++ b/src/HOMARDGUI/MonEditBoundaryAn.cxx @@ -72,6 +72,18 @@ void MonEditBoundaryAn::InitValEdit() SetSphere(); break; } + case 3: // il s agit d un cone defini par un axe et un angle + { + InitValBoundaryAnConeA(); + SetConeA(); + break; + } + case 4: // il s agit d un cone defini par les 2 rayons + { + InitValBoundaryAnConeR(); + SetConeR(); + break; + } }; } // ------------------------------------------------------------------------ @@ -110,15 +122,48 @@ void MonEditBoundaryAn::InitValBoundaryAnSphere() _BoundaryAnRayon=mesCoordBoundary[3]; } // ------------------------------------------------------------------------ +void MonEditBoundaryAn::InitValBoundaryAnConeA() +// ------------------------------------------------------------------------ +{ + HOMARD::double_array_var mesCoordBoundary = aBoundaryAn->GetCoords(); + ASSERT(mesCoordBoundary->length() == 7 ); + _BoundaryAnXaxisCone=mesCoordBoundary[0]; + _BoundaryAnYaxisCone=mesCoordBoundary[1]; + _BoundaryAnZaxisCone=mesCoordBoundary[2]; + _BoundaryAngle=mesCoordBoundary[3]; + _BoundaryAnXorigCone=mesCoordBoundary[4]; + _BoundaryAnYorigCone=mesCoordBoundary[5]; + _BoundaryAnZorigCone=mesCoordBoundary[6]; + convertRayonAngle(-1) ; +} +// ------------------------------------------------------------------------ +void MonEditBoundaryAn::InitValBoundaryAnConeR() +// ------------------------------------------------------------------------ +{ + HOMARD::double_array_var mesCoordBoundary = aBoundaryAn->GetCoords(); + ASSERT(mesCoordBoundary->length() == 8 ); + _BoundaryAnXcone1=mesCoordBoundary[0]; + _BoundaryAnYcone1=mesCoordBoundary[1]; + _BoundaryAnZcone1=mesCoordBoundary[2]; + _BoundaryAnRayon1=mesCoordBoundary[3]; + _BoundaryAnXcone2=mesCoordBoundary[4]; + _BoundaryAnYcone2=mesCoordBoundary[5]; + _BoundaryAnZcone2=mesCoordBoundary[6]; + _BoundaryAnRayon2=mesCoordBoundary[7]; + convertRayonAngle(1) ; +} +// ------------------------------------------------------------------------ void MonEditBoundaryAn::SetCylinder() // ------------------------------------------------------------------------ { gBCylindre->setVisible(1); gBSphere->setVisible(0); + gBCone->setVisible(0); RBCylindre->setChecked(1); adjustSize(); _Type=1; RBSphere->setDisabled(true); + RBCone->setDisabled(true); adjustSize(); SpinBox_Xcent->setValue(_BoundaryAnXcentre); @@ -148,7 +193,9 @@ void MonEditBoundaryAn::SetSphere() gBCylindre->setVisible(0); gBSphere->setVisible(1); RBSphere->setChecked(1); + gBCone->setVisible(0); RBCylindre->setDisabled(true); + RBCone->setDisabled(true); adjustSize(); _Type=2 ; @@ -167,6 +214,80 @@ void MonEditBoundaryAn::SetSphere() SpinBox_Rayon->setMinimum(0.); SpinBox_Rayon->setValue(_BoundaryAnRayon); } +// ------------------------------------------------------------------------ +void MonEditBoundaryAn::SetConeA() +// ------------------------------------------------------------------------ +{ + gBCylindre->setVisible(0); + gBSphere->setVisible(0); + gBCone->setVisible(1); + RBCone->setChecked(1); + RB_Def_angle->setChecked(1); + RBCylindre->setDisabled(true); + RBSphere->setDisabled(true); + adjustSize(); + _Type=3; +// + TLCone_X1->setText(QApplication::translate("CreateBoundaryAn", "X axis", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_X1->setValue(_BoundaryAnXaxisCone); + TLCone_Y1->setText(QApplication::translate("CreateBoundaryAn", "Y axis", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_Y1->setValue(_BoundaryAnYaxisCone); + TLCone_Z1->setText(QApplication::translate("CreateBoundaryAn", "Z axis", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_Z1->setValue(_BoundaryAnZaxisCone); +// + TLCone_X2->setText(QApplication::translate("CreateBoundaryAn", "X centre", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_X2->setValue(_BoundaryAnXorigCone); + TLCone_Y2->setText(QApplication::translate("CreateBoundaryAn", "Y centre", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_Y2->setValue(_BoundaryAnYorigCone); + TLCone_Z2->setText(QApplication::translate("CreateBoundaryAn", "Z centre", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_Z2->setValue(_BoundaryAnZorigCone); +// + TLCone_V1->setText(QApplication::translate("CreateBoundaryAn", "Angle", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_V1->setValue(_BoundaryAngle); + SpinBox_Cone_V1->setSingleStep(1.); + SpinBox_Cone_V1->setMaximum(90.); +// + TLCone_V2->setVisible(0); + SpinBox_Cone_V2->setVisible(0); +} +// ------------------------------------------------------------------------ +void MonEditBoundaryAn::SetConeR() +// ------------------------------------------------------------------------ +{ + gBCylindre->setVisible(0); + gBSphere->setVisible(0); + gBCone->setVisible(1); + RBCone->setChecked(1); + RB_Def_radius->setChecked(1); + RBCylindre->setDisabled(true); + RBSphere->setDisabled(true); + adjustSize(); + _Type=4; +// + TLCone_X1->setText(QApplication::translate("CreateBoundaryAn", "X centre 1", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_X1->setValue(_BoundaryAnXcone1); + TLCone_Y1->setText(QApplication::translate("CreateBoundaryAn", "Y centre 1", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_Y1->setValue(_BoundaryAnYcone1); + TLCone_Z1->setText(QApplication::translate("CreateBoundaryAn", "Z centre 1", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_Z1->setValue(_BoundaryAnZcone1); +// + TLCone_V1->setText(QApplication::translate("CreateBoundaryAn", "Radius 1", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_V1->setSingleStep(_Rayon/10.); + SpinBox_Cone_V1->setMaximum(100000.*_DMax); + SpinBox_Cone_V1->setValue(_BoundaryAnRayon1); +// + TLCone_X2->setText(QApplication::translate("CreateBoundaryAn", "X centre 2", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_X2->setValue(_BoundaryAnXcone2); + TLCone_Y2->setText(QApplication::translate("CreateBoundaryAn", "Y centre 2", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_Y2->setValue(_BoundaryAnYcone2); + TLCone_Z2->setText(QApplication::translate("CreateBoundaryAn", "Z centre 2", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_Z2->setValue(_BoundaryAnZcone2); +// + TLCone_V2->setVisible(1); + SpinBox_Cone_V2->setVisible(1); + TLCone_V2->setText(QApplication::translate("CreateBoundaryAn", "Radius 2", 0, QApplication::UnicodeUTF8)); + SpinBox_Cone_V2->setValue(_BoundaryAnRayon2); +} // --------------------------------------------------- bool MonEditBoundaryAn::CreateOrUpdateBoundaryAn() //---------------------------------------------------- @@ -184,6 +305,20 @@ bool MonEditBoundaryAn::CreateOrUpdateBoundaryAn() aBoundaryAn->SetSphere(_BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnRayon); break; } + case 3 : // il s agit d un cone defini par un axe et un angle + { + aBoundaryAn = _myHomardGen->CreateBoundaryConeA(CORBA::string_dup(_aName.toStdString().c_str()), \ + _BoundaryAnXaxisCone, _BoundaryAnYaxisCone, _BoundaryAnZaxisCone, _BoundaryAngle, \ + _BoundaryAnXorigCone, _BoundaryAnYorigCone, _BoundaryAnYorigCone); + break; + } + case 4 : // il s agit d un cone defini par les 2 rayons + { + aBoundaryAn = _myHomardGen->CreateBoundaryConeR(CORBA::string_dup(_aName.toStdString().c_str()), \ + _BoundaryAnXcone1, _BoundaryAnYcone1, _BoundaryAnZcone1, _BoundaryAnRayon1, \ + _BoundaryAnXcone2, _BoundaryAnYcone2, _BoundaryAnZcone2, _BoundaryAnRayon2); + break; + } } if (Chgt) _myHomardGen->InvalideBoundary(_aName.toStdString().c_str()); HOMARD_UTILS::updateObjBrowser(); diff --git a/src/HOMARDGUI/MonEditBoundaryAn.h b/src/HOMARDGUI/MonEditBoundaryAn.h index 7e027564..01959470 100644 --- a/src/HOMARDGUI/MonEditBoundaryAn.h +++ b/src/HOMARDGUI/MonEditBoundaryAn.h @@ -38,13 +38,17 @@ public: virtual ~MonEditBoundaryAn(); protected : - void SetCylinder(); - void SetSphere(); bool CreateOrUpdateBoundaryAn(); void InitValEdit(); void InitValBoundaryAnLimit(); + void SetCylinder(); + void SetSphere(); + void SetConeR(); + void SetConeA(); void InitValBoundaryAnCylindre(); void InitValBoundaryAnSphere(); + void InitValBoundaryAnConeR(); + void InitValBoundaryAnConeA(); public slots: diff --git a/src/HOMARDGUI/MonEditBoundaryDi.cxx b/src/HOMARDGUI/MonEditBoundaryDi.cxx index 56fe257e..8f3a5ee3 100644 --- a/src/HOMARDGUI/MonEditBoundaryDi.cxx +++ b/src/HOMARDGUI/MonEditBoundaryDi.cxx @@ -51,7 +51,7 @@ MonEditBoundaryDi::MonEditBoundaryDi( MonCreateCase* parent, bool modal, catch( SALOME::SALOME_Exception& S_ex ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QString(CORBA::string_dup(S_ex.details.text)) ); + QObject::tr(CORBA::string_dup(S_ex.details.text)) ); return; } diff --git a/src/HOMARDGUI/MonIterInfo.cxx b/src/HOMARDGUI/MonIterInfo.cxx index 4709685e..4ce72d2d 100644 --- a/src/HOMARDGUI/MonIterInfo.cxx +++ b/src/HOMARDGUI/MonIterInfo.cxx @@ -106,7 +106,7 @@ bool MonIterInfo::PushOnApply() catch( SALOME::SALOME_Exception& S_ex ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QString(CORBA::string_dup(S_ex.details.text)) ); + QObject::tr(CORBA::string_dup(S_ex.details.text)) ); return false; } diff --git a/src/HOMARDGUI/MonMeshInfo.cxx b/src/HOMARDGUI/MonMeshInfo.cxx index ffffad6e..d6b66531 100644 --- a/src/HOMARDGUI/MonMeshInfo.cxx +++ b/src/HOMARDGUI/MonMeshInfo.cxx @@ -150,7 +150,7 @@ bool MonMeshInfo::PushOnApply() catch( SALOME::SALOME_Exception& S_ex ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QString(CORBA::string_dup(S_ex.details.text)) ); + QObject::tr(CORBA::string_dup(S_ex.details.text)) ); return false; } } diff --git a/src/HOMARD_I/HOMARD_Boundary_i.cxx b/src/HOMARD_I/HOMARD_Boundary_i.cxx index d10e2ade..84346e0d 100644 --- a/src/HOMARD_I/HOMARD_Boundary_i.cxx +++ b/src/HOMARD_I/HOMARD_Boundary_i.cxx @@ -161,6 +161,18 @@ void HOMARD_Boundary_i::SetSphere( double Xcentre, double Ycentre, double ZCentr myHomardBoundary->SetSphere( Xcentre, Ycentre, ZCentre, rayon ); } //============================================================================= +void HOMARD_Boundary_i::SetConeR( double Xcentre1, double Ycentre1, double Zcentre1, double Rayon1, double Xcentre2, double Ycentre2, double Zcentre2, double Rayon2) +{ + ASSERT( myHomardBoundary ); + myHomardBoundary->SetConeR( Xcentre1, Ycentre1, Zcentre1, Rayon1, Xcentre2, Ycentre2, Zcentre2, Rayon2 ); +} +//============================================================================= +void HOMARD_Boundary_i::SetConeA( double Xaxe, double Yaxe, double Zaxe, double Angle, double Xcentre, double Ycentre, double Zcentre) +{ + ASSERT( myHomardBoundary ); + myHomardBoundary->SetConeA( Xaxe, Yaxe, Zaxe, Angle, Xcentre, Ycentre, Zcentre ); +} +//============================================================================= HOMARD::double_array* HOMARD_Boundary_i::GetCoords() { ASSERT( myHomardBoundary ); diff --git a/src/HOMARD_I/HOMARD_Boundary_i.hxx b/src/HOMARD_I/HOMARD_Boundary_i.hxx index 4752c866..4a41cc92 100644 --- a/src/HOMARD_I/HOMARD_Boundary_i.hxx +++ b/src/HOMARD_I/HOMARD_Boundary_i.hxx @@ -78,6 +78,10 @@ public: double rayon ); void SetSphere( double Xcentre, double Ycentre, double ZCentre, double rayon ); + void SetConeR( double Xcentre1, double Ycentre1, double Zcentre1, double Rayon1, + double Xcentre2, double Ycentre2, double Zcentre2, double Rayon2); + void SetConeA( double Xaxe, double Yaxe, double Zaxe, double Angle, + double Xcentre, double Ycentre, double ZCentre); HOMARD::double_array* GetCoords(); diff --git a/src/HOMARD_I/HOMARD_Gen_i.cxx b/src/HOMARD_I/HOMARD_Gen_i.cxx index 19835e13..c6902e95 100755 --- a/src/HOMARD_I/HOMARD_Gen_i.cxx +++ b/src/HOMARD_I/HOMARD_Gen_i.cxx @@ -38,6 +38,7 @@ #include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog) #include CORBA_CLIENT_HEADER(SMESH_Gen) +#include #include #include #include @@ -175,7 +176,7 @@ void HOMARD_Gen_i::SetEtatIter(const char* nomIter, const CORBA::Boolean EtatCal { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Iteration "; + es.text = "Invalid iteration"; throw SALOME::SALOME_Exception(es); return ; }; @@ -212,11 +213,9 @@ CORBA::Long HOMARD_Gen_i::DeleteBoundary(const char* BoundaryName) HOMARD::HOMARD_Boundary_var myBoundary = myContextMap[GetCurrentStudyID()]._mesBoundarys[BoundaryName]; if (CORBA::is_nil(myBoundary)) { -// const char* message = "Invalid Boundary " ; -// SALOMEException(message) ; SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Boundary "; + es.text = "Invalid boundary"; throw SALOME::SALOME_Exception(es); return 1 ; }; @@ -270,7 +269,7 @@ CORBA::Long HOMARD_Gen_i::DeleteCase(const char* nomCas) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Case Context "; + es.text = "Invalid case context"; throw SALOME::SALOME_Exception(es); return 1; }; @@ -301,7 +300,7 @@ CORBA::Long HOMARD_Gen_i::DeleteHypo(const char* nomHypo) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Hypothesis "; + es.text = "Invalid hypothesis"; throw SALOME::SALOME_Exception(es); return 1 ; }; @@ -313,7 +312,7 @@ CORBA::Long HOMARD_Gen_i::DeleteHypo(const char* nomHypo) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "This hypothesis is used and cannot be deleted."; + es.text = "This hypothesis is used in an iteration and cannot be deleted."; throw SALOME::SALOME_Exception(es); return 2 ; }; @@ -364,7 +363,7 @@ CORBA::Long HOMARD_Gen_i::DeleteIterationOption(const char* nomIter, CORBA::Long { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Iteration "; + es.text = "Invalid iteration"; throw SALOME::SALOME_Exception(es); return 1 ; }; @@ -406,7 +405,7 @@ CORBA::Long HOMARD_Gen_i::DeleteIterationOption(const char* nomIter, CORBA::Long { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Iteration "; + es.text = "Invalid iteration"; throw SALOME::SALOME_Exception(es); return 3 ; }; @@ -449,7 +448,7 @@ CORBA::Long HOMARD_Gen_i::DeleteZone(const char* nomZone) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Zone "; + es.text = "Invalid zone"; throw SALOME::SALOME_Exception(es); return 1 ; }; @@ -462,7 +461,7 @@ CORBA::Long HOMARD_Gen_i::DeleteZone(const char* nomZone) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "This zone is used and cannot be deleted."; + es.text = "This zone is used in an hypothesis and cannot be deleted."; throw SALOME::SALOME_Exception(es); return 2 ; }; @@ -492,7 +491,7 @@ void HOMARD_Gen_i::InvalideBoundary(const char* BoundaryName) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Boundary "; + es.text = "Invalid boundary"; throw SALOME::SALOME_Exception(es); return ; } @@ -514,7 +513,7 @@ void HOMARD_Gen_i::InvalideHypo(const char* nomHypo) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Hypothesis "; + es.text = "Invalid hypothesis"; throw SALOME::SALOME_Exception(es); return ; }; @@ -547,7 +546,7 @@ void HOMARD_Gen_i::InvalideIterOption(const char* nomIter, CORBA::Long Option) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Iteration "; + es.text = "Invalid iteration"; throw SALOME::SALOME_Exception(es); return ; }; @@ -587,7 +586,7 @@ void HOMARD_Gen_i::InvalideIterOption(const char* nomIter, CORBA::Long Option) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Case Context "; + es.text = "Invalid case context"; throw SALOME::SALOME_Exception(es); return ; }; @@ -599,11 +598,11 @@ void HOMARD_Gen_i::InvalideIterOption(const char* nomIter, CORBA::Long Option) MESSAGE ( "commande = " << commande ); if ((system(commande.c_str())) != 0) { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Menage du repertoire de calcul impossible" ; - throw SALOME::SALOME_Exception(es); - return ; + SALOME::ExceptionStruct es; + es.type = SALOME::BAD_PARAM; + es.text = "The directory for the calculation cannot be cleared." ; + throw SALOME::SALOME_Exception(es); + return ; } // Suppression du maillage publie dans SMESH const char* MeshName = myIteration->GetMeshName() ; @@ -620,7 +619,7 @@ void HOMARD_Gen_i::InvalideIterInfo(const char* nomIter) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Iteration "; + es.text = "Invalid iteration"; throw SALOME::SALOME_Exception(es); return ; }; @@ -648,7 +647,7 @@ void HOMARD_Gen_i::InvalideIterInfo(const char* nomIter) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Case Context "; + es.text = "Invalid case context"; throw SALOME::SALOME_Exception(es); return ; }; @@ -661,7 +660,7 @@ void HOMARD_Gen_i::InvalideIterInfo(const char* nomIter) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Menage du repertoire de calcul impossible" ; + es.text = "The directory for the calculation cannot be cleared." ; throw SALOME::SALOME_Exception(es); return ; } @@ -676,7 +675,7 @@ void HOMARD_Gen_i::InvalideZone(const char* ZoneName) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Zone "; + es.text = "Invalid zone"; throw SALOME::SALOME_Exception(es); return ; }; @@ -707,7 +706,7 @@ void HOMARD_Gen_i::AssociateCaseIter(const char* nomCas, const char* nomIter, co { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Case "; + es.text = "Invalid case"; throw SALOME::SALOME_Exception(es); return ; }; @@ -717,7 +716,7 @@ void HOMARD_Gen_i::AssociateCaseIter(const char* nomCas, const char* nomIter, co { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid iteration "; + es.text = "Invalid iteration"; throw SALOME::SALOME_Exception(es); return ; }; @@ -728,7 +727,7 @@ void HOMARD_Gen_i::AssociateCaseIter(const char* nomCas, const char* nomIter, co { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Case "; + es.text = "Invalid case"; throw SALOME::SALOME_Exception(es); return ; }; @@ -1084,7 +1083,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char* { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "This case has already been defined"; + es.text = "This case has already been defined."; throw SALOME::SALOME_Exception(es); return 0; }; @@ -1166,7 +1165,7 @@ HOMARD::HOMARD_Hypothesis_ptr HOMARD_Gen_i::CreateHypothesis(const char* nomHypo { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "This hypothesis is already defined."; + es.text = "This hypothesis has already been defined."; throw SALOME::SALOME_Exception(es); return 0; } @@ -1210,7 +1209,7 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* NomIterat { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Case Context "; + es.text = "Invalid case context"; throw SALOME::SALOME_Exception(es); return 0; }; @@ -1219,7 +1218,7 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* NomIterat { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "This iteration is already defined. "; + es.text = "This iteration has already been defined."; throw SALOME::SALOME_Exception(es); return 0; }; @@ -1229,7 +1228,7 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* NomIterat { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Unable to create Iteration "; + es.text = "Unable to create the iteration"; throw SALOME::SALOME_Exception(es); return 0; }; @@ -1278,6 +1277,7 @@ HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundary(const char* BoundaryNam if ((myContextMap[GetCurrentStudyID()]._mesBoundarys).find(BoundaryName)!=(myContextMap[GetCurrentStudyID()]._mesBoundarys).end()) { + MESSAGE ("CreateBoundary : la frontiere " << BoundaryName << " existe deja"); SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; es.text = "This boundary has already been defined"; @@ -1309,12 +1309,29 @@ HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundaryDi(const char* BoundaryN //============================================================================= HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundaryCylinder(const char* BoundaryName, CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre, - CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis, + CORBA::Double Xaxe, CORBA::Double Yaxe, CORBA::Double Zaxe, CORBA::Double Rayon) { MESSAGE ("CreateBoundaryCylinder : BoundaryName = " << BoundaryName ) ; +// + SALOME::ExceptionStruct es; + int error = 0 ; + if ( Rayon <= 0.0 ) + { es.text = "The radius must be positive." ; + error = 1 ; } + double daux = fabs(Xaxe) + fabs(Yaxe) + fabs(Zaxe) ; + if ( daux < 0.0000001 ) + { es.text = "The axis must be a non 0 vector." ; + error = 2 ; } + if ( error != 0 ) + { + es.type = SALOME::BAD_PARAM; + throw SALOME::SALOME_Exception(es); + return 0; + }; +// HOMARD::HOMARD_Boundary_var myBoundary = CreateBoundary(BoundaryName, 1) ; - myBoundary->SetCylinder( Xcentre, Ycentre, Zcentre, Xaxis, Yaxis, Zaxis, Rayon ) ; + myBoundary->SetCylinder( Xcentre, Ycentre, Zcentre, Xaxe, Yaxe, Zaxe, Rayon ) ; return HOMARD::HOMARD_Boundary::_duplicate(myBoundary) ; } @@ -1324,12 +1341,85 @@ HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundarySphere(const char* Bound CORBA::Double Rayon) { MESSAGE ("CreateBoundarySphere : BoundaryName = " << BoundaryName ) ; +// + SALOME::ExceptionStruct es; + int error = 0 ; + if ( Rayon <= 0.0 ) + { es.text = "The radius must be positive." ; + error = 1 ; } + if ( error != 0 ) + { + es.type = SALOME::BAD_PARAM; + throw SALOME::SALOME_Exception(es); + return 0; + }; +// HOMARD::HOMARD_Boundary_var myBoundary = CreateBoundary(BoundaryName, 2) ; myBoundary->SetSphere( Xcentre, Ycentre, Zcentre, Rayon ) ; return HOMARD::HOMARD_Boundary::_duplicate(myBoundary) ; } //============================================================================= +HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundaryConeA(const char* BoundaryName, + CORBA::Double Xaxe, CORBA::Double Yaxe, CORBA::Double Zaxe, CORBA::Double Angle, + CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre) +{ + MESSAGE ("CreateBoundaryConeA : BoundaryName = " << BoundaryName ) ; +// + SALOME::ExceptionStruct es; + int error = 0 ; + if ( Angle <= 0.0 or Angle >= 90.0 ) + { es.text = "The angle must be included higher than 0 degree and lower than 90 degrees." ; + error = 1 ; } + double daux = fabs(Xaxe) + fabs(Yaxe) + fabs(Zaxe) ; + if ( daux < 0.0000001 ) + { es.text = "The axis must be a non 0 vector." ; + error = 2 ; } + if ( error != 0 ) + { + es.type = SALOME::BAD_PARAM; + throw SALOME::SALOME_Exception(es); + return 0; + }; +// + HOMARD::HOMARD_Boundary_var myBoundary = CreateBoundary(BoundaryName, 3) ; + myBoundary->SetConeA( Xaxe, Yaxe, Zaxe, Angle, Xcentre, Ycentre, Zcentre ) ; + + return HOMARD::HOMARD_Boundary::_duplicate(myBoundary) ; +} +//============================================================================= +HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundaryConeR(const char* BoundaryName, + CORBA::Double Xcentre1, CORBA::Double Ycentre1, CORBA::Double Zcentre1, CORBA::Double Rayon1, + CORBA::Double Xcentre2, CORBA::Double Ycentre2, CORBA::Double Zcentre2, CORBA::Double Rayon2) +{ + MESSAGE ("CreateBoundaryConeR : BoundaryName = " << BoundaryName ) ; +// + SALOME::ExceptionStruct es; + int error = 0 ; + if ( Rayon1 < 0.0 or Rayon2 < 0.0 ) + { es.text = "The radius must be positive." ; + error = 1 ; } + double daux = fabs(Rayon2-Rayon1) ; + if ( daux < 0.0000001 ) + { es.text = "The radius must be different." ; + error = 2 ; } + daux = fabs(Xcentre2-Xcentre1) + fabs(Ycentre2-Ycentre1) + fabs(Zcentre2-Zcentre1) ; + if ( daux < 0.0000001 ) + { es.text = "The centers must be different." ; + error = 3 ; } + if ( error != 0 ) + { + es.type = SALOME::BAD_PARAM; + throw SALOME::SALOME_Exception(es); + return 0; + }; +// + HOMARD::HOMARD_Boundary_var myBoundary = CreateBoundary(BoundaryName, 4) ; + myBoundary->SetConeR( Xcentre1, Ycentre1, Zcentre1, Rayon1, Xcentre2, Ycentre2, Zcentre2, Rayon2 ) ; + + return HOMARD::HOMARD_Boundary::_duplicate(myBoundary) ; +} +//============================================================================= HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZone(const char* ZoneName, CORBA::Long ZoneType) { MESSAGE ("CreateZone : ZoneName = " << ZoneName << ", ZoneType = " << ZoneType); @@ -1362,6 +1452,25 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneBox(const char* ZoneName, CORBA::Double Zmini, CORBA::Double Zmaxi) { MESSAGE ("CreateZoneBox : ZoneName = " << ZoneName ) ; +// + SALOME::ExceptionStruct es; + int error = 0 ; + if ( Xmini > Xmaxi ) + { es.text = "The X coordinates are not coherent." ; + error = 1 ; } + if ( Ymini > Ymaxi ) + { es.text = "The Y coordinates are not coherent." ; + error = 2 ; } + if ( Zmini > Zmaxi ) + { es.text = "The Z coordinates are not coherent." ; + error = 3 ; } + if ( error != 0 ) + { + es.type = SALOME::BAD_PARAM; + throw SALOME::SALOME_Exception(es); + return 0; + }; +// HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 2) ; myZone->SetBox ( Xmini, Xmaxi, Ymini, Ymaxi, Zmini, Zmaxi) ; @@ -1372,6 +1481,19 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneSphere(const char* ZoneName, CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre, CORBA::Double Rayon) { MESSAGE ("CreateZoneSphere : ZoneName = " << ZoneName ) ; +// + SALOME::ExceptionStruct es; + int error = 0 ; + if ( Rayon <= 0.0 ) + { es.text = "The radius must be positive." ; + error = 1 ; } + if ( error != 0 ) + { + es.type = SALOME::BAD_PARAM; + throw SALOME::SALOME_Exception(es); + return 0; + }; +// HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 4) ; myZone->SetSphere( Xcentre, Ycentre, Zcentre, Rayon ) ; @@ -1384,6 +1506,26 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneCylinder(const char* ZoneName, CORBA::Double Rayon, CORBA::Double Haut) { MESSAGE ("CreateZoneCylinder : ZoneName = " << ZoneName ) ; +// + SALOME::ExceptionStruct es; + int error = 0 ; + if ( Rayon <= 0.0 ) + { es.text = "The radius must be positive." ; + error = 1 ; } + double daux = fabs(Xaxe) + fabs(Yaxe) + fabs(Zaxe) ; + if ( daux < 0.0000001 ) + { es.text = "The axis must be a non 0 vector." ; + error = 2 ; } + if ( Haut <= 0.0 ) + { es.text = "The height must be positive." ; + error = 3 ; } + if ( error != 0 ) + { + es.type = SALOME::BAD_PARAM; + throw SALOME::SALOME_Exception(es); + return 0; + }; +// HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 5) ; myZone->SetCylinder( Xcentre, Ycentre, Zcentre, Xaxe, Yaxe, Zaxe, Rayon, Haut ) ; @@ -1396,6 +1538,29 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZonePipe(const char* ZoneName, CORBA::Double Rayon, CORBA::Double Haut, CORBA::Double Rayonint) { MESSAGE ("CreateZonePipe : ZoneName = " << ZoneName ) ; +// + SALOME::ExceptionStruct es; + int error = 0 ; + if ( Rayon <= 0.0 or Rayonint <= 0.0 ) + { es.text = "The radius must be positive." ; + error = 1 ; } + double daux = fabs(Xaxe) + fabs(Yaxe) + fabs(Zaxe) ; + if ( daux < 0.0000001 ) + { es.text = "The axis must be a non 0 vector." ; + error = 2 ; } + if ( Haut <= 0.0 ) + { es.text = "The height must be positive." ; + error = 3 ; } + if ( Rayon <= Rayonint ) + { es.text = "The external radius must be higher than the internal radius." ; + error = 4 ; } + if ( error != 0 ) + { + es.type = SALOME::BAD_PARAM; + throw SALOME::SALOME_Exception(es); + return 0; + }; +// HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 7) ; myZone->SetPipe( Xcentre, Ycentre, Zcentre, Xaxe, Yaxe, Zaxe, Rayon, Haut, Rayonint ) ; @@ -1411,7 +1576,25 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneBox2D(const char* ZoneName, // MESSAGE ("Umini = " << Umini << ", Umaxi =" << Umaxi ) ; // MESSAGE ("Vmini = " << Vmini << ", Vmaxi =" << Vmaxi ) ; // MESSAGE ("Orient = " << Orient ) ; - +// + SALOME::ExceptionStruct es; + int error = 0 ; + if ( Umini > Umaxi ) + { es.text = "The first coordinates are not coherent." ; + error = 1 ; } + if ( Vmini > Vmaxi ) + { es.text = "The second coordinates are not coherent." ; + error = 2 ; } + if ( Orient < 1 or Orient > 3 ) + { es.text = "The orientation must be 1, 2 or 3." ; + error = 3 ; } + if ( error != 0 ) + { + es.type = SALOME::BAD_PARAM; + throw SALOME::SALOME_Exception(es); + return 0; + }; +// double Xmini, Xmaxi ; double Ymini, Ymaxi ; double Zmini, Zmaxi ; @@ -1450,6 +1633,22 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneDisk(const char* ZoneName, CORBA::Long Orient) { MESSAGE ("CreateZoneDisk : ZoneName = " << ZoneName ) ; +// + SALOME::ExceptionStruct es; + int error = 0 ; + if ( Rayon <= 0.0 ) + { es.text = "The radius must be positive." ; + error = 1 ; } + if ( Orient < 1 or Orient > 3 ) + { es.text = "The orientation must be 1, 2 or 3." ; + error = 3 ; } + if ( error != 0 ) + { + es.type = SALOME::BAD_PARAM; + throw SALOME::SALOME_Exception(es); + return 0; + }; +// double Xcentre ; double Ycentre ; double Zcentre ; @@ -1479,6 +1678,25 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneDiskWithHole(const char* ZoneNam CORBA::Long Orient) { MESSAGE ("CreateZoneDiskWithHole : ZoneName = " << ZoneName ) ; +// + SALOME::ExceptionStruct es; + int error = 0 ; + if ( Rayon <= 0.0 or Rayonint <= 0.0 ) + { es.text = "The radius must be positive." ; + error = 1 ; } + if ( Orient < 1 or Orient > 3 ) + { es.text = "The orientation must be 1, 2 or 3." ; + error = 3 ; } + if ( Rayon <= Rayonint ) + { es.text = "The external radius must be higher than the internal radius." ; + error = 4 ; } + if ( error != 0 ) + { + es.type = SALOME::BAD_PARAM; + throw SALOME::SALOME_Exception(es); + return 0; + }; +// double Xcentre ; double Ycentre ; double Zcentre ; @@ -1733,7 +1951,7 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOM { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text= "This iteration does not have any associated hypothesis."; + es.text = "This iteration does not have any associated hypothesis."; throw SALOME::SALOME_Exception(es); return 2; }; @@ -1795,8 +2013,7 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOM { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - std::string text = "PB with meshfile destruction "; - es.text = CORBA::string_dup(text.c_str()); + es.text = "The mesh file cannot be deleted."; throw SALOME::SALOME_Exception(es); return 5; } @@ -2101,12 +2318,22 @@ void HOMARD_Gen_i::DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriv HOMARD::double_array* coor = myBoundary->GetCoords(); if (BoundaryType == 1) // Cas d un cylindre { - myDriver->TexteBoundaryAn(BoundaryName, NumBoundaryAnalytical, BoundaryType, (*coor)[0], (*coor)[1], (*coor)[2], (*coor)[3], (*coor)[4], (*coor)[5], (*coor)[6]); + myDriver->TexteBoundaryAn(BoundaryName, NumBoundaryAnalytical, BoundaryType, (*coor)[0], (*coor)[1], (*coor)[2], (*coor)[3], (*coor)[4], (*coor)[5], (*coor)[6], 0.); BoundaryOption = BoundaryOption*3 ; } else if (BoundaryType == 2) // Cas d une sphere { - myDriver->TexteBoundaryAn(BoundaryName, NumBoundaryAnalytical, BoundaryType, (*coor)[0], (*coor)[1], (*coor)[2], (*coor)[3], 0., 0., 0.); + myDriver->TexteBoundaryAn(BoundaryName, NumBoundaryAnalytical, BoundaryType, (*coor)[0], (*coor)[1], (*coor)[2], (*coor)[3], 0., 0., 0., 0.); + BoundaryOption = BoundaryOption*3 ; + } + else if (BoundaryType == 3) // Cas d un cone defini par un axe et un angle + { + myDriver->TexteBoundaryAn(BoundaryName, NumBoundaryAnalytical, BoundaryType, (*coor)[0], (*coor)[1], (*coor)[2], (*coor)[3], (*coor)[4], (*coor)[5], (*coor)[6], 0.); + BoundaryOption = BoundaryOption*3 ; + } + else if (BoundaryType == 4) // Cas d un cone defini par les 2 rayons + { + myDriver->TexteBoundaryAn(BoundaryName, NumBoundaryAnalytical, BoundaryType, (*coor)[0], (*coor)[1], (*coor)[2], (*coor)[3], (*coor)[4], (*coor)[5], (*coor)[6], (*coor)[7]); BoundaryOption = BoundaryOption*3 ; } } @@ -2201,7 +2428,7 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy, { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; + es.text = "Invalid study context"; throw SALOME::SALOME_Exception(es); return 0; }; @@ -2415,6 +2642,16 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishBoundaryInStudy(SALOMEDS::Study_ptr t icone = "spherepoint_2.png" ; break; } + case 3 : + { value = "BoundaryAnHomard" ; + icone = "conepointvector.png" ; + break; + } + case 4 : + { value = "BoundaryAnHomard" ; + icone = "conedxyz.png" ; + break; + } } PublishInStudyAttr(aStudyBuilder, aResultSO, theName, value, icone, _orb->object_to_string(theObject)); return aResultSO._retn(); @@ -2526,7 +2763,7 @@ void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long Option) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; + es.text = "Invalid study context"; throw SALOME::SALOME_Exception(es); return ; }; @@ -2606,7 +2843,7 @@ void HOMARD_Gen_i::DeleteResultInSmesh(const char* NomFich, const char* MeshName { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; + es.text = "Invalid study context"; throw SALOME::SALOME_Exception(es); return ; }; @@ -2653,7 +2890,7 @@ void HOMARD_Gen_i::PublishFileUnderIteration(const char* NomIter, const char* No { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; + es.text = "Invalid study context"; throw SALOME::SALOME_Exception(es); return ; }; @@ -2663,7 +2900,7 @@ void HOMARD_Gen_i::PublishFileUnderIteration(const char* NomIter, const char* No { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Iteration "; + es.text = "Invalid iteration"; throw SALOME::SALOME_Exception(es); return ; }; @@ -2672,7 +2909,7 @@ void HOMARD_Gen_i::PublishFileUnderIteration(const char* NomIter, const char* No { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Iteration Study Object"; + es.text = "Invalid iterationStudy Object"; throw SALOME::SALOME_Exception(es); return ; }; @@ -3267,7 +3504,7 @@ void HOMARD_Gen_i::IsValidStudy( ) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context"; + es.text = "Invalid study context"; throw SALOME::SALOME_Exception(es); }; return ; diff --git a/src/HOMARD_I/HOMARD_Gen_i.hxx b/src/HOMARD_I/HOMARD_Gen_i.hxx index 72d74caf..c3cef187 100644 --- a/src/HOMARD_I/HOMARD_Gen_i.hxx +++ b/src/HOMARD_I/HOMARD_Gen_i.hxx @@ -66,6 +66,12 @@ public: HOMARD::HOMARD_Boundary_ptr CreateBoundarySphere (const char* nomBoundary, CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre, CORBA::Double Rayon); + HOMARD::HOMARD_Boundary_ptr CreateBoundaryConeR (const char* nomBoundary, + CORBA::Double Xcentre1, CORBA::Double Ycentre1, CORBA::Double Zcentre1, CORBA::Double Rayon1, + CORBA::Double Xcentre2, CORBA::Double Ycentre2, CORBA::Double Zcentre2, CORBA::Double Rayon2); + HOMARD::HOMARD_Boundary_ptr CreateBoundaryConeA (const char* nomBoundary, + CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis, CORBA::Double Angle, + CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre); HOMARD::HOMARD_Cas_ptr CreateCase (const char* nomCas, const char* MeshName, const char* FileName);