Salome HOME
Frontière analytique torique
authornicolas <nicolas>
Wed, 15 Jan 2014 13:50:37 +0000 (13:50 +0000)
committernicolas <nicolas>
Wed, 15 Jan 2014 13:50:37 +0000 (13:50 +0000)
22 files changed:
idl/HOMARD_Boundary.idl
idl/HOMARD_Gen.idl
resources/CMakeLists.txt
resources/toruspointvector.png [new file with mode: 0644]
src/HOMARD/HOMARD_Boundary.cxx
src/HOMARD/HOMARD_Boundary.hxx
src/HOMARD/HomardDriver.cxx
src/HOMARDGUI/CreateBoundaryAn.h
src/HOMARDGUI/CreateBoundaryAn.ui
src/HOMARDGUI/CreateZone.h
src/HOMARDGUI/CreateZone.ui
src/HOMARDGUI/HOMARD_msg_fr.ts
src/HOMARDGUI/MonCreateBoundaryAn.cxx
src/HOMARDGUI/MonCreateBoundaryAn.h
src/HOMARDGUI/MonCreateZone.cxx
src/HOMARDGUI/MonEditBoundaryAn.cxx
src/HOMARDGUI/MonEditBoundaryAn.h
src/HOMARDGUI/MonEditZone.cxx
src/HOMARD_I/HOMARD_Boundary_i.cxx
src/HOMARD_I/HOMARD_Boundary_i.hxx
src/HOMARD_I/HOMARD_Gen_i.cxx
src/HOMARD_I/HOMARD_Gen_i.hxx

index da4c0093bb24ab88bfab4e11596715f2215942b8..811150396042ad611bad82f44277cc98cf967044 100644 (file)
@@ -74,6 +74,10 @@ module HOMARD
                       in double Xcentre,in double Ycentre,in double ZCentre)
                                                            raises (SALOME::SALOME_Exception);
 
+    void     SetTorus (in double Xcentre, in double Ycentre, in double Zcentre,
+                          in double Xaxe, in double Yaxe, in double Zaxe, in double rayonRev, in double rayonPri)
+                                                           raises (SALOME::SALOME_Exception);
+
 
     HOMARD::double_array GetCoords()                       raises (SALOME::SALOME_Exception);
 
index 827d53fe6e22b5aa7e8887a84ff1045ec3b8e6ea..8ae213db0b6225c3577c127578ec5f4a95465f32 100644 (file)
@@ -70,6 +70,11 @@ module HOMARD
                                       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_Boundary   CreateBoundaryTorus (in string BoundaryName,
+                                      in double Xcentre, in double Ycentre, in double Zcentre,
+                                      in double Xaxis, in double Yaxis, in double Zaxis,
+                                      in double RadiusRev, in double RadiusPri)
+    raises (SALOME::SALOME_Exception);
     HOMARD_Cas        CreateCase(in string CaseName, in string MeshName, in string FileName )
     raises(SALOME::SALOME_Exception);
     HOMARD_Cas        CreateCaseFromIteration(in string CaseName, in string DirNameStart )
index 58bf62b20bd189931b534d8372054f9ad61db52f..e4fa9f63529fb6e00ace08a95a78dc98bd142085 100755 (executable)
@@ -65,6 +65,7 @@ SET(HOMARD_RESOURCES_FILES
   table_view.png
   texte.png
   texte_2.png
+  toruspointvector.png
   triangle.png
   whatis.png
   write.png
diff --git a/resources/toruspointvector.png b/resources/toruspointvector.png
new file mode 100644 (file)
index 0000000..138b520
Binary files /dev/null and b/resources/toruspointvector.png differ
index f7743014f3056b5a5a9ad508ea55b76c2cba0d05..de32d7f061fa3ec7279f6c8ac21a978a02d106c0 100644 (file)
@@ -113,6 +113,13 @@ std::string HOMARD_Boundary::GetDumpPython() const
       aScript << _Xcentre1 << ", " << _Ycentre1 << ", " << _Zcentre1 << ", " << _Rayon1 << ", " << _Xcentre2 << ", " << _Ycentre2 << ", " << _Zcentre2 << ", " << _Rayon2 << ")\n";
       break ;
     }
+    case 5:
+    {
+      aScript << "tore " << _Name << "\n";
+      aScript << "\t" << _Name << " = homard.CreateBoundaryTorus(\"" << _Name << "\", ";
+      aScript << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _Xaxe << ", " << _Yaxe << ", " << _Zaxe << ", " << _Rayon1 << ", " << _Rayon2 << ")\n";
+      break ;
+    }
   }
 
   return aScript.str();
@@ -183,6 +190,15 @@ void HOMARD_Boundary::SetConeA( double Xaxe, double Yaxe, double Zaxe, double An
   _Xcentre = Xcentre; _Ycentre = Ycentre; _Zcentre = Zcentre;
 }
 //=======================================================================================
+void HOMARD_Boundary::SetTorus( double X0, double X1, double X2,
+                                double X3, double X4, double X5, double X6, double X7 )
+{
+  _Xcentre = X0; _Ycentre = X1; _Zcentre = X2;
+  _Xaxe = X3; _Yaxe = X4; _Zaxe = X5;
+  _Rayon1 = X6;
+  _Rayon2 = X7;
+}
+//=======================================================================================
 std::vector<double> HOMARD_Boundary::GetCoords() const
 {
   std::vector<double> mesCoor;
@@ -235,7 +251,20 @@ std::vector<double> HOMARD_Boundary::GetCoords() const
       mesCoor.push_back( _Rayon2 );
       break ;
     }
-    VERIFICATION( (_Type>=1) && (_Type<=4) ) ;
+//  Tore
+    case 5:
+    {
+      mesCoor.push_back( _Xcentre );
+      mesCoor.push_back( _Ycentre );
+      mesCoor.push_back( _Zcentre );
+      mesCoor.push_back( _Xaxe );
+      mesCoor.push_back( _Yaxe );
+      mesCoor.push_back( _Zaxe );
+      mesCoor.push_back( _Rayon1 );
+      mesCoor.push_back( _Rayon2 );
+      break ;
+    }
+    VERIFICATION( (_Type>=1) && (_Type<=5) ) ;
   }
   return mesCoor;
 }
index df94e5e6379b055be0b5285c3730c30cf0e3fba9..164044a7f0a0c07d2a4d09938a4b6c2782e1b7c5 100644 (file)
@@ -73,6 +73,8 @@ public:
                                           double Xcentre2, double Ycentre2, double Zcentre2, double Rayon2);
   void                          SetConeA( double Xaxe, double Yaxe, double Zaxe, double Angle,
                                           double Xcentre, double Ycentre, double ZCentre);
+  void                          SetTorus( double X0, double X1, double X2, double X3,
+                                             double X4, double X5, double X6, double X7 );
 
   std::vector<double>           GetCoords() const;
 
index 4589c24adcf1e6ba836f66fe5b22d4888df02411..12f70941549c1c38e0e45b427ee900987a96cbff 100644 (file)
@@ -657,6 +657,8 @@ void HomardDriver::TexteBoundaryAn( const std::string NameBoundary, int NumeBoun
   { saux += "# Sphere\n" ; }
   if ( BoundaryType == 3 || BoundaryType == 4 )
   { saux += "# Cone\n" ; }
+  if ( BoundaryType == 5 )
+  { saux += "# Tore\n" ; }
 //
 // Le nom de la frontiere
 //
@@ -800,6 +802,45 @@ void HomardDriver::TexteBoundaryAn( const std::string NameBoundary, int NumeBoun
       saux += "FARayon2 " + saux1.str() + "\n" ;
     }
  }
+//
+// Cas du tore
+//
+  if ( BoundaryType == 5 )
+  {
+    { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x0 ;
+      saux2 = saux1.str() ;
+      saux += "FAXCen " + saux1.str() + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x1 ;
+      saux += "FAYCen " + saux1.str() + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x2 ;
+      saux += "FAZCen " + saux1.str() + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x3 ;
+      saux += "FAXAxe " + saux1.str() + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x4 ;
+      saux += "FAYAxe " + saux1.str() + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x5 ;
+      saux += "FAZAxe " + saux1.str() + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x6 ;
+      saux += "FARayon  " + saux1.str() + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x7 ;
+      saux += "FARayon2 " + saux1.str() + "\n" ;
+    }
+ }
 //
   _Texte += saux + "#\n" ;
 //
index 48778fdd281447032400cf18a91a6b1c5b3b9745..60cc12b7b8c9c3f325faabc073b4a548c4ce307a 100644 (file)
@@ -1,7 +1,7 @@
 /********************************************************************************
 ** Form generated from reading UI file 'CreateBoundaryAn.ui'
 **
-** Created: Tue Sep 17 14:08:40 2013
+** Created: Wed Jan 15 11:19:06 2014
 **      by: Qt User Interface Compiler version 4.6.3
 **
 ** WARNING! All changes made in this file will be lost when recompiling UI file!
@@ -29,7 +29,7 @@ QT_BEGIN_NAMESPACE
 class Ui_CreateBoundaryAn
 {
 public:
-    QGridLayout *gridLayout_4;
+    QGridLayout *gridLayout_5;
     QLabel *Name;
     QLineEdit *LEName;
     QGroupBox *TypeBoundary;
@@ -37,6 +37,7 @@ public:
     QRadioButton *RBCylindre;
     QRadioButton *RBSphere;
     QRadioButton *RBCone;
+    QRadioButton *RBTore;
     QGroupBox *gBCylindre;
     QGridLayout *gridLayout1;
     QDoubleSpinBox *SpinBox_Xcent;
@@ -85,6 +86,24 @@ public:
     QDoubleSpinBox *SpinBox_Cone_V1;
     QLabel *TLCone_V2;
     QDoubleSpinBox *SpinBox_Cone_V2;
+    QGroupBox *gBTore;
+    QGridLayout *gridLayout_4;
+    QLabel *TLToreXcent;
+    QDoubleSpinBox *SpinBoxToreXcent;
+    QLabel *TLToreXaxe;
+    QDoubleSpinBox *SpinBoxToreXaxe;
+    QLabel *TLToreYcent;
+    QDoubleSpinBox *SpinBoxToreYcent;
+    QLabel *TLToreYaxe;
+    QDoubleSpinBox *SpinBoxToreYaxe;
+    QLabel *TLToreZcent;
+    QDoubleSpinBox *SpinBoxToreZcent;
+    QLabel *TLToreZaxe;
+    QDoubleSpinBox *SpinBoxToreZaxe;
+    QLabel *TLToreRayRev;
+    QDoubleSpinBox *SpinBoxToreRRev;
+    QLabel *TLToreRayPri;
+    QDoubleSpinBox *SpinBoxToreRPri;
     QGroupBox *GBButtons;
     QGridLayout *gridLayout3;
     QPushButton *buttonHelp;
@@ -96,21 +115,21 @@ public:
     {
         if (CreateBoundaryAn->objectName().isEmpty())
             CreateBoundaryAn->setObjectName(QString::fromUtf8("CreateBoundaryAn"));
-        CreateBoundaryAn->resize(527, 701);
+        CreateBoundaryAn->resize(522, 835);
         CreateBoundaryAn->setAutoFillBackground(true);
         CreateBoundaryAn->setSizeGripEnabled(true);
-        gridLayout_4 = new QGridLayout(CreateBoundaryAn);
-        gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4"));
+        gridLayout_5 = new QGridLayout(CreateBoundaryAn);
+        gridLayout_5->setObjectName(QString::fromUtf8("gridLayout_5"));
         Name = new QLabel(CreateBoundaryAn);
         Name->setObjectName(QString::fromUtf8("Name"));
 
-        gridLayout_4->addWidget(Name, 0, 0, 1, 1);
+        gridLayout_5->addWidget(Name, 0, 0, 1, 1);
 
         LEName = new QLineEdit(CreateBoundaryAn);
         LEName->setObjectName(QString::fromUtf8("LEName"));
         LEName->setMaxLength(32);
 
-        gridLayout_4->addWidget(LEName, 0, 1, 1, 1);
+        gridLayout_5->addWidget(LEName, 0, 1, 1, 1);
 
         TypeBoundary = new QGroupBox(CreateBoundaryAn);
         TypeBoundary->setObjectName(QString::fromUtf8("TypeBoundary"));
@@ -148,8 +167,18 @@ public:
 
         gridLayout->addWidget(RBCone, 0, 2, 1, 1);
 
+        RBTore = new QRadioButton(TypeBoundary);
+        RBTore->setObjectName(QString::fromUtf8("RBTore"));
+        QIcon icon3;
+        icon3.addFile(QString::fromUtf8("../../resources/toruspointvector.png"), QSize(), QIcon::Normal, QIcon::Off);
+        RBTore->setIcon(icon3);
+        RBTore->setCheckable(true);
+        RBTore->setChecked(false);
+
+        gridLayout->addWidget(RBTore, 0, 3, 1, 1);
 
-        gridLayout_4->addWidget(TypeBoundary, 1, 0, 1, 2);
+
+        gridLayout_5->addWidget(TypeBoundary, 1, 0, 1, 2);
 
         gBCylindre = new QGroupBox(CreateBoundaryAn);
         gBCylindre->setObjectName(QString::fromUtf8("gBCylindre"));
@@ -281,7 +310,7 @@ public:
         gridLayout1->addWidget(SpinBox_Xaxis, 0, 3, 1, 1);
 
 
-        gridLayout_4->addWidget(gBCylindre, 2, 0, 1, 2);
+        gridLayout_5->addWidget(gBCylindre, 2, 0, 1, 2);
 
         gBSphere = new QGroupBox(CreateBoundaryAn);
         gBSphere->setObjectName(QString::fromUtf8("gBSphere"));
@@ -364,7 +393,7 @@ public:
         gridLayout2->addWidget(TLXcentre, 0, 0, 1, 1);
 
 
-        gridLayout_4->addWidget(gBSphere, 3, 0, 1, 2);
+        gridLayout_5->addWidget(gBSphere, 3, 0, 1, 2);
 
         gBCone = new QGroupBox(CreateBoundaryAn);
         gBCone->setObjectName(QString::fromUtf8("gBCone"));
@@ -378,18 +407,18 @@ public:
         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);
+        QIcon icon4;
+        icon4.addFile(QString::fromUtf8("../../resources/conedxyz.png"), QSize(), QIcon::Normal, QIcon::Off);
+        RB_Def_radius->setIcon(icon4);
         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);
+        QIcon icon5;
+        icon5.addFile(QString::fromUtf8("../../resources/conepointvector.png"), QSize(), QIcon::Normal, QIcon::Off);
+        RB_Def_angle->setIcon(icon5);
 
         gridLayout_2->addWidget(RB_Def_angle, 0, 1, 1, 1);
 
@@ -508,7 +537,7 @@ public:
 
         SpinBox_Cone_V1 = new QDoubleSpinBox(gBCone);
         SpinBox_Cone_V1->setObjectName(QString::fromUtf8("SpinBox_Cone_V1"));
-        SpinBox_Cone_V1->setDecimals(14);
+        SpinBox_Cone_V1->setDecimals(5);
         SpinBox_Cone_V1->setMaximum(1e+09);
 
         gridLayout_3->addWidget(SpinBox_Cone_V1, 4, 1, 1, 1);
@@ -523,13 +552,154 @@ public:
 
         SpinBox_Cone_V2 = new QDoubleSpinBox(gBCone);
         SpinBox_Cone_V2->setObjectName(QString::fromUtf8("SpinBox_Cone_V2"));
-        SpinBox_Cone_V2->setDecimals(14);
+        SpinBox_Cone_V2->setDecimals(5);
         SpinBox_Cone_V2->setMaximum(1e+09);
 
         gridLayout_3->addWidget(SpinBox_Cone_V2, 4, 3, 1, 1);
 
 
-        gridLayout_4->addWidget(gBCone, 4, 0, 1, 2);
+        gridLayout_5->addWidget(gBCone, 4, 0, 1, 2);
+
+        gBTore = new QGroupBox(CreateBoundaryAn);
+        gBTore->setObjectName(QString::fromUtf8("gBTore"));
+        sizePolicy.setHeightForWidth(gBTore->sizePolicy().hasHeightForWidth());
+        gBTore->setSizePolicy(sizePolicy);
+        gridLayout_4 = new QGridLayout(gBTore);
+        gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4"));
+        TLToreXcent = new QLabel(gBTore);
+        TLToreXcent->setObjectName(QString::fromUtf8("TLToreXcent"));
+        sizePolicy.setHeightForWidth(TLToreXcent->sizePolicy().hasHeightForWidth());
+        TLToreXcent->setSizePolicy(sizePolicy);
+        TLToreXcent->setWordWrap(false);
+
+        gridLayout_4->addWidget(TLToreXcent, 0, 0, 1, 1);
+
+        SpinBoxToreXcent = new QDoubleSpinBox(gBTore);
+        SpinBoxToreXcent->setObjectName(QString::fromUtf8("SpinBoxToreXcent"));
+        SpinBoxToreXcent->setDecimals(5);
+        SpinBoxToreXcent->setMinimum(-1e+09);
+        SpinBoxToreXcent->setMaximum(1e+09);
+        SpinBoxToreXcent->setValue(0);
+
+        gridLayout_4->addWidget(SpinBoxToreXcent, 0, 1, 1, 1);
+
+        TLToreXaxe = new QLabel(gBTore);
+        TLToreXaxe->setObjectName(QString::fromUtf8("TLToreXaxe"));
+        sizePolicy.setHeightForWidth(TLToreXaxe->sizePolicy().hasHeightForWidth());
+        TLToreXaxe->setSizePolicy(sizePolicy);
+        TLToreXaxe->setWordWrap(false);
+
+        gridLayout_4->addWidget(TLToreXaxe, 0, 2, 1, 1);
+
+        SpinBoxToreXaxe = new QDoubleSpinBox(gBTore);
+        SpinBoxToreXaxe->setObjectName(QString::fromUtf8("SpinBoxToreXaxe"));
+        SpinBoxToreXaxe->setDecimals(5);
+        SpinBoxToreXaxe->setMinimum(-1e+09);
+        SpinBoxToreXaxe->setMaximum(1e+09);
+        SpinBoxToreXaxe->setValue(0);
+
+        gridLayout_4->addWidget(SpinBoxToreXaxe, 0, 3, 1, 1);
+
+        TLToreYcent = new QLabel(gBTore);
+        TLToreYcent->setObjectName(QString::fromUtf8("TLToreYcent"));
+        sizePolicy.setHeightForWidth(TLToreYcent->sizePolicy().hasHeightForWidth());
+        TLToreYcent->setSizePolicy(sizePolicy);
+        TLToreYcent->setWordWrap(false);
+
+        gridLayout_4->addWidget(TLToreYcent, 1, 0, 1, 1);
+
+        SpinBoxToreYcent = new QDoubleSpinBox(gBTore);
+        SpinBoxToreYcent->setObjectName(QString::fromUtf8("SpinBoxToreYcent"));
+        SpinBoxToreYcent->setDecimals(5);
+        SpinBoxToreYcent->setMinimum(-1e+09);
+        SpinBoxToreYcent->setMaximum(1e+09);
+        SpinBoxToreYcent->setValue(0);
+
+        gridLayout_4->addWidget(SpinBoxToreYcent, 1, 1, 1, 1);
+
+        TLToreYaxe = new QLabel(gBTore);
+        TLToreYaxe->setObjectName(QString::fromUtf8("TLToreYaxe"));
+        sizePolicy.setHeightForWidth(TLToreYaxe->sizePolicy().hasHeightForWidth());
+        TLToreYaxe->setSizePolicy(sizePolicy);
+        TLToreYaxe->setWordWrap(false);
+
+        gridLayout_4->addWidget(TLToreYaxe, 1, 2, 1, 1);
+
+        SpinBoxToreYaxe = new QDoubleSpinBox(gBTore);
+        SpinBoxToreYaxe->setObjectName(QString::fromUtf8("SpinBoxToreYaxe"));
+        SpinBoxToreYaxe->setDecimals(5);
+        SpinBoxToreYaxe->setMinimum(-1e+09);
+        SpinBoxToreYaxe->setMaximum(1e+09);
+        SpinBoxToreYaxe->setValue(0);
+
+        gridLayout_4->addWidget(SpinBoxToreYaxe, 1, 3, 1, 1);
+
+        TLToreZcent = new QLabel(gBTore);
+        TLToreZcent->setObjectName(QString::fromUtf8("TLToreZcent"));
+        sizePolicy.setHeightForWidth(TLToreZcent->sizePolicy().hasHeightForWidth());
+        TLToreZcent->setSizePolicy(sizePolicy);
+        TLToreZcent->setWordWrap(false);
+
+        gridLayout_4->addWidget(TLToreZcent, 2, 0, 1, 1);
+
+        SpinBoxToreZcent = new QDoubleSpinBox(gBTore);
+        SpinBoxToreZcent->setObjectName(QString::fromUtf8("SpinBoxToreZcent"));
+        SpinBoxToreZcent->setDecimals(5);
+        SpinBoxToreZcent->setMinimum(-1e+09);
+        SpinBoxToreZcent->setMaximum(1e+09);
+        SpinBoxToreZcent->setValue(0);
+
+        gridLayout_4->addWidget(SpinBoxToreZcent, 2, 1, 1, 1);
+
+        TLToreZaxe = new QLabel(gBTore);
+        TLToreZaxe->setObjectName(QString::fromUtf8("TLToreZaxe"));
+        sizePolicy.setHeightForWidth(TLToreZaxe->sizePolicy().hasHeightForWidth());
+        TLToreZaxe->setSizePolicy(sizePolicy);
+        TLToreZaxe->setWordWrap(false);
+
+        gridLayout_4->addWidget(TLToreZaxe, 2, 2, 1, 1);
+
+        SpinBoxToreZaxe = new QDoubleSpinBox(gBTore);
+        SpinBoxToreZaxe->setObjectName(QString::fromUtf8("SpinBoxToreZaxe"));
+        SpinBoxToreZaxe->setDecimals(5);
+        SpinBoxToreZaxe->setMinimum(-1e+09);
+        SpinBoxToreZaxe->setMaximum(1e+09);
+        SpinBoxToreZaxe->setValue(0);
+
+        gridLayout_4->addWidget(SpinBoxToreZaxe, 2, 3, 1, 1);
+
+        TLToreRayRev = new QLabel(gBTore);
+        TLToreRayRev->setObjectName(QString::fromUtf8("TLToreRayRev"));
+        sizePolicy.setHeightForWidth(TLToreRayRev->sizePolicy().hasHeightForWidth());
+        TLToreRayRev->setSizePolicy(sizePolicy);
+        TLToreRayRev->setWordWrap(false);
+
+        gridLayout_4->addWidget(TLToreRayRev, 3, 0, 1, 1);
+
+        SpinBoxToreRRev = new QDoubleSpinBox(gBTore);
+        SpinBoxToreRRev->setObjectName(QString::fromUtf8("SpinBoxToreRRev"));
+        SpinBoxToreRRev->setDecimals(5);
+        SpinBoxToreRRev->setMaximum(1e+09);
+
+        gridLayout_4->addWidget(SpinBoxToreRRev, 3, 1, 1, 1);
+
+        TLToreRayPri = new QLabel(gBTore);
+        TLToreRayPri->setObjectName(QString::fromUtf8("TLToreRayPri"));
+        sizePolicy.setHeightForWidth(TLToreRayPri->sizePolicy().hasHeightForWidth());
+        TLToreRayPri->setSizePolicy(sizePolicy);
+        TLToreRayPri->setWordWrap(false);
+
+        gridLayout_4->addWidget(TLToreRayPri, 3, 2, 1, 1);
+
+        SpinBoxToreRPri = new QDoubleSpinBox(gBTore);
+        SpinBoxToreRPri->setObjectName(QString::fromUtf8("SpinBoxToreRPri"));
+        SpinBoxToreRPri->setDecimals(5);
+        SpinBoxToreRPri->setMaximum(1e+09);
+
+        gridLayout_4->addWidget(SpinBoxToreRPri, 3, 3, 1, 1);
+
+
+        gridLayout_5->addWidget(gBTore, 5, 0, 1, 2);
 
         GBButtons = new QGroupBox(CreateBoundaryAn);
         GBButtons->setObjectName(QString::fromUtf8("GBButtons"));
@@ -564,7 +734,7 @@ public:
         gridLayout3->addWidget(buttonOk, 0, 0, 1, 1);
 
 
-        gridLayout_4->addWidget(GBButtons, 5, 0, 1, 2);
+        gridLayout_5->addWidget(GBButtons, 6, 0, 1, 2);
 
 
         retranslateUi(CreateBoundaryAn);
@@ -580,6 +750,7 @@ public:
         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));
+        RBTore->setText(QApplication::translate("CreateBoundaryAn", "Torus", 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));
@@ -605,6 +776,15 @@ public:
         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));
+        gBTore->setTitle(QApplication::translate("CreateBoundaryAn", "Coordinates", 0, QApplication::UnicodeUTF8));
+        TLToreXcent->setText(QApplication::translate("CreateBoundaryAn", "X centre", 0, QApplication::UnicodeUTF8));
+        TLToreXaxe->setText(QApplication::translate("CreateBoundaryAn", "X axis", 0, QApplication::UnicodeUTF8));
+        TLToreYcent->setText(QApplication::translate("CreateBoundaryAn", "Y centre", 0, QApplication::UnicodeUTF8));
+        TLToreYaxe->setText(QApplication::translate("CreateBoundaryAn", "Y axis", 0, QApplication::UnicodeUTF8));
+        TLToreZcent->setText(QApplication::translate("CreateBoundaryAn", "Z centre", 0, QApplication::UnicodeUTF8));
+        TLToreZaxe->setText(QApplication::translate("CreateBoundaryAn", "Z axis", 0, QApplication::UnicodeUTF8));
+        TLToreRayRev->setText(QApplication::translate("CreateBoundaryAn", "R revolution", 0, QApplication::UnicodeUTF8));
+        TLToreRayPri->setText(QApplication::translate("CreateBoundaryAn", "Primary R", 0, QApplication::UnicodeUTF8));
         GBButtons->setTitle(QString());
         buttonHelp->setText(QApplication::translate("CreateBoundaryAn", "Help", 0, QApplication::UnicodeUTF8));
         buttonCancel->setText(QApplication::translate("CreateBoundaryAn", "Cancel", 0, QApplication::UnicodeUTF8));
index 30eecf6350ff7d78708465f2e0be07cb8d082291..ac291082db3ba6933ed8512aea53074b57e5359f 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>527</width>
-    <height>701</height>
+    <width>522</width>
+    <height>835</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -19,7 +19,7 @@
   <property name="sizeGripEnabled">
    <bool>true</bool>
   </property>
-  <layout class="QGridLayout" name="gridLayout_4">
+  <layout class="QGridLayout" name="gridLayout_5">
    <item row="0" column="0">
     <widget class="QLabel" name="Name">
      <property name="text">
         </property>
        </widget>
       </item>
+      <item row="0" column="3">
+       <widget class="QRadioButton" name="RBTore">
+        <property name="text">
+         <string>Torus</string>
+        </property>
+        <property name="icon">
+         <iconset>
+          <normaloff>../../resources/toruspointvector.png</normaloff>../../resources/toruspointvector.png</iconset>
+        </property>
+        <property name="checkable">
+         <bool>true</bool>
+        </property>
+        <property name="checked">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
      </layout>
     </widget>
    </item>
       <item row="4" column="1">
        <widget class="QDoubleSpinBox" name="SpinBox_Cone_V1">
         <property name="decimals">
-         <number>14</number>
+         <number>5</number>
         </property>
         <property name="maximum">
          <double>1000000000.000000000000000</double>
       <item row="4" column="3">
        <widget class="QDoubleSpinBox" name="SpinBox_Cone_V2">
         <property name="decimals">
-         <number>14</number>
+         <number>5</number>
         </property>
         <property name="maximum">
          <double>1000000000.000000000000000</double>
     </widget>
    </item>
    <item row="5" column="0" colspan="2">
+    <widget class="QGroupBox" name="gBTore">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>Coordinates</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_4">
+      <item row="0" column="0">
+       <widget class="QLabel" name="TLToreXcent">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>X centre</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QDoubleSpinBox" name="SpinBoxToreXcent">
+        <property name="decimals">
+         <number>5</number>
+        </property>
+        <property name="minimum">
+         <double>-999999999.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>999999999.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLabel" name="TLToreXaxe">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>X axis</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="3">
+       <widget class="QDoubleSpinBox" name="SpinBoxToreXaxe">
+        <property name="decimals">
+         <number>5</number>
+        </property>
+        <property name="minimum">
+         <double>-999999999.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>999999999.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TLToreYcent">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Y centre</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QDoubleSpinBox" name="SpinBoxToreYcent">
+        <property name="decimals">
+         <number>5</number>
+        </property>
+        <property name="minimum">
+         <double>-999999999.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>999999999.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLabel" name="TLToreYaxe">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Y axis</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="3">
+       <widget class="QDoubleSpinBox" name="SpinBoxToreYaxe">
+        <property name="decimals">
+         <number>5</number>
+        </property>
+        <property name="minimum">
+         <double>-999999999.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>999999999.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TLToreZcent">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Z centre</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QDoubleSpinBox" name="SpinBoxToreZcent">
+        <property name="decimals">
+         <number>5</number>
+        </property>
+        <property name="minimum">
+         <double>-999999999.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>999999999.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2">
+       <widget class="QLabel" name="TLToreZaxe">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Z axis</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="3">
+       <widget class="QDoubleSpinBox" name="SpinBoxToreZaxe">
+        <property name="decimals">
+         <number>5</number>
+        </property>
+        <property name="minimum">
+         <double>-999999999.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>999999999.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="TLToreRayRev">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>R revolution</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1">
+       <widget class="QDoubleSpinBox" name="SpinBoxToreRRev">
+        <property name="decimals">
+         <number>5</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="2">
+       <widget class="QLabel" name="TLToreRayPri">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Primary R</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="3">
+       <widget class="QDoubleSpinBox" name="SpinBoxToreRPri">
+        <property name="decimals">
+         <number>5</number>
+        </property>
+        <property name="maximum">
+         <double>1000000000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="6" column="0" colspan="2">
     <widget class="QGroupBox" name="GBButtons">
      <property name="sizePolicy">
       <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
index 5a968248fe048a55ca3a880d3de0494e594fac3f..74f50886a19424f3bdc2c066c1270e67007631dd 100644 (file)
@@ -1,7 +1,7 @@
 /********************************************************************************
 ** Form generated from reading UI file 'CreateZone.ui'
 **
-** Created: Wed Jan 15 08:42:10 2014
+** Created: Wed Jan 15 14:45:55 2014
 **      by: Qt User Interface Compiler version 4.6.3
 **
 ** WARNING! All changes made in this file will be lost when recompiling UI file!
@@ -115,7 +115,7 @@ public:
     {
         if (CreateZone->objectName().isEmpty())
             CreateZone->setObjectName(QString::fromUtf8("CreateZone"));
-        CreateZone->resize(550, 770);
+        CreateZone->resize(545, 778);
         CreateZone->setSizeIncrement(QSize(1, 1));
         CreateZone->setBaseSize(QSize(550, 400));
         CreateZone->setAutoFillBackground(true);
@@ -368,7 +368,7 @@ public:
         SpinBox_Rayon = new QDoubleSpinBox(gBSphere);
         SpinBox_Rayon->setObjectName(QString::fromUtf8("SpinBox_Rayon"));
         SpinBox_Rayon->setDecimals(5);
-        SpinBox_Rayon->setMinimum(-1e+09);
+        SpinBox_Rayon->setMinimum(0);
         SpinBox_Rayon->setMaximum(1e+09);
         SpinBox_Rayon->setValue(0);
 
@@ -741,7 +741,7 @@ public:
 
         horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
-        gridLayout->addItem(horizontalSpacer, 6, 3, 1, 1);
+        gridLayout->addItem(horizontalSpacer, 6, 3, 1, 2);
 
 
         retranslateUi(CreateZone);
index 7ac07232aab709cbf5d635739a0d450206799723..84a607516cd01eb0996c83aae0c1c6020e0b1117 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>550</width>
-    <height>770</height>
+    <width>545</width>
+    <height>778</height>
    </rect>
   </property>
   <property name="sizeIncrement">
          <number>5</number>
         </property>
         <property name="minimum">
-         <double>-999999999.000000000000000</double>
+         <double>0.000000000000000</double>
         </property>
         <property name="maximum">
          <double>999999999.000000000000000</double>
      </layout>
     </widget>
    </item>
-   <item row="6" column="3">
+   <item row="6" column="3" colspan="2">
     <spacer name="horizontalSpacer">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
index 71295cf11c045c676641ecc40c39678c7eb57fb6..28b90c823b56b4577a2efdbf3b297997fe1b11de 100644 (file)
         <source>Type of boundary</source>
         <translation>Type de la frontière</translation>
     </message>
+    <message>
+        <source>Torus</source>
+        <translation>Tore</translation>
+    </message>
     <message>
         <source>Radius</source>
         <translation>Rayon</translation>
         <source>Z axis</source>
         <translation>Z axe</translation>
     </message>
+    <message>
+        <source>R revolution</source>
+        <translation>R révolution</translation>
+    </message>
+    <message>
+        <source>Primary R</source>
+        <translation>R primaire</translation>
+    </message>
     <message>
         <source>HOM_BOUN_NAME</source>
         <translation>Il faut donner un nom à la frontière.</translation>
index 993f54004dea9e3dbd76cf87e8fdc5d5ca971c41..194569cb4868574586b4c3310fc070307ef572d6 100644 (file)
@@ -60,6 +60,9 @@ MonCreateBoundaryAn::MonCreateBoundaryAn(MonCreateCase* parent, bool modal,
     _BoundaryAnXcone2(0), _BoundaryAnYcone2(0), _BoundaryAnZcone2(0), _BoundaryAnRayon2(0),
     _BoundaryAnXaxisCone(0), _BoundaryAnYaxisCone(0), _BoundaryAnZaxisCone(0),
     _BoundaryAngle(0),
+    _BoundaryAnToreXcentre(0), _BoundaryAnToreYcentre(0), _BoundaryAnToreZcentre(0),
+    _BoundaryAnToreXaxe(0), _BoundaryAnToreYaxe(0), _BoundaryAnToreZaxe(0),
+    _BoundaryAnToreRRev(0), _BoundaryAnToreRPri(0),
     Chgt (false)
     {
       MESSAGE("Constructeur") ;
@@ -68,22 +71,27 @@ MonCreateBoundaryAn::MonCreateBoundaryAn(MonCreateCase* parent, bool modal,
       setModal(modal);
 
     //  Gestion des icones
+      QPixmap pix ;
+      QIcon IS ;
       SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-      QPixmap pix = resMgr->loadPixmap( "HOMARD", "spherepoint.png" );
-      QIcon IS=QIcon(pix);
+      pix = resMgr->loadPixmap( "HOMARD", "spherepoint.png" );
+      IS=QIcon(pix);
       RBSphere->setIcon(IS);
-      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);
+      pix = resMgr->loadPixmap( "HOMARD", "cylinderpointvector.png" );
+      IS=QIcon(pix);
+      RBCylindre->setIcon(IS);
+      pix = resMgr->loadPixmap( "HOMARD", "cone.png" );
+      IS=QIcon(pix);
+      RBCone->setIcon(IS);
+      pix = resMgr->loadPixmap( "HOMARD", "conepointvector.png" );
+      IS=QIcon(pix);
+      RB_Def_angle->setIcon(IS);
+      pix = resMgr->loadPixmap( "HOMARD", "conedxyz.png" );
+      IS=QIcon(pix);
+      RB_Def_radius->setIcon(IS);
+      pix = resMgr->loadPixmap( "HOMARD", "toruspointvector.png" );
+      IS=QIcon(pix);
+      RBTore->setIcon(IS);
 
       InitConnect( );
 
@@ -149,6 +157,7 @@ void MonCreateBoundaryAn::InitConnect()
     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( RBTore,        SIGNAL(clicked()) , this, SLOT(SetTore()) ) ;
     connect( buttonOk,     SIGNAL( pressed() ), this, SLOT( PushOnOK() ) );
     connect( buttonApply,  SIGNAL( pressed() ), this, SLOT( PushOnApply() ) );
     connect( buttonCancel, SIGNAL( pressed() ), this, SLOT( close() ) );
@@ -213,7 +222,6 @@ void MonCreateBoundaryAn::InitMinMax()
   // . Rayon
   SpinBox_Radius->setValue(_Rayon);
   SpinBox_Radius->setSingleStep(_Rayon/10.);
-  SpinBox_Radius->setMinimum(0.);
 
   // Sphere
   // . X du centre
@@ -228,7 +236,6 @@ void MonCreateBoundaryAn::InitMinMax()
   // . Rayon
   SpinBox_Rayon->setValue(_Rayon);
   SpinBox_Rayon->setSingleStep(_Rayon/10.);
-  SpinBox_Rayon->setMinimum(0.);
 
   // Cone en rayons
   // . X des centres
@@ -248,10 +255,8 @@ void MonCreateBoundaryAn::InitMinMax()
   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) ;
@@ -262,6 +267,32 @@ void MonCreateBoundaryAn::InitMinMax()
   SpinBox_Cone_X2->setValue(_BoundaryAnXorigCone);
   SpinBox_Cone_Y2->setValue(_BoundaryAnYorigCone);
   SpinBox_Cone_Z2->setValue(_BoundaryAnZorigCone);
+
+  // Tore
+  // . X du centre
+  SpinBoxToreXcent->setValue(_Xcentre);
+  SpinBoxToreXcent->setSingleStep(_Xincr);
+  // . Y du centre
+  SpinBoxToreYcent->setValue(_Ycentre);
+  SpinBoxToreYcent->setSingleStep(_Yincr);
+  // . Z du centre
+  SpinBoxToreZcent->setValue(_Zcentre);
+  SpinBoxToreZcent->setSingleStep(_Zincr);
+  // . X de l'axe
+  SpinBoxToreXaxe->setValue(0.);
+  SpinBoxToreXaxe->setSingleStep(0.1);
+  // . Y de l'axe
+  SpinBoxToreYaxe->setValue(0.);
+  SpinBoxToreYaxe->setSingleStep(0.1);
+  // . Z de l'axe
+  SpinBoxToreZaxe->setValue(1.);
+  SpinBoxToreZaxe->setSingleStep(0.1);
+  // . Rayon de revolution
+  SpinBoxToreRRev->setValue(_Rayon);
+  SpinBoxToreRRev->setSingleStep(_Rayon/10.);
+  // . Rayon primaire
+  SpinBoxToreRPri->setValue(_Rayon/3.);
+  SpinBoxToreRPri->setSingleStep(_Rayon/20.);
 }
 // ------------------------------------------------------------------------
 bool MonCreateBoundaryAn::PushOnApply()
@@ -361,6 +392,30 @@ bool MonCreateBoundaryAn::PushOnApply()
         }
         break;
       }
+      case 5 : // il s agit d un tore
+      {
+        if ((_BoundaryAnToreXcentre != SpinBoxToreXcent->value())  ||
+            (_BoundaryAnToreYcentre != SpinBoxToreYcent->value())  ||
+            (_BoundaryAnToreZcentre != SpinBoxToreZcent->value())  ||
+            (_BoundaryAnToreRRev   != SpinBoxToreRRev->value()) ||
+            (_BoundaryAnToreRPri   != SpinBoxToreRPri->value()) ||
+            (_BoundaryAnToreXaxe   != SpinBoxToreXaxe->value()) ||
+            (_BoundaryAnToreYaxe   != SpinBoxToreYaxe->value()) ||
+            (_BoundaryAnToreZaxe   != SpinBoxToreZaxe->value()) )
+        {
+          Chgt = true;
+          _BoundaryAnToreXcentre= SpinBoxToreXcent->value();
+          _BoundaryAnToreYcentre= SpinBoxToreYcent->value();
+          _BoundaryAnToreZcentre= SpinBoxToreZcent->value();
+          _BoundaryAnToreRRev=SpinBoxToreRRev->value();
+          _BoundaryAnToreRPri=SpinBoxToreRPri->value();
+          _BoundaryAnToreXaxe=SpinBoxToreXaxe->value();
+          _BoundaryAnToreYaxe=SpinBoxToreYaxe->value();
+          _BoundaryAnToreZaxe=SpinBoxToreZaxe->value();
+        }
+        break;
+      }
+
  }
 
   bool bOK = CreateOrUpdateBoundaryAn();
@@ -440,6 +495,21 @@ bool MonCreateBoundaryAn:: CreateOrUpdateBoundaryAn()
       }
       break;
     }
+   case 5 : // il s agit d un tore
+    {
+      try
+      {
+        aBoundaryAn = myHomardGen->CreateBoundaryTorus(CORBA::string_dup(_aName.toStdString().c_str()), \
+        _BoundaryAnToreXcentre, _BoundaryAnToreYcentre, _BoundaryAnToreZcentre, _BoundaryAnToreXaxe, _BoundaryAnToreYaxe, _BoundaryAnToreZaxe, _BoundaryAnToreRRev, _BoundaryAnToreRPri );
+      }
+      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);
 
@@ -491,6 +561,7 @@ void MonCreateBoundaryAn::SetCylinder()
   gBCylindre->setVisible(1);
   gBSphere->setVisible(0);
   gBCone->setVisible(0);
+  gBTore->setVisible(0);
 //
   _Type=1;
 //
@@ -505,6 +576,7 @@ void MonCreateBoundaryAn::SetSphere()
   gBCylindre->setVisible(0);
   gBSphere->setVisible(1);
   gBCone->setVisible(0);
+  gBTore->setVisible(0);
 //
   _Type=2;
 //
@@ -627,6 +699,7 @@ void MonCreateBoundaryAn::SetCone()
   gBCylindre->setVisible(0);
   gBSphere->setVisible(0);
   gBCone->setVisible(1);
+  gBTore->setVisible(0);
 //
   if ( RB_Def_radius->isChecked() )
   {
@@ -641,6 +714,21 @@ void MonCreateBoundaryAn::SetCone()
 //   MESSAGE("Fin de SetCone")
 }
 // ------------------------------------------------------------------------
+void MonCreateBoundaryAn::SetTore()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de SetTore")
+  gBCylindre->setVisible(0);
+  gBSphere->setVisible(0);
+  gBCone->setVisible(0);
+  gBTore->setVisible(1);
+//
+  _Type=5;
+//
+  adjustSize();
+//   MESSAGE("Fin de SetTore")
+}
+// ------------------------------------------------------------------------
 void MonCreateBoundaryAn::convertRayonAngle(int option)
 // ------------------------------------------------------------------------
 // Conversion entre les deux formulations du cone :
index e7476f28e037d2798aa6237f81eb338f5ed901d4..fc8dab45786dbf4fce5fe1a22f7bb8393e0dd4bc 100644 (file)
@@ -63,6 +63,9 @@ protected :
     double _BoundaryAnXaxisCone, _BoundaryAnYaxisCone, _BoundaryAnZaxisCone;
     double _BoundaryAnXorigCone, _BoundaryAnYorigCone, _BoundaryAnZorigCone;
     double _BoundaryAngle;
+    double _BoundaryAnToreXcentre, _BoundaryAnToreYcentre, _BoundaryAnToreZcentre;
+    double _BoundaryAnToreXaxe, _BoundaryAnToreYaxe, _BoundaryAnToreZaxe;
+    double _BoundaryAnToreRRev, _BoundaryAnToreRPri;
 
 
     bool Chgt;
@@ -83,6 +86,7 @@ public slots:
     virtual void SetCone();
     virtual void SetConeR();
     virtual void SetConeA();
+    virtual void SetTore();
     virtual void PushOnOK();
     virtual bool PushOnApply();
     virtual void PushOnHelp();
index 33aac925d04d08a466b167a818a67e92c37450e8..372459ae41d4a713c4e7f8674ab0f2594c26f453 100644 (file)
@@ -287,13 +287,9 @@ void MonCreateZone::InitMinMax()
     }
 // Rayons
     SpinBox_Rayon->setSingleStep(_Rayon/10.) ;
-    SpinBox_Rayon->setMinimum(0.) ;
     SpinBox_Radius->setSingleStep(_Rayon/10.) ;
-    SpinBox_Radius->setMinimum(0.) ;
     SpinBox_Radius_int->setSingleStep(_Rayon/20.) ;
-    SpinBox_Radius_int->setMinimum(0.) ;
     SpinBox_Radius_ext->setSingleStep(_Rayon/10.) ;
-    SpinBox_Radius_ext->setMinimum(0.) ;
 // Axe et hauteur
 // Si une coordonnee est constante, inutile de demander l'axe et la hauteur
     if ( _Orient > 0) {
@@ -315,9 +311,7 @@ void MonCreateZone::InitMinMax()
       TLHaut_p->setVisible(0) ;
     }
     else {
-      SpinBox_Haut->setMinimum(0.) ;
       SpinBox_Haut->setSingleStep(_Rayon/10.) ;
-      SpinBox_Haut_p->setMinimum(0.) ;
       SpinBox_Haut_p->setSingleStep(_Rayon/10.) ;
     }
 }
index 58e154d2d8d17e2a706aa5ab9d103612a26d2d66..d17d128b4c851091d9b258b4b1747820ca00f280 100644 (file)
@@ -83,6 +83,12 @@ void MonEditBoundaryAn::InitValEdit()
       SetConeR();
       break;
     }
+    case 5: // il s agit d un tore
+    {
+      InitValBoundaryAnTore();
+      SetTore();
+      break;
+    }
   };
 }
 // ------------------------------------------------------------------------
@@ -152,16 +158,33 @@ void MonEditBoundaryAn::InitValBoundaryAnConeR()
   convertRayonAngle(1) ;
 }
 // ------------------------------------------------------------------------
+void MonEditBoundaryAn::InitValBoundaryAnTore()
+// ------------------------------------------------------------------------
+{
+  HOMARD::double_array_var  mesCoordBoundary = aBoundaryAn->GetCoords();
+  ASSERT(mesCoordBoundary->length() == 8 );
+  _BoundaryAnXcentre=mesCoordBoundary[0];
+  _BoundaryAnYcentre=mesCoordBoundary[1];
+  _BoundaryAnZcentre=mesCoordBoundary[2];
+  _BoundaryAnXaxis=mesCoordBoundary[3];
+  _BoundaryAnYaxis=mesCoordBoundary[4];
+  _BoundaryAnZaxis=mesCoordBoundary[5];
+  _BoundaryAnRayon1=mesCoordBoundary[6];
+  _BoundaryAnRayon2=mesCoordBoundary[7];
+}
+// ------------------------------------------------------------------------
 void MonEditBoundaryAn::SetCylinder()
 // ------------------------------------------------------------------------
 {
   gBCylindre->setVisible(1);
   gBSphere->setVisible(0);
   gBCone->setVisible(0);
+  gBTore->setVisible(0);
   RBCylindre->setChecked(1);
   _Type=1;
   RBSphere->setDisabled(true);
   RBCone->setDisabled(true);
+  RBTore->setDisabled(true);
 
   SpinBox_Xcent->setValue(_BoundaryAnXcentre);
   SpinBox_Ycent->setValue(_BoundaryAnYcentre);
@@ -192,8 +215,10 @@ void MonEditBoundaryAn::SetSphere()
   gBSphere->setVisible(1);
   RBSphere->setChecked(1);
   gBCone->setVisible(0);
+  gBTore->setVisible(0);
   RBCylindre->setDisabled(true);
   RBCone->setDisabled(true);
+  RBTore->setDisabled(true);
   _Type=2 ;
 
   SpinBox_Xcentre->setValue(_BoundaryAnXcentre);
@@ -208,7 +233,6 @@ void MonEditBoundaryAn::SetSphere()
   if ( _Zincr > 0) { SpinBox_Zcentre->setSingleStep(_Zincr); }
   else             { SpinBox_Zcentre->setSingleStep(1);}
 
-  SpinBox_Rayon->setMinimum(0.);
   SpinBox_Rayon->setValue(_BoundaryAnRayon);
 //
   adjustSize();
@@ -221,9 +245,11 @@ void MonEditBoundaryAn::SetConeA()
   gBSphere->setVisible(0);
   gBCone->setVisible(1);
   RBCone->setChecked(1);
+  gBTore->setVisible(0);
   RB_Def_angle->setChecked(1);
   RBCylindre->setDisabled(true);
   RBSphere->setDisabled(true);
+  RBTore->setDisabled(true);
   _Type=3;
 //
   TLCone_X1->setText(QApplication::translate("CreateBoundaryAn", "X axis", 0, QApplication::UnicodeUTF8));
@@ -257,10 +283,12 @@ void MonEditBoundaryAn::SetConeR()
   gBCylindre->setVisible(0);
   gBSphere->setVisible(0);
   gBCone->setVisible(1);
+  gBTore->setVisible(0);
   RBCone->setChecked(1);
   RB_Def_radius->setChecked(1);
   RBCylindre->setDisabled(true);
   RBSphere->setDisabled(true);
+  RBTore->setDisabled(true);
   _Type=4;
 //
   TLCone_X1->setText(QApplication::translate("CreateBoundaryAn", "X centre 1", 0, QApplication::UnicodeUTF8));
@@ -289,6 +317,44 @@ void MonEditBoundaryAn::SetConeR()
 //
   adjustSize();
 }
+// ------------------------------------------------------------------------
+void MonEditBoundaryAn::SetTore()
+// ------------------------------------------------------------------------
+{
+  gBCylindre->setVisible(0);
+  gBSphere->setVisible(0);
+  gBCone->setVisible(0);
+  gBTore->setVisible(1);
+  RBTore->setChecked(1);
+  _Type=5;
+  RBCylindre->setDisabled(true);
+  RBSphere->setDisabled(true);
+  RBCone->setDisabled(true);
+
+  SpinBoxToreXcent->setValue(_BoundaryAnXcentre);
+  SpinBoxToreYcent->setValue(_BoundaryAnYcentre);
+  SpinBoxToreZcent->setValue(_BoundaryAnZcentre);
+
+  SpinBoxToreXaxe->setValue(_BoundaryAnXaxis);
+  SpinBoxToreYaxe->setValue(_BoundaryAnYaxis);
+  SpinBoxToreZaxe->setValue(_BoundaryAnZaxis);
+
+
+  SpinBoxToreXaxe->setSingleStep(0.1);
+  SpinBoxToreXcent->setSingleStep(_Xincr);
+  SpinBoxToreYaxe->setSingleStep(0.1);
+  SpinBoxToreYcent->setSingleStep(_Yincr);
+  SpinBoxToreZaxe->setSingleStep(0.1);
+  SpinBoxToreZcent->setSingleStep(_Zincr);
+// Rayon de revolution
+  SpinBoxToreRRev->setValue(_BoundaryAnRayon1);
+  SpinBoxToreRRev->setSingleStep(_BoundaryAnRayon1/10.);
+// Rayon primaire
+  SpinBoxToreRPri->setValue(_BoundaryAnRayon2);
+  SpinBoxToreRPri->setSingleStep(_BoundaryAnRayon2/10.);
+//
+  adjustSize();
+}
 // ---------------------------------------------------
 bool MonEditBoundaryAn::CreateOrUpdateBoundaryAn()
 //----------------------------------------------------
@@ -314,12 +380,17 @@ bool MonEditBoundaryAn::CreateOrUpdateBoundaryAn()
       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;
     }
+    case 5 : // il s agit d un tore
+    {
+      aBoundaryAn->SetTorus(_BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnXaxis, _BoundaryAnYaxis, _BoundaryAnZaxis, _BoundaryAnRayon1, _BoundaryAnRayon2 );
+      break;
+    }
   }
   if (Chgt) myHomardGen->InvalideBoundary(_aName.toStdString().c_str());
   HOMARD_UTILS::updateObjBrowser();
index 532c4940713c194724cb39b65800a5fe06c89381..ada2a06b5bc4809b9616b2543a935068918c9157 100644 (file)
@@ -47,10 +47,12 @@ protected :
     void SetSphere();
     void SetConeR();
     void SetConeA();
+    void SetTore();
     void InitValBoundaryAnCylindre();
     void InitValBoundaryAnSphere();
     void InitValBoundaryAnConeR();
     void InitValBoundaryAnConeA();
+    void InitValBoundaryAnTore();
 
 public slots:
 
index 50905a8915be1d28556724a82fe109b64a4e0c85..01de4ac2e86089f70a1eeb49c7e274d58dae35ba 100644 (file)
@@ -252,7 +252,6 @@ void MonEditZone::SetSphere()
   if ( _Zincr > 0) { SpinBox_Zcentre->setSingleStep(_Zincr); }
   else             { SpinBox_Zcentre->setSingleStep(1);}
 
-  SpinBox_Rayon->setMinimum(0.);
   SpinBox_Rayon->setValue(_ZoneRayon);
 }
 // ------------------------------------------------------------------------
@@ -292,7 +291,6 @@ void MonEditZone::SetCylinder()
   if ( _Zincr > 0) { SpinBox_Zbase->setSingleStep(_Zincr); }
   else             { SpinBox_Zbase->setSingleStep(1) ;}
 
-  SpinBox_Radius->setMinimum(0.);
   SpinBox_Radius->setValue(_ZoneRayon);
 
   if ( _Type == 5 )
@@ -352,9 +350,7 @@ void MonEditZone::SetPipe()
   if ( _Zincr > 0) { SpinBox_Zbase_p->setSingleStep(_Zincr); }
   else             { SpinBox_Zbase_p->setSingleStep(1) ;}
 
-  SpinBox_Radius_int->setMinimum(0.);
   SpinBox_Radius_int->setValue(_ZoneRayonInt);
-  SpinBox_Radius_ext->setMinimum(0.);
   SpinBox_Radius_ext->setValue(_ZoneRayon);
 
   if ( _Type == 7 )
index 45a73a8b06cb34d4df97b4a9b063eae435f9450d..a504b5a01691286728eb2a920d7120507db64094 100644 (file)
@@ -171,6 +171,12 @@ void HOMARD_Boundary_i::SetConeA( double Xaxe, double Yaxe, double Zaxe, double
   myHomardBoundary->SetConeA( Xaxe, Yaxe, Zaxe, Angle, Xcentre, Ycentre, Zcentre );
 }
 //=============================================================================
+void HOMARD_Boundary_i::SetTorus( double X0, double X1, double X2, double X3, double X4, double X5, double X6, double X7 )
+{
+  ASSERT( myHomardBoundary );
+  myHomardBoundary->SetTorus( X0, X1, X2, X3, X4, X5, X6, X7 );
+}
+//=============================================================================
 HOMARD::double_array* HOMARD_Boundary_i::GetCoords()
 {
   ASSERT( myHomardBoundary );
index 791e586eaab3ed4b6455c08db3fafe850884be02..00493359f41319ac9191408e897fd2a84fefb1bd 100644 (file)
@@ -83,6 +83,9 @@ public:
                                    double Xcentre2, double Ycentre2, double Zcentre2, double Rayon2);
   void                   SetConeA( double Xaxe, double Yaxe, double Zaxe, double Angle,
                                    double Xcentre, double Ycentre, double ZCentre);
+  void                   SetTorus( double Xcentre, double Ycentre, double ZCentre,
+                                      double Xaxe, double Yaxe, double Zaxe,
+                                      double rayonRev, double rayonPri );
 
   HOMARD::double_array*  GetCoords();
 
index 4169a8c405ca19f66244fd03d9d78b9e37425db0..53f174f17fd5e0c7bf6b8369be2bc106cd6e9bbb 100755 (executable)
@@ -2041,6 +2041,35 @@ HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundaryConeR(const char* Bounda
   return HOMARD::HOMARD_Boundary::_duplicate(myBoundary) ;
 }
 //=============================================================================
+HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundaryTorus(const char* BoundaryName,
+                                      CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
+                                      CORBA::Double Xaxe, CORBA::Double Yaxe, CORBA::Double Zaxe,
+                                      CORBA::Double RayonRev, CORBA::Double RayonPri)
+{
+  INFOS ("CreateBoundaryTorus : BoundaryName  = " << BoundaryName ) ;
+//
+  SALOME::ExceptionStruct es;
+  int error = 0 ;
+  if ( ( RayonRev <= 0.0 ) || ( RayonPri <= 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, 5) ;
+  myBoundary->SetTorus( Xcentre, Ycentre, Zcentre, Xaxe, Yaxe, Zaxe, RayonRev, RayonPri ) ;
+
+  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);
@@ -3147,6 +3176,11 @@ void HOMARD_Gen_i::DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriv
           myDriver->TexteBoundaryAn(BoundaryName, NumBoundaryAnalytical, BoundaryType, (*coor)[0], (*coor)[1], (*coor)[2], (*coor)[3], (*coor)[4], (*coor)[5], (*coor)[6], (*coor)[7]);
           if ( BoundaryOption % 3 != 0 ) { BoundaryOption = BoundaryOption*3 ; }
         }
+        else if (BoundaryType == 5) // Cas d un tore
+        {
+          myDriver->TexteBoundaryAn(BoundaryName, NumBoundaryAnalytical, BoundaryType, (*coor)[0], (*coor)[1], (*coor)[2], (*coor)[3], (*coor)[4], (*coor)[5], (*coor)[6], (*coor)[7]);
+          if ( BoundaryOption % 3 != 0 ) { BoundaryOption = BoundaryOption*3 ; }
+        }
       }
       // 2.2.3. Memorisation du traitement
       ListeBoundaryTraitees.push_back( BoundaryName );
@@ -3396,6 +3430,11 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishBoundaryInStudy(SALOMEDS::Study_ptr t
       icone = "conedxyz.png" ;
       break;
     }
+    case 5 :
+    { value = "BoundaryAnHomard" ;
+      icone = "toruspointvector.png" ;
+      break;
+    }
   }
   aResultSO = aStudyBuilder->NewObject(aSObject);
   PublishInStudyAttr(aStudyBuilder, aResultSO, theName, value.c_str(), icone.c_str(), _orb->object_to_string(theObject));
index 3ec90d9184f9d6ff0b3c07b2651528218f4a8289..13ac21f9a8fa7f35309776a9469efaac93a9bfef 100644 (file)
@@ -75,6 +75,10 @@ public:
   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_Boundary_ptr     CreateBoundaryTorus (const char* nomBoundary,
+                                      CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
+                                      CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis,
+                                      CORBA::Double RayonRev, CORBA::Double RayonPri);
 
   HOMARD::HOMARD_Cas_ptr          CreateCase (const char* nomCas, const char* MeshName, const char* FileName);
   HOMARD::HOMARD_Cas_ptr          CreateCaseFromIteration (const char* nomCas, const char* DirNameStart);