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);
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 )
table_view.png
texte.png
texte_2.png
+ toruspointvector.png
triangle.png
whatis.png
write.png
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();
_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;
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;
}
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;
{ saux += "# Sphere\n" ; }
if ( BoundaryType == 3 || BoundaryType == 4 )
{ saux += "# Cone\n" ; }
+ if ( BoundaryType == 5 )
+ { saux += "# Tore\n" ; }
//
// Le nom de la frontiere
//
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" ;
//
/********************************************************************************
** 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!
class Ui_CreateBoundaryAn
{
public:
- QGridLayout *gridLayout_4;
+ QGridLayout *gridLayout_5;
QLabel *Name;
QLineEdit *LEName;
QGroupBox *TypeBoundary;
QRadioButton *RBCylindre;
QRadioButton *RBSphere;
QRadioButton *RBCone;
+ QRadioButton *RBTore;
QGroupBox *gBCylindre;
QGridLayout *gridLayout1;
QDoubleSpinBox *SpinBox_Xcent;
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;
{
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"));
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"));
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"));
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"));
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);
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);
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"));
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);
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));
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));
<rect>
<x>0</x>
<y>0</y>
- <width>527</width>
- <height>701</height>
+ <width>522</width>
+ <height>835</height>
</rect>
</property>
<property name="windowTitle">
<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">
/********************************************************************************
** 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!
{
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);
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);
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);
<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>
<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>
_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") ;
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( );
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() ) );
// . Rayon
SpinBox_Radius->setValue(_Rayon);
SpinBox_Radius->setSingleStep(_Rayon/10.);
- SpinBox_Radius->setMinimum(0.);
// Sphere
// . X du centre
// . Rayon
SpinBox_Rayon->setValue(_Rayon);
SpinBox_Rayon->setSingleStep(_Rayon/10.);
- SpinBox_Rayon->setMinimum(0.);
// Cone en rayons
// . X des centres
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_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()
}
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();
}
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);
gBCylindre->setVisible(1);
gBSphere->setVisible(0);
gBCone->setVisible(0);
+ gBTore->setVisible(0);
//
_Type=1;
//
gBCylindre->setVisible(0);
gBSphere->setVisible(1);
gBCone->setVisible(0);
+ gBTore->setVisible(0);
//
_Type=2;
//
gBCylindre->setVisible(0);
gBSphere->setVisible(0);
gBCone->setVisible(1);
+ gBTore->setVisible(0);
//
if ( RB_Def_radius->isChecked() )
{
// 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 :
double _BoundaryAnXaxisCone, _BoundaryAnYaxisCone, _BoundaryAnZaxisCone;
double _BoundaryAnXorigCone, _BoundaryAnYorigCone, _BoundaryAnZorigCone;
double _BoundaryAngle;
+ double _BoundaryAnToreXcentre, _BoundaryAnToreYcentre, _BoundaryAnToreZcentre;
+ double _BoundaryAnToreXaxe, _BoundaryAnToreYaxe, _BoundaryAnToreZaxe;
+ double _BoundaryAnToreRRev, _BoundaryAnToreRPri;
bool Chgt;
virtual void SetCone();
virtual void SetConeR();
virtual void SetConeA();
+ virtual void SetTore();
virtual void PushOnOK();
virtual bool PushOnApply();
virtual void PushOnHelp();
}
// 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) {
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.) ;
}
}
SetConeR();
break;
}
+ case 5: // il s agit d un tore
+ {
+ InitValBoundaryAnTore();
+ SetTore();
+ break;
+ }
};
}
// ------------------------------------------------------------------------
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);
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);
if ( _Zincr > 0) { SpinBox_Zcentre->setSingleStep(_Zincr); }
else { SpinBox_Zcentre->setSingleStep(1);}
- SpinBox_Rayon->setMinimum(0.);
SpinBox_Rayon->setValue(_BoundaryAnRayon);
//
adjustSize();
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));
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));
//
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()
//----------------------------------------------------
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();
void SetSphere();
void SetConeR();
void SetConeA();
+ void SetTore();
void InitValBoundaryAnCylindre();
void InitValBoundaryAnSphere();
void InitValBoundaryAnConeR();
void InitValBoundaryAnConeA();
+ void InitValBoundaryAnTore();
public slots:
if ( _Zincr > 0) { SpinBox_Zcentre->setSingleStep(_Zincr); }
else { SpinBox_Zcentre->setSingleStep(1);}
- SpinBox_Rayon->setMinimum(0.);
SpinBox_Rayon->setValue(_ZoneRayon);
}
// ------------------------------------------------------------------------
if ( _Zincr > 0) { SpinBox_Zbase->setSingleStep(_Zincr); }
else { SpinBox_Zbase->setSingleStep(1) ;}
- SpinBox_Radius->setMinimum(0.);
SpinBox_Radius->setValue(_ZoneRayon);
if ( _Type == 5 )
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 )
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 );
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();
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);
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 );
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));
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);