From: pnoyret Date: Fri, 16 Sep 2011 11:40:36 +0000 (+0000) Subject: Modif Gerald 09/11 X-Git-Tag: V6_4_0a1~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=634b7718bcfdb14d61ba3fc09cf976a61e134e27;p=modules%2Fhomard.git Modif Gerald 09/11 --- diff --git a/doc/files/tutorial_5.00.med.gz b/doc/files/tutorial_5.00.med.gz new file mode 100644 index 00000000..e0170440 Binary files /dev/null and b/doc/files/tutorial_5.00.med.gz differ diff --git a/doc/files/tutorial_5.fr.med.gz b/doc/files/tutorial_5.fr.med.gz new file mode 100644 index 00000000..4c9ccbdd Binary files /dev/null and b/doc/files/tutorial_5.fr.med.gz differ diff --git a/doc/files/tutorial_5.py b/doc/files/tutorial_5.py new file mode 100644 index 00000000..6f2a6d10 --- /dev/null +++ b/doc/files/tutorial_5.py @@ -0,0 +1,92 @@ +#!/usr/bin/env python +# -*- coding: iso-8859-1 -*- + +# Copyright (C) 2011 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +""" +Exemple de couplage HOMARD-Salome +Copyright EDF-R&D 1996, 2010 +""" +__revision__ = "V1.1" +# +# ================================== +# Repertoire a personnaliser +# Ce repertoire contient les fichiers de donnees : tutorial_5.00.med, tutorial_5.fr.med +# Ce repertoire contiendra les fichiers de resultats : maill.01.med, maill.02.med +dircase = "/tmp" +# ================================== +# +import salome +salome.salome_init() +import HOMARD +# +homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD") +study_main = salome.myStudyManager.NewStudy("HOMARD") +homard.SetCurrentStudy(salome.myStudy) +# +# Creation of the boundaries +# ========================== +# Creation of the discrete boundary Boun_1 +Boun_1 = homard.CreateBoundaryDi('Boun_1', 'MAIL_EXT', dircase+'/tutorial_5.fr.med') +# +# Creation of the zones +# ===================== +# Creation of the disk with hole enveloppe +enveloppe = homard.CreateZoneDiskWithHole( 'enveloppe', 0., 0., 250., 193., 1 ) +# Creation of the rectangle quart_sup +quart_sup = homard.CreateZoneBox2D( 'quart_sup', 0., 250., 0., 250., 1 ) +# +# Hypothesis +# ========== +# Creation of the hypothesis Hypo_1 +Hypo_1 = homard.CreateHypothesis('Hypo_1') +Hypo_1.SetAdapRefinUnRef(0, 1, 0) +homard.AssociateHypoZone('enveloppe', 'Hypo_1') +# Creation of the hypothesis Hypo_2 +Hypo_2 = homard.CreateHypothesis('Hypo_2') +Hypo_2.SetAdapRefinUnRef(0, 1, 0) +homard.AssociateHypoZone('quart_sup', 'Hypo_2') +# +# Case "Case_1" +# ============= +Case_1 = homard.CreateCase('Case_1', 'COEUR_2D', dircase+'/tutorial_5.00.med') +Case_1.SetDirName(dircase) +Case_1.SetConfType(3) +Case_1.AddBoundaryGroup('Boun_1', '') +# +# Iteration "Iter_1" +# ================== +Iter_1 = homard.CreateIteration('Iter_1', Case_1.GetIter0Name()) +Iter_1.SetMeshName('COEUR_2D_01') +Iter_1.SetMeshFile(dircase+'/maill.01.med') +homard.AssociateIterHypo('Iter_1', 'Hypo_1') +codret = homard.Compute('Iter_1', 1) +# +# Iteration "Iter_2" +# ================== +Iter_2 = homard.CreateIteration('Iter_2', 'Iter_1') +Iter_2.SetMeshName('COEUR_2D_02') +Iter_2.SetMeshFile(dircase+'/maill.02.med') +homard.AssociateIterHypo('Iter_2', 'Hypo_2') +result = homard.Compute('Iter_2', 1) + + +if salome.sg.hasDesktop(): + salome.sg.updateObjBrowser(1) diff --git a/doc/images/create_zone_21.png b/doc/images/create_zone_21.png new file mode 100644 index 00000000..8d156f16 Binary files /dev/null and b/doc/images/create_zone_21.png differ diff --git a/doc/images/create_zone_22.png b/doc/images/create_zone_22.png new file mode 100644 index 00000000..f27faaa0 Binary files /dev/null and b/doc/images/create_zone_22.png differ diff --git a/doc/images/create_zone_23.png b/doc/images/create_zone_23.png new file mode 100644 index 00000000..8bce36d5 Binary files /dev/null and b/doc/images/create_zone_23.png differ diff --git a/doc/images/create_zone_3.png b/doc/images/create_zone_3.png new file mode 100644 index 00000000..abaf4068 Binary files /dev/null and b/doc/images/create_zone_3.png differ diff --git a/doc/images/create_zone_4.png b/doc/images/create_zone_4.png new file mode 100644 index 00000000..26955a82 Binary files /dev/null and b/doc/images/create_zone_4.png differ diff --git a/doc/images/homard_1.png b/doc/images/homard_1.png new file mode 100644 index 00000000..80006888 Binary files /dev/null and b/doc/images/homard_1.png differ diff --git a/doc/images/lancement_2.png b/doc/images/lancement_2.png new file mode 100644 index 00000000..d5713d51 Binary files /dev/null and b/doc/images/lancement_2.png differ diff --git a/doc/images/lancement_3.png b/doc/images/lancement_3.png new file mode 100644 index 00000000..bd1eb644 Binary files /dev/null and b/doc/images/lancement_3.png differ diff --git a/src/HOMARD/HOMARD_Boundary.cxx b/src/HOMARD/HOMARD_Boundary.cxx index b20cb409..185be49f 100644 --- a/src/HOMARD/HOMARD_Boundary.cxx +++ b/src/HOMARD/HOMARD_Boundary.cxx @@ -64,36 +64,30 @@ std::string HOMARD_Boundary::GetDumpPython() const { std::ostringstream aScript; aScript << "\n# Creation of the "; - if ( _BoundaryType == 0 ) { aScript << "discrete boundary " << _NomBoundary << "\n";} - if ( _BoundaryType == 1 ) { aScript << "cylinder " << _NomBoundary << "\n";} - if ( _BoundaryType == 2 ) { aScript << "sphere " << _NomBoundary << "\n"; } - - aScript << "\t" << _NomBoundary << " = homard.CreateBoundary('" << _NomBoundary ; - aScript << "', " << _BoundaryType << ")\n"; // switch (_BoundaryType) { case 0: { - aScript << "\t" <<_NomBoundary << ".SetMeshFile('"; - aScript << _MeshFile << "')\n"; - aScript << "\t" <<_NomBoundary << ".SetMeshName('"; - aScript << _MeshName << "')\n"; - break; + aScript << "discrete boundary " << _NomBoundary << "\n"; + aScript << "\t" << _NomBoundary << " = homard.CreateBoundaryDi('" << _NomBoundary << "', "; + aScript << "'" << _MeshName << "', "; + aScript << "'" << _MeshFile << "')\n"; + break ; } - case 1: { - aScript << "\t" << _NomBoundary << ".SetCylinder(" ; + aScript << "cylinder " << _NomBoundary << "\n"; + aScript << "\t" << _NomBoundary << " = homard.CreateBoundaryCylinder('" << _NomBoundary << "', "; aScript << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _Xaxe << ", " << _Yaxe << ", " << _Zaxe << ", " << _rayon << ")\n"; - break; + break ; } - case 2: { - aScript << "\t" << _NomBoundary << ".SetSphere(" ; + aScript << "sphere" << _NomBoundary << "\n"; + aScript << "\t" << _NomBoundary << " = homard.CreateBoundarySphere('" << _NomBoundary << "', "; aScript << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _rayon << ")\n"; - break; + break ; } } @@ -167,27 +161,35 @@ std::vector HOMARD_Boundary::GetLimit() const } //======================================================================================= -std::vector HOMARD_Boundary::GetCylinder() const -{ - std::vector mesCoor; - 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( _rayon ); - return mesCoor; -} - -//======================================================================================= -std::vector HOMARD_Boundary::GetSphere() const +std::vector HOMARD_Boundary::GetCoords() const { std::vector mesCoor; - mesCoor.push_back( _Xcentre ); - mesCoor.push_back( _Ycentre ); - mesCoor.push_back( _Zcentre ); - mesCoor.push_back( _rayon ); +// + switch (_BoundaryType) + { +// Cylindre + case 1: + { + 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( _rayon ); + break ; + } +// Sphere + case 2: + { + mesCoor.push_back( _Xcentre ); + mesCoor.push_back( _Ycentre ); + mesCoor.push_back( _Zcentre ); + mesCoor.push_back( _rayon ); + break ; + } + ASSERT ( _BoundaryType == -1 ) ; + } return mesCoor; } //============================================================================= diff --git a/src/HOMARD/HOMARD_Boundary.hxx b/src/HOMARD/HOMARD_Boundary.hxx index bc5631c0..0d69a704 100644 --- a/src/HOMARD/HOMARD_Boundary.hxx +++ b/src/HOMARD/HOMARD_Boundary.hxx @@ -50,10 +50,8 @@ public: void SetCylinder( double X0, double X1, double X2, double X3, double X4, double X5, double X6 ); - std::vector GetCylinder() const; - void SetSphere( double X0, double X1, double X2, double X3 ); - std::vector GetSphere() const; + std::vector GetCoords() const; void SetBoundaryType( int BoundaryType ); int GetBoundaryType() const; diff --git a/src/HOMARD/HOMARD_Cas.cxx b/src/HOMARD/HOMARD_Cas.cxx index eef11842..83403f6f 100644 --- a/src/HOMARD/HOMARD_Cas.cxx +++ b/src/HOMARD/HOMARD_Cas.cxx @@ -102,9 +102,15 @@ std::string HOMARD_Cas::GetDumpPython() const aScript << *it << "')\n"; it++; } + if ( _NivMax > 0 ) + { + aScript << "\t" <<_NomCas << ".SetNivMax("; + aScript << _NivMax << ")\n"; + aScript << "\t" <<_NomCas << ".SetDiamMin("; + aScript << _DiamMin << ")\n"; + } return aScript.str(); } -//AddBoundaryGroup( 'cyl_4', 'T2_INT' ) //============================================================================= void HOMARD_Cas::AddIteration( const char* NomIteration ) //============================================================================= @@ -224,4 +230,28 @@ void HOMARD_Cas::SupprBoundaryGroup() { _ListBoundaryGroup.clear(); } +//============================================================================= +void HOMARD_Cas::SetNivMax( int NivMax ) +//============================================================================= +{ + _NivMax = NivMax; +} +//============================================================================= +const int HOMARD_Cas::GetNivMax() const +//============================================================================= +{ + return _NivMax; +} +//============================================================================= +void HOMARD_Cas::SetDiamMin( double DiamMin ) +//============================================================================= +{ + _DiamMin = DiamMin; +} +//============================================================================= +const double HOMARD_Cas::GetDiamMin() const +//============================================================================= +{ + return _DiamMin; +} diff --git a/src/HOMARD/HOMARD_Cas.hxx b/src/HOMARD/HOMARD_Cas.hxx index 0c393040..b9f580ea 100644 --- a/src/HOMARD/HOMARD_Cas.hxx +++ b/src/HOMARD/HOMARD_Cas.hxx @@ -45,6 +45,12 @@ public: const int GetConfType() const; int GetNumber(); + void SetNivMax( int NivMax ); + const int GetNivMax() const; + + void SetDiamMin( double DiamMin ); + const double GetDiamMin() const; + void AddIteration( const char* NomIteration ); const std::list& GetIterations() const; void SupprIterations(); @@ -71,6 +77,8 @@ private: std::string _NomCas; std::string _NomDir; int _ConfType; + int _NivMax; + double _DiamMin; std::vector _Boite; // cf HomardQTCommun pour structure du vecteur std::list _ListGroup; diff --git a/src/HOMARD/HOMARD_DriverTools.cxx b/src/HOMARD/HOMARD_DriverTools.cxx index d04d0067..897069ae 100644 --- a/src/HOMARD/HOMARD_DriverTools.cxx +++ b/src/HOMARD/HOMARD_DriverTools.cxx @@ -39,13 +39,13 @@ namespace HOMARD /*! \brief Read next chunk of data from the string \internal - + The function tries to read next chunk of the data from the input string \a str. The parameter \a start specifies the start position of next chunk. If the operation read the chunk successfully, after its completion this parameter will refer to the start position of the next chunk. The function returns resulting chunk as a string. The status of the operation is returned via \a ok parameter. - + \param str source data stream string \param start start position to get next chunk \param ok in this variable the status of the chunk reading operation is returned @@ -129,6 +129,11 @@ namespace HOMARD os << separator() << ListString.size(); for ( it = ListString.begin(); it != ListString.end(); ++it ) os << separator() << *it; + + os << separator() << cas.GetNivMax(); + os << separator() << cas.GetDiamMin(); + +// MESSAGE( ". Fin avec "< ListString = hypothesis.GetIterations(); std::list::const_iterator it; os << separator() << ListString.size(); @@ -219,6 +226,8 @@ namespace HOMARD os << separator() << ListString.size(); for ( it = ListString.begin(); it != ListString.end(); ++it ) os << separator() << *it; + +// MESSAGE( ". Fin avec "< box = zone.GetBox(); - for ( int i = 0; i < box.size(); i++ ) - os << separator() << ( i < box.size() ? box[i] : 0. ); - - std::vector sphere = zone.GetSphere(); - for ( int i = 0; i < 4; i++ ) - os << separator() << ( i < sphere.size() ? sphere[i] : 0. ); + std::vector coords = zone.GetCoords(); + for ( int i = 0; i < coords.size(); i++ ) + os << separator() << ( i < coords.size() ? coords[i] : 0. ); std::vector limit = zone.GetLimit(); for ( int i = 0; i < 3; i++ ) @@ -253,9 +259,9 @@ namespace HOMARD std::list::const_iterator it; for ( it = hypos.begin(); it != hypos.end(); ++it ) os << separator() << *it; - return os.str(); - +// MESSAGE( ". Fin avec "< coor = boundary.GetLimit(); - for ( int i = 0; i < coor.size(); i++ ) - os << separator() << coor[i]; - - coor = boundary.GetCylinder() ; - for ( int i = 0; i < coor.size(); i++ ) - os << separator() << coor[i]; - coor = boundary.GetSphere() ; - for ( int i = 0; i < coor.size(); i++ ) - os << separator() << coor[i]; - return os.str(); + if ( BoundaryType == 0 ) + { + os << separator() << boundary.GetMeshName(); + os << separator() << boundary.GetMeshFile(); + } + else { + std::vector coor = boundary.GetCoords() ; + for ( int i = 0; i < coor.size(); i++ ) + os << separator() << coor[i]; + std::vector limit = boundary.GetLimit(); + for ( int i = 0; i < limit.size(); i++ ) + os << separator() << limit[i]; + } std::list ListString = boundary.GetGroups(); std::list::const_iterator it; @@ -295,6 +303,8 @@ namespace HOMARD for ( it = ListString.begin(); it != ListString.end(); ++it ) os << separator() << *it; +// MESSAGE( ". Fin avec "< coords; - coords.resize( 6 ); - for ( int i = 0; i < 6; i++ ) { - chunk = getNextChunk( stream, start, ok ); - if ( !ok ) return false; - coords[i] = strtod( chunk.c_str(), 0 ); - } - zone.SetBox( coords[0], coords[1], coords[2], coords[3], coords[4], coords[5] ); - // - for ( int i = 0; i < 4; i++ ) { + int lgcoords ; + if ( ZoneType == 2 or ( ZoneType >= 11 and ZoneType <= 13 ) ) { lgcoords = 6 ; } + else if ( ZoneType == 4 ) { lgcoords = 4 ; } + else if ( ZoneType == 5 or ( ZoneType >= 31 and ZoneType <= 33 ) ) { lgcoords = 8 ; } + else if ( ZoneType == 7 or ( ZoneType >= 61 and ZoneType <= 63 ) ) { lgcoords = 9 ; } + else return false; + coords.resize( lgcoords ); + for ( int i = 0; i < lgcoords; i++ ) { chunk = getNextChunk( stream, start, ok ); if ( !ok ) return false; coords[i] = strtod( chunk.c_str(), 0 ); } - zone.SetSphere( coords[0], coords[1], coords[2], coords[3] ); - - // + if ( ZoneType == 2 or ( ZoneType >= 11 and ZoneType <= 13 ) ) + { zone.SetBox( coords[0], coords[1], coords[2], coords[3], coords[4], coords[5] ); } + else if ( ZoneType == 4 ) + { zone.SetSphere( coords[0], coords[1], coords[2], coords[3] ); } + else if ( ZoneType == 5 or ( ZoneType >= 31 and ZoneType <= 33 ) ) + { zone.SetCylinder( coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7] ); } + else if ( ZoneType == 7 or ( ZoneType >= 61 and ZoneType <= 63 ) ) + { zone.SetPipe( coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7], coords[8] ); } + // Remarque : la taille de coords est suffisante pour les limites for ( int i = 0; i < 3; i++ ) { chunk = getNextChunk( stream, start, ok ); if ( !ok ) return false; @@ -611,7 +641,6 @@ namespace HOMARD return true; } - // // 2.5. Restauration d'une frontiere // ================================= @@ -634,46 +663,51 @@ namespace HOMARD chunk = getNextChunk( stream, start, ok ); if ( !ok ) return false; - boundary.SetBoundaryType(atoi( chunk.c_str()) ); + int BoundaryType = atoi( chunk.c_str() ) ; + boundary.SetBoundaryType( BoundaryType ); chunk = getNextChunk( stream, start, ok ); if ( !ok ) return false; boundary.SetCaseCreation( chunk.c_str() ); - chunk = getNextChunk( stream, start, ok ); - if ( !ok ) return false; - boundary.SetMeshFile( chunk.c_str() ); - - chunk = getNextChunk( stream, start, ok ); - if ( !ok ) return false; - boundary.SetMeshName( chunk.c_str() ); - - - std::vector coords; - coords.resize( 3 ); - for ( int i = 0; i < 3; i++ ) { + // Si analytique, les coordonnees des frontieres : le nombre depend du type + // Si discret, le maillage + int lgcoords ; + if ( BoundaryType == 1 ) { lgcoords = 7 ; } + else if ( BoundaryType == 2 ) { lgcoords = 4 ; } + else { lgcoords = 0 ; } +// + if ( lgcoords == 0 ) + { chunk = getNextChunk( stream, start, ok ); if ( !ok ) return false; - coords[i] = strtod( chunk.c_str(), 0 ); - } - boundary.SetLimit( coords[0], coords[1], coords[2]); + boundary.SetMeshName( chunk.c_str() ); - coords.resize( 7 ); - for ( int i = 0; i < 7; i++ ) { chunk = getNextChunk( stream, start, ok ); if ( !ok ) return false; - coords[i] = strtod( chunk.c_str(), 0 ); + boundary.SetMeshFile( chunk.c_str() ); } - boundary.SetCylinder(coords[0],coords[1],coords[2],coords[3],coords[4],coords[5],coords[6]); - - coords.resize( 4 ); - for ( int i = 0; i < 4; i++ ) { - chunk = getNextChunk( stream, start, ok ); - if ( !ok ) return false; - coords[i] = strtod( chunk.c_str(), 0 ); + else + { std::vector coords; + coords.resize( lgcoords ); + for ( int i = 0; i < lgcoords; i++ ) { + chunk = getNextChunk( stream, start, ok ); + if ( !ok ) return false; + coords[i] = strtod( chunk.c_str(), 0 ); + } + if ( BoundaryType == 1 ) + { boundary.SetCylinder(coords[0],coords[1],coords[2],coords[3],coords[4],coords[5],coords[6]); } + else if ( BoundaryType == 2 ) + { boundary.SetSphere( coords[0], coords[1], coords[2], coords[3]); } + // Remarque : la taille de coords est suffisante pour les limites + for ( int i = 0; i < 3; i++ ) { + chunk = getNextChunk( stream, start, ok ); + if ( !ok ) return false; + coords[i] = strtod( chunk.c_str(), 0 ); + } + boundary.SetLimit( coords[0], coords[1], coords[2]); } - boundary.SetSphere( coords[0], coords[1], coords[2], coords[3]); - + // Les groupes chunk = getNextChunk( stream, start, ok ); if ( !ok ) return false; int size = atoi( chunk.c_str() ); diff --git a/src/HOMARD/HOMARD_Hypothesis.cxx b/src/HOMARD/HOMARD_Hypothesis.cxx index f43067f7..15b226ab 100644 --- a/src/HOMARD/HOMARD_Hypothesis.cxx +++ b/src/HOMARD/HOMARD_Hypothesis.cxx @@ -36,7 +36,7 @@ HOMARD_Hypothesis::HOMARD_Hypothesis(): _Field(""), _TypeThR(0), _ThreshR(0), _TypeThC(0), _ThreshC(0), - _UsCmpI(0), _TypeFieldInterp(0) + _UsField(0), _UsCmpI(0), _TypeFieldInterp(0) { MESSAGE("HOMARD_Hypothesis"); } @@ -88,7 +88,7 @@ std::string HOMARD_Hypothesis::GetName() const std::string HOMARD_Hypothesis::GetDumpPython() const { std::ostringstream aScript; - aScript << "\n# Creation of the hypothesis " << _NomHypo << "\n" ; + aScript << "\n# Creation of the hypothesis " << _NomHypo << "\n" ; aScript << "\t" << _NomHypo << " = homard.CreateHypothesis('" << _NomHypo << "')\n"; aScript << "\t" << _NomHypo << ".SetAdapRefinUnRef(" << _TypeAdap << ", " << _TypeRaff << ", " << _TypeDera << ")\n"; @@ -104,9 +104,10 @@ std::string HOMARD_Hypothesis::GetDumpPython() const if ( _TypeAdap == 1 ) { aScript << "\t" << _NomHypo << ".SetField('" << _Field << "')\n"; + aScript << "\t" << _NomHypo << ".SetUseField(" << _UsField << ")\n"; aScript << "\t" << _NomHypo << ".SetUseComp(" << _UsCmpI << ")\n"; std::list::const_iterator it_comp = _ListComposant.begin(); - while(it_comp != _ListComposant.end()) + while(it_comp != _ListComposant.end()) { aScript << "\t" << _NomHypo << ".AddComp('" << *it_comp << "')\n"; it_comp++; @@ -225,7 +226,7 @@ void HOMARD_Hypothesis::SetUseComp( int UsCmpI ) void HOMARD_Hypothesis::SetUseField( int UsField ) { ASSERT(!((UsField < 0) or (UsField > 1 ))); - MESSAGE( "SetUseField a programmer "); + _UsField = UsField; } //============================================================================= @@ -236,45 +237,32 @@ std::string HOMARD_Hypothesis::GetFieldName() const { return _Field; } - -//============================================================================= -/*! -*/ //============================================================================= int HOMARD_Hypothesis::GetRefinThrType() const { return _TypeThR; } - -//============================================================================= -/*! -*/ //============================================================================= double HOMARD_Hypothesis::GetThreshR() const { return _ThreshR; } - -//============================================================================= -/*! -*/ //============================================================================= int HOMARD_Hypothesis::GetUnRefThrType() const { return _TypeThC; } -//============================================================================= -/*! -*/ //============================================================================= double HOMARD_Hypothesis::GetThreshC() const { return _ThreshC; } //============================================================================= -/*! -*/ +int HOMARD_Hypothesis::GetUseField() const +{ + return _UsField; +} //============================================================================= int HOMARD_Hypothesis::GetUseCompI() const { @@ -357,7 +345,7 @@ void HOMARD_Hypothesis::SetGroups( const std::list& ListGroup ) { _ListGroupSelected.clear(); std::list::const_iterator it = ListGroup.begin(); - while(it != ListGroup.end()) + while(it != ListGroup.end()) _ListGroupSelected.push_back((*it++)); } //============================================================================= diff --git a/src/HOMARD/HOMARD_Hypothesis.hxx b/src/HOMARD/HOMARD_Hypothesis.hxx index d380aca4..6b6faebb 100644 --- a/src/HOMARD/HOMARD_Hypothesis.hxx +++ b/src/HOMARD/HOMARD_Hypothesis.hxx @@ -57,6 +57,7 @@ public: double GetThreshR() const; int GetUnRefThrType() const; double GetThreshC() const; + int GetUseField() const; int GetUseCompI() const; void AddComp( const char* NomComposant ); @@ -89,8 +90,8 @@ private: std::string _NomHypo; std::string _NomCasCreation; - int _TypeAdap; // -1 pour une adapation Uniforme, - // 0 si l adaptation depend des zones, + int _TypeAdap; // -1 pour une adapation Uniforme, + // 0 si l adaptation depend des zones, // 1 pour des champs int _TypeRaff; @@ -101,9 +102,10 @@ private: int _TypeThC; double _ThreshR; double _ThreshC; + int _UsField; int _UsCmpI; - int _TypeFieldInterp; // 0 pour aucune interpolation, - // 1 pour interpolation de tous les champs, + int _TypeFieldInterp; // 0 pour aucune interpolation, + // 1 pour interpolation de tous les champs, // 2 pour une liste std::list _ListIter; diff --git a/src/HOMARD/HOMARD_Zone.cxx b/src/HOMARD/HOMARD_Zone.cxx index 924d0e3f..9adfdeb8 100644 --- a/src/HOMARD/HOMARD_Zone.cxx +++ b/src/HOMARD/HOMARD_Zone.cxx @@ -33,22 +33,23 @@ HOMARD_Zone::HOMARD_Zone(): _NomZone( "" ),_ZoneType( 2 ), _Xmin( 0 ), _Xmax( 0 ), _Ymin( 0 ), _Ymax( 0 ), _Zmin( 0 ), _Zmax( 0 ), - _Xcentre( 0 ), _Ycentre( 0 ), _Zcentre( 0 ), _rayon( 0 ), + _Xcentre( 0 ), _Ycentre( 0 ), _Zcentre( 0 ), _Rayon( 0 ), + _Xaxe( 0 ), _Yaxe( 0 ), _Zaxe( 0 ), _Haut( 0 ), _Xincr( 0 ), _Yincr( 0 ), _Zincr( 0 ) { - MESSAGE("HOMARD_Zone"); + MESSAGE("HOMARD_Zone") ; } //============================================================================= HOMARD_Zone::~HOMARD_Zone() { - MESSAGE("~HOMARD_Zone"); + MESSAGE("~HOMARD_Zone") ; } //============================================================================= void HOMARD_Zone::SetName( const char* NomZone ) { - _NomZone = std::string( NomZone ); + _NomZone = std::string( NomZone ) ; } //============================================================================= @@ -60,32 +61,81 @@ std::string HOMARD_Zone::GetName() const //============================================================================= std::string HOMARD_Zone::GetDumpPython() const { +// MESSAGE("GetDumpPython avec _ZoneType " << _ZoneType) ; +// MESSAGE("GetDumpPython avec _NomZone " << _NomZone) ; std::ostringstream aScript; aScript << "\n# Creation of the "; - if ( _ZoneType == 2 ) { aScript << "box " << _NomZone << "\n";} - if ( _ZoneType == 4 ) { aScript << "sphere " << _NomZone << "\n"; } - - aScript << "\t" << _NomZone << " = homard.CreateZone('" << _NomZone ; - aScript << "', " << _ZoneType << ")\n"; + if ( _ZoneType >= 11 and _ZoneType <= 13 ) { aScript << "rectangle " ; } + else if ( _ZoneType == 2 ) { aScript << "box " ;} + else if ( _ZoneType >= 31 and _ZoneType <= 33 ) { aScript << "disk " ;} + else if ( _ZoneType == 4 ) { aScript << "sphere " ; } + else if ( _ZoneType == 5 ) { aScript << "cylinder " ; } + else if ( _ZoneType >= 61 and _ZoneType <= 63 ) { aScript << "disk with hole " ;} + else if ( _ZoneType == 7 ) { aScript << "pipe " ; } + aScript << _NomZone << "\n" ; +// + aScript << "\t" << _NomZone << " = homard.CreateZone" ; // switch (_ZoneType) { + case 11: + { aScript << "Box2D( '" << _NomZone << "', " << _Xmin << ", " << _Xmax << ", " << _Ymin << ", " << _Ymax << ", 1 )\n"; + break ; + } + case 12: + { aScript << "Box2D( '" << _NomZone << "', " << _Ymin << ", " << _Ymax << ", " << _Zmin << ", " << _Zmax << ", 2 )\n"; + break ; + } + case 13: + { aScript << "Box2D( '" << _NomZone << "', " << _Zmin << ", " << _Zmax << ", " << _Xmin << ", " << _Xmax << ", 3 )\n"; + break ; + } case 2: - { - aScript << "\t" << _NomZone << ".SetBox(" ; - aScript << _Xmin << ", " << _Xmax << ", " << _Ymin << ", " << _Ymax << ", " << _Zmin << ", " << _Zmax << ")\n"; - break; + { aScript << "Box( '" << _NomZone << "', " << _Xmin << ", " << _Xmax << ", " << _Ymin << ", " << _Ymax << ", " << _Zmin << ", " << _Zmax << ")\n"; + break ; } case 4: - { - aScript << "\t" << _NomZone << ".SetSphere(" ; - aScript << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _rayon << ")\n"; - break; + { aScript << "Sphere( '" << _NomZone << "', " << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _Rayon << ")\n"; + break ; + } + + case 31: + { aScript << "Disk( '" << _NomZone << "', " << _Xcentre << ", " << _Ycentre << ", " << _Rayon << ", 1 )\n"; + break ; + } + case 32: + { aScript << "Disk( '" << _NomZone << "', " << _Ycentre << ", " << _Zcentre << ", " << _Rayon << ", 2 )\n"; + break ; + } + case 33: + { aScript << "Disk( '" << _NomZone << "', " << _Zcentre << ", " << _Xcentre << ", " << _Rayon << ", 3 )\n"; + break ; + } + case 5: + { aScript << "Cylinder( '" << _NomZone << "', " << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _Xaxe << ", " << _Yaxe << ", " << _Zaxe << ", " << _Rayon << ", " << _Haut << ")\n"; + break ; + } + + case 61: + { aScript << "DiskWithHole( '" << _NomZone << "', " << _Xcentre << ", " << _Ycentre << ", " << _Rayon << ", " << _Rayonint << ", 1 )\n"; + break ; + } + case 62: + { aScript << "DiskWithHole( '" << _NomZone << "', " << _Ycentre << ", " << _Zcentre << ", " << _Rayon << ", " << _Rayonint << ", 2 )\n"; + break ; + } + case 63: + { aScript << "DiskWithHole( '" << _NomZone << "', " << _Zcentre << ", " << _Xcentre << ", " << _Rayon << ", " << _Rayonint << ", 3 )\n"; + break ; + } + case 7: + { aScript << "Pipe( '" << _NomZone << "', " << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _Xaxe << ", " << _Yaxe << ", " << _Zaxe << ", " << _Rayon << ", " << _Haut << ", " << _Rayonint << ")\n"; + break ; } } - return aScript.str(); + return aScript.str() ; } @@ -117,55 +167,141 @@ void HOMARD_Zone::SetBox( double X0, double X1, double X2, double X3, double X4, //====================================================================== void HOMARD_Zone::SetSphere( double X0, double X1, double X2, double X3 ) { - _Xcentre = X0; _Ycentre = X1; _Zcentre = X2; - _rayon = X3; + _Xcentre = X0; + _Ycentre = X1; + _Zcentre = X2; + _Rayon = X3; } //======================================================================================= -std::vector HOMARD_Zone::GetLimit() const +void HOMARD_Zone::SetCylinder( double X0, double X1, double X2, + double X3, double X4, double X5, double X6, double X7 ) { - std::vector mesLimit; - mesLimit.push_back( _Xincr ); - mesLimit.push_back( _Yincr ); - mesLimit.push_back( _Zincr ); - return mesLimit; + _Xcentre = X0; + _Ycentre = X1; + _Zcentre = X2; + _Xaxe = X3; + _Yaxe = X4; + _Zaxe = X5; + _Rayon = X6; + _Haut = X7; +} +//======================================================================================= +void HOMARD_Zone::SetPipe( double X0, double X1, double X2, + double X3, double X4, double X5, double X6, double X7, double X8 ) +{ + _Xcentre = X0; + _Ycentre = X1; + _Zcentre = X2; + _Xaxe = X3; + _Yaxe = X4; + _Zaxe = X5; + _Rayon = X6; + _Haut = X7; + _Rayonint = X8; } //======================================================================================= -std::vector HOMARD_Zone::GetBox() const +std::vector HOMARD_Zone::GetLimit() const { - std::vector mesCoor; - mesCoor.push_back( _Xmin ); mesCoor.push_back( _Xmax ); - mesCoor.push_back( _Ymin ); mesCoor.push_back( _Ymax ); - mesCoor.push_back( _Zmin ); mesCoor.push_back( _Zmax ); - return mesCoor; + std::vector mesLimit; + mesLimit.push_back( _Xincr ) ; + mesLimit.push_back( _Yincr ) ; + mesLimit.push_back( _Zincr ) ; + return mesLimit; } //======================================================================================= -std::vector HOMARD_Zone::GetSphere() const +std::vector HOMARD_Zone::GetCoords() const { std::vector mesCoor; - mesCoor.push_back( _Xcentre ); - mesCoor.push_back( _Ycentre ); - mesCoor.push_back( _Zcentre ); - mesCoor.push_back( _rayon ); +// + switch (_ZoneType) + { +// Rectangle ou parallelepipede + case 11: + { } + case 12: + { } + case 13: + { } + case 2: + { + mesCoor.push_back( _Xmin ) ; + mesCoor.push_back( _Xmax ) ; + mesCoor.push_back( _Ymin ) ; + mesCoor.push_back( _Ymax ) ; + mesCoor.push_back( _Zmin ) ; + mesCoor.push_back( _Zmax ) ; + break ; + } +// Sphere + case 4: + { + mesCoor.push_back( _Xcentre ) ; + mesCoor.push_back( _Ycentre ) ; + mesCoor.push_back( _Zcentre ) ; + mesCoor.push_back( _Rayon ) ; + break ; + } +// Disque ou cylindre + case 31: + { } + case 32: + { } + case 33: + { } + 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( _Rayon ) ; + mesCoor.push_back( _Haut ) ; + break ; + } +// Disque avec trou ou tuyau + case 61: + { } + case 62: + { } + case 63: + { } + case 7: + { + 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( _Rayon ) ; + mesCoor.push_back( _Haut ) ; + mesCoor.push_back( _Rayonint ) ; + break ; + } + ASSERT ( _ZoneType == -1 ) ; + } return mesCoor; } //============================================================================= void HOMARD_Zone::AddHypo( const char* NomHypo ) { - _ListHypo.push_back( std::string( NomHypo ) ); + _ListHypo.push_back( std::string( NomHypo ) ) ; } //============================================================================= void HOMARD_Zone::SupprHypo( const char* NomHypo ) { - std::list::iterator it = find( _ListHypo.begin(), _ListHypo.end(), NomHypo ); - if ( it != _ListHypo.end() ) + std::list::iterator it = find( _ListHypo.begin(), _ListHypo.end(), NomHypo ) ; + if ( it != _ListHypo.end() ) { - MESSAGE ("Dans SupprHypo pour " << NomHypo); - _ListHypo.erase( it ); + MESSAGE ("Dans SupprHypo pour " << NomHypo) ; + _ListHypo.erase( it ) ; } } @@ -178,5 +314,5 @@ const std::list& HOMARD_Zone::GetHypo() const //============================================================================= void HOMARD_Zone::SupprHypos() { - _ListHypo.clear(); + _ListHypo.clear() ; } diff --git a/src/HOMARD/HOMARD_Zone.hxx b/src/HOMARD/HOMARD_Zone.hxx index 8b99d31d..0bc99e41 100644 --- a/src/HOMARD/HOMARD_Zone.hxx +++ b/src/HOMARD/HOMARD_Zone.hxx @@ -38,21 +38,24 @@ public: void SetName( const char* NomZone ); std::string GetName() const; std::string GetDumpPython() const; - - void SetBox( double X0, double X1, double X2, - double X3, double X4, double X5 ); - std::vector GetBox() const; - void SetSphere( double X0, double X1, - double X2, double X3 ); - std::vector GetSphere() const; + void SetBox( double X0, double X1, double X2, + double X3, double X4, double X5 ); + std::vector GetCoords() const; + + void SetSphere( double X0, double X1, double X2, double X3 ); + + void SetCylinder( double X0, double X1, double X2, double X3, + double X4, double X5, double X6, double X7 ); + void SetPipe( double X0, double X1, double X2, double X3, + double X4, double X5, double X6, double X7, double X8 ); void SetLimit( double X0, double X1, double X2 ); std::vector GetLimit() const; - + void SetZoneType( int ZoneType ); int GetZoneType() const; - + void AddHypo( const char* NomHypo ); void SupprHypo( const char* NomHypo ); const std::list& GetHypo() const; @@ -63,7 +66,8 @@ private: int _ZoneType; std::list _ListHypo; double _Xmin, _Xmax, _Ymin, _Ymax, _Zmin, _Zmax; - double _Xcentre, _Ycentre, _Zcentre, _rayon; + double _Xcentre, _Ycentre, _Zcentre, _Rayon, _Rayonint; + double _Xaxe, _Yaxe, _Zaxe, _Haut; double _Xincr, _Yincr, _Zincr; }; diff --git a/src/HOMARD/HomardDriver.cxx b/src/HOMARD/HomardDriver.cxx index 6395dc6e..5d0e6171 100644 --- a/src/HOMARD/HomardDriver.cxx +++ b/src/HOMARD/HomardDriver.cxx @@ -39,15 +39,15 @@ HomardDriver::HomardDriver(const std::string siter, const std::string siterp1): std::string dir; std::string executable; if ( !(dirchar = getenv("HOMARD_REP_EXE")) ) - dir = "/logiciels/HOMARD/HOMARD_PUBLIC/Linux64" ; + dir = "/local00/HOMARD_SVN/trunk/bin" ; else dir = std::string(dirchar); if ( !(execchar = getenv("HOMARD_EXE")) ) - executable = "HOMARD"; + executable = "HOMARD.out"; else executable = std::string(execchar); _HOMARD_Exec = dir + "/" + executable ; - MESSAGE("Dans HomardDriver::HomardDriver, _HOMARD_Exec ="<<_HOMARD_Exec); + MESSAGE("Dans HomardDriver, _HOMARD_Exec ="<<_HOMARD_Exec); // _siter = siter ; _siterp1 = siterp1 ; @@ -62,7 +62,7 @@ HomardDriver::~HomardDriver() ////============================================================================= void HomardDriver::TexteInit( const std::string DirCompute, const std::string DirComputePa, const std::string MessFile ) { - MESSAGE("Dans HomardDriver::TexteInit, MessFile ="<= 11 and ZoneType <= 13 ) { ZoneTypeHOMARD = 1 ; } + else if ( ZoneType >= 31 and ZoneType <= 33 ) { ZoneTypeHOMARD = 3 ; } + else if ( ZoneType >= 61 and ZoneType <= 63 ) { ZoneTypeHOMARD = 6 ; } + else { ZoneTypeHOMARD = ZoneType ; } // std::stringstream saux1 ; saux1 << NumeZone ; @@ -190,14 +196,94 @@ void HomardDriver::TexteZone( int NumeZone, int ZoneType, double x0, double x1, saux = "#\n# Zone numero " + saux2 + "\n" ; // { std::stringstream saux1 ; - saux1 << NumeZone << " " << ZoneType ; + saux1 << NumeZone << " " << ZoneTypeHOMARD ; saux2 = saux1.str() ; saux += "ZoRaType " + saux2 + "\n" ; } // -// Cas du rectangle/parallelepipede +// Cas du rectangle +// + if ( ZoneType == 11 ) // Z est constant X Homard <=> X Salome +// Y Homard <=> Y Salome + { + saux += "#Rectangle\n" ; + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x0 ; + saux2 = saux1.str() ; + saux += "ZoRaXmin " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x1 ; + saux2 = saux1.str() ; + saux += "ZoRaXmax " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x2 ; + saux2 = saux1.str() ; + saux += "ZoRaYmin " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x3 ; + saux2 = saux1.str() ; + saux += "ZoRaYmax " + saux2 + "\n" ; + } + } // - if ( ZoneType == 2 ) + else if ( ZoneType == 12 ) // X est constant X Homard <=> Y Salome +// Y Homard <=> Z Salome + { + saux += "#Rectangle\n" ; + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x2 ; + saux2 = saux1.str() ; + saux += "ZoRaXmin " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x3 ; + saux2 = saux1.str() ; + saux += "ZoRaXmax " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x4 ; + saux2 = saux1.str() ; + saux += "ZoRaYmin " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x5 ; + saux2 = saux1.str() ; + saux += "ZoRaYmax " + saux2 + "\n" ; + } + } +// + else if ( ZoneType == 13 ) // Y est constant X Homard <=> X Salome +// Y Homard <=> Z Salome + { + saux += "#Rectangle\n" ; + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x0 ; + saux2 = saux1.str() ; + saux += "ZoRaXmin " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x1 ; + saux2 = saux1.str() ; + saux += "ZoRaXmax " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x4 ; + saux2 = saux1.str() ; + saux += "ZoRaYmin " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x5 ; + saux2 = saux1.str() ; + saux += "ZoRaYmax " + saux2 + "\n" ; + } + } +// +// Cas du parallelepipede +// + else if ( ZoneType == 2 ) { saux += "# Boite\n" ; { std::stringstream saux1 ; @@ -232,7 +318,88 @@ void HomardDriver::TexteZone( int NumeZone, int ZoneType, double x0, double x1, } } // -// Cas du cercle/sphere +// Cas du disque +// + else if ( ZoneType == 31 or ZoneType == 61 ) + { + saux += "# Sphere\n" ; + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x0 ; + saux2 = saux1.str() ; + saux += "ZoRaXCen " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x1 ; + saux2 = saux1.str() ; + saux += "ZoRaYCen " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x6 ; + saux2 = saux1.str() ; + if ( ZoneType == 61 ) { saux += "ZoRaRayE " + saux2 + "\n" ; } + else { saux += "ZoRaRayo " + saux2 + "\n" ; } + } + if ( ZoneType == 61 ) + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x8 ; + saux2 = saux1.str() ; + saux += "ZoRaRayI " + saux2 + "\n" ; + } + } + else if ( ZoneType == 32 or ZoneType == 62 ) + { + saux += "# Sphere\n" ; + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x1 ; + saux2 = saux1.str() ; + saux += "ZoRaXCen " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x2 ; + saux2 = saux1.str() ; + saux += "ZoRaYCen " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x6 ; + saux2 = saux1.str() ; + if ( ZoneType == 62 ) { saux += "ZoRaRayE " + saux2 + "\n" ; } + else { saux += "ZoRaRayo " + saux2 + "\n" ; } + } + if ( ZoneType == 62 ) + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x8 ; + saux2 = saux1.str() ; + saux += "ZoRaRayI " + saux2 + "\n" ; + } + } + else if ( ZoneType == 33 or ZoneType == 63 ) + { + saux += "# Sphere\n" ; + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x0 ; + saux2 = saux1.str() ; + saux += "ZoRaXCen " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x2 ; + saux2 = saux1.str() ; + saux += "ZoRaYCen " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x6 ; + saux2 = saux1.str() ; + if ( ZoneType == 63 ) { saux += "ZoRaRayE " + saux2 + "\n" ; } + else { saux += "ZoRaRayo " + saux2 + "\n" ; } + } + if ( ZoneType == 63 ) + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x8 ; + saux2 = saux1.str() ; + saux += "ZoRaRayI " + saux2 + "\n" ; + } + } +// +// Cas de la sphere // else if ( ZoneType == 4 ) { @@ -258,6 +425,61 @@ void HomardDriver::TexteZone( int NumeZone, int ZoneType, double x0, double x1, saux += "ZoRaRayo " + saux2 + "\n" ; } } +// +// Cas du cylindre ou du tuyau +// + else if ( ZoneType == 5 or ZoneType == 7 ) + { + if ( ZoneType == 5 ) { saux += "# Cylindre\n" ; } + else { saux += "# Tuyau\n" ; } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x0 ; + saux2 = saux1.str() ; + saux += "ZoRaXBas " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x1 ; + saux2 = saux1.str() ; + saux += "ZoRaYBas " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x2 ; + saux2 = saux1.str() ; + saux += "ZoRaZBas " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x3 ; + saux2 = saux1.str() ; + saux += "ZoRaXAxe " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x4 ; + saux2 = saux1.str() ; + saux += "ZoRaYAxe " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x5 ; + saux2 = saux1.str() ; + saux += "ZoRaZAxe " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x6 ; + saux2 = saux1.str() ; + if ( ZoneType == 5 ) { saux += "ZoRaRayo " + saux2 + "\n" ; } + else { saux += "ZoRaRayE " + saux2 + "\n" ; } + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x7 ; + saux2 = saux1.str() ; + saux += "ZoRaHaut " + saux2 + "\n" ; + } + if ( ZoneType == 7 ) + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x8 ; + saux2 = saux1.str() ; + saux += "ZoRaRayI " + saux2 + "\n" ; + } + } // _Texte += saux + "#\n" ; // @@ -266,10 +488,11 @@ void HomardDriver::TexteZone( int NumeZone, int ZoneType, double x0, double x1, ////============================================================================= void HomardDriver::TexteField( const std::string FieldName, const std::string FieldFile, int TimeStep, int Rank, - int TypeThR, double ThreshR, int TypeThC, double ThreshC, int UsCmpI ) + int TypeThR, double ThreshR, int TypeThC, double ThreshC, + int UsField, int UsCmpI ) { - MESSAGE("Dans HomardDriver::TexteField, FieldName = "<setSpacing(6); gridLayout->setMargin(9); gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - gBCylindre = new QGroupBox(CreateBoundaryAn); - gBCylindre->setObjectName(QString::fromUtf8("gBCylindre")); + GBButtons = new QGroupBox(CreateBoundaryAn); + GBButtons->setObjectName(QString::fromUtf8("GBButtons")); QSizePolicy sizePolicy(static_cast(0), static_cast(0)); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(gBCylindre->sizePolicy().hasHeightForWidth()); - gBCylindre->setSizePolicy(sizePolicy); - gridLayout1 = new QGridLayout(gBCylindre); + sizePolicy.setHeightForWidth(GBButtons->sizePolicy().hasHeightForWidth()); + GBButtons->setSizePolicy(sizePolicy); + gridLayout1 = new QGridLayout(GBButtons); gridLayout1->setSpacing(6); gridLayout1->setMargin(9); gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); - SpinBox_Xcent = new QDoubleSpinBox(gBCylindre); - SpinBox_Xcent->setObjectName(QString::fromUtf8("SpinBox_Xcent")); - SpinBox_Xcent->setDecimals(5); - SpinBox_Xcent->setMaximum(1e+09); - SpinBox_Xcent->setMinimum(-1e+09); - SpinBox_Xcent->setValue(0); - - gridLayout1->addWidget(SpinBox_Xcent, 0, 1, 1, 1); - - TLXcent = new QLabel(gBCylindre); - TLXcent->setObjectName(QString::fromUtf8("TLXcent")); - QSizePolicy sizePolicy1(static_cast(0), static_cast(0)); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(TLXcent->sizePolicy().hasHeightForWidth()); - TLXcent->setSizePolicy(sizePolicy1); - TLXcent->setWordWrap(false); - - gridLayout1->addWidget(TLXcent, 0, 0, 1, 1); - - SpinBox_Radius = new QDoubleSpinBox(gBCylindre); - SpinBox_Radius->setObjectName(QString::fromUtf8("SpinBox_Radius")); - SpinBox_Radius->setDecimals(5); - SpinBox_Radius->setMaximum(1e+09); - - gridLayout1->addWidget(SpinBox_Radius, 3, 1, 1, 2); - - SpinBox_Zcent = new QDoubleSpinBox(gBCylindre); - SpinBox_Zcent->setObjectName(QString::fromUtf8("SpinBox_Zcent")); - SpinBox_Zcent->setDecimals(5); - SpinBox_Zcent->setMaximum(1e+09); - SpinBox_Zcent->setMinimum(-1e+09); - SpinBox_Zcent->setValue(0); - - gridLayout1->addWidget(SpinBox_Zcent, 2, 1, 1, 1); - - TLradius = new QLabel(gBCylindre); - TLradius->setObjectName(QString::fromUtf8("TLradius")); - QSizePolicy sizePolicy2(static_cast(0), static_cast(0)); - sizePolicy2.setHorizontalStretch(0); - sizePolicy2.setVerticalStretch(0); - sizePolicy2.setHeightForWidth(TLradius->sizePolicy().hasHeightForWidth()); - TLradius->setSizePolicy(sizePolicy2); - TLradius->setWordWrap(false); - - gridLayout1->addWidget(TLradius, 3, 0, 1, 1); - - TLZcent = new QLabel(gBCylindre); - TLZcent->setObjectName(QString::fromUtf8("TLZcent")); - QSizePolicy sizePolicy3(static_cast(0), static_cast(0)); - sizePolicy3.setHorizontalStretch(0); - sizePolicy3.setVerticalStretch(0); - sizePolicy3.setHeightForWidth(TLZcent->sizePolicy().hasHeightForWidth()); - TLZcent->setSizePolicy(sizePolicy3); - TLZcent->setWordWrap(false); - - gridLayout1->addWidget(TLZcent, 2, 0, 1, 1); - - TLYcent = new QLabel(gBCylindre); - TLYcent->setObjectName(QString::fromUtf8("TLYcent")); - QSizePolicy sizePolicy4(static_cast(0), static_cast(0)); - sizePolicy4.setHorizontalStretch(0); - sizePolicy4.setVerticalStretch(0); - sizePolicy4.setHeightForWidth(TLYcent->sizePolicy().hasHeightForWidth()); - TLYcent->setSizePolicy(sizePolicy4); - TLYcent->setWordWrap(false); - - gridLayout1->addWidget(TLYcent, 1, 0, 1, 1); - - SpinBox_Ycent = new QDoubleSpinBox(gBCylindre); - SpinBox_Ycent->setObjectName(QString::fromUtf8("SpinBox_Ycent")); - SpinBox_Ycent->setDecimals(5); - SpinBox_Ycent->setMaximum(1e+09); - SpinBox_Ycent->setMinimum(-1e+09); - SpinBox_Ycent->setValue(0); - - gridLayout1->addWidget(SpinBox_Ycent, 1, 1, 1, 1); - - TLXaxis = new QLabel(gBCylindre); - TLXaxis->setObjectName(QString::fromUtf8("TLXaxis")); - QSizePolicy sizePolicy5(static_cast(0), static_cast(0)); - sizePolicy5.setHorizontalStretch(0); - sizePolicy5.setVerticalStretch(0); - sizePolicy5.setHeightForWidth(TLXaxis->sizePolicy().hasHeightForWidth()); - TLXaxis->setSizePolicy(sizePolicy5); - TLXaxis->setWordWrap(false); + buttonHelp = new QPushButton(GBButtons); + buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - gridLayout1->addWidget(TLXaxis, 0, 2, 1, 1); + gridLayout1->addWidget(buttonHelp, 0, 3, 1, 1); - TLYaxis = new QLabel(gBCylindre); - TLYaxis->setObjectName(QString::fromUtf8("TLYaxis")); - QSizePolicy sizePolicy6(static_cast(0), static_cast(0)); - sizePolicy6.setHorizontalStretch(0); - sizePolicy6.setVerticalStretch(0); - sizePolicy6.setHeightForWidth(TLYaxis->sizePolicy().hasHeightForWidth()); - TLYaxis->setSizePolicy(sizePolicy6); - TLYaxis->setWordWrap(false); + buttonCancel = new QPushButton(GBButtons); + buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - gridLayout1->addWidget(TLYaxis, 1, 2, 1, 1); + gridLayout1->addWidget(buttonCancel, 0, 2, 1, 1); - TLZaxis = new QLabel(gBCylindre); - TLZaxis->setObjectName(QString::fromUtf8("TLZaxis")); - QSizePolicy sizePolicy7(static_cast(0), static_cast(0)); - sizePolicy7.setHorizontalStretch(0); - sizePolicy7.setVerticalStretch(0); - sizePolicy7.setHeightForWidth(TLZaxis->sizePolicy().hasHeightForWidth()); - TLZaxis->setSizePolicy(sizePolicy7); - TLZaxis->setWordWrap(false); + buttonApply = new QPushButton(GBButtons); + buttonApply->setObjectName(QString::fromUtf8("buttonApply")); - gridLayout1->addWidget(TLZaxis, 2, 2, 1, 1); + gridLayout1->addWidget(buttonApply, 0, 1, 1, 1); - SpinBox_Zaxis = new QDoubleSpinBox(gBCylindre); - SpinBox_Zaxis->setObjectName(QString::fromUtf8("SpinBox_Zaxis")); - SpinBox_Zaxis->setDecimals(5); - SpinBox_Zaxis->setMaximum(1e+09); - SpinBox_Zaxis->setMinimum(-1e+09); - SpinBox_Zaxis->setValue(0); + buttonOk = new QPushButton(GBButtons); + buttonOk->setObjectName(QString::fromUtf8("buttonOk")); - gridLayout1->addWidget(SpinBox_Zaxis, 2, 3, 1, 1); + gridLayout1->addWidget(buttonOk, 0, 0, 1, 1); - SpinBox_Yaxis = new QDoubleSpinBox(gBCylindre); - SpinBox_Yaxis->setObjectName(QString::fromUtf8("SpinBox_Yaxis")); - SpinBox_Yaxis->setDecimals(5); - SpinBox_Yaxis->setMaximum(1e+09); - SpinBox_Yaxis->setMinimum(-1e+09); - SpinBox_Yaxis->setValue(0); - gridLayout1->addWidget(SpinBox_Yaxis, 1, 3, 1, 1); + gridLayout->addWidget(GBButtons, 4, 0, 1, 2); - SpinBox_Xaxis = new QDoubleSpinBox(gBCylindre); - SpinBox_Xaxis->setObjectName(QString::fromUtf8("SpinBox_Xaxis")); - SpinBox_Xaxis->setDecimals(5); - SpinBox_Xaxis->setMaximum(1e+09); - SpinBox_Xaxis->setMinimum(-1e+09); - SpinBox_Xaxis->setValue(0); + Name = new QLabel(CreateBoundaryAn); + Name->setObjectName(QString::fromUtf8("Name")); - gridLayout1->addWidget(SpinBox_Xaxis, 0, 3, 1, 1); + gridLayout->addWidget(Name, 0, 0, 1, 1); + LEBoundaryName = new QLineEdit(CreateBoundaryAn); + LEBoundaryName->setObjectName(QString::fromUtf8("LEBoundaryName")); + LEBoundaryName->setMaxLength(32); - gridLayout->addWidget(gBCylindre, 2, 0, 1, 2); + gridLayout->addWidget(LEBoundaryName, 0, 1, 1, 1); - GBButtons = new QGroupBox(CreateBoundaryAn); - GBButtons->setObjectName(QString::fromUtf8("GBButtons")); - QSizePolicy sizePolicy8(static_cast(0), static_cast(0)); - sizePolicy8.setHorizontalStretch(0); - sizePolicy8.setVerticalStretch(0); - sizePolicy8.setHeightForWidth(GBButtons->sizePolicy().hasHeightForWidth()); - GBButtons->setSizePolicy(sizePolicy8); - hboxLayout = new QHBoxLayout(GBButtons); + TypeBoundary = new QGroupBox(CreateBoundaryAn); + TypeBoundary->setObjectName(QString::fromUtf8("TypeBoundary")); + QSizePolicy sizePolicy1(static_cast(0), static_cast(0)); + sizePolicy1.setHorizontalStretch(0); + sizePolicy1.setVerticalStretch(0); + sizePolicy1.setHeightForWidth(TypeBoundary->sizePolicy().hasHeightForWidth()); + TypeBoundary->setSizePolicy(sizePolicy1); + TypeBoundary->setMinimumSize(QSize(340, 0)); + hboxLayout = new QHBoxLayout(TypeBoundary); hboxLayout->setSpacing(6); hboxLayout->setMargin(9); hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); - buttonOk = new QPushButton(GBButtons); - buttonOk->setObjectName(QString::fromUtf8("buttonOk")); - - hboxLayout->addWidget(buttonOk); - - buttonApply = new QPushButton(GBButtons); - buttonApply->setObjectName(QString::fromUtf8("buttonApply")); - - hboxLayout->addWidget(buttonApply); - - buttonCancel = new QPushButton(GBButtons); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + RBCylindre = new QRadioButton(TypeBoundary); + RBCylindre->setObjectName(QString::fromUtf8("RBCylindre")); + RBCylindre->setIcon(QIcon(QString::fromUtf8("../../resources/cylinderpointvector.png"))); + RBCylindre->setCheckable(true); + RBCylindre->setChecked(true); - hboxLayout->addWidget(buttonCancel); + hboxLayout->addWidget(RBCylindre); - buttonHelp = new QPushButton(GBButtons); - buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); + RBSphere = new QRadioButton(TypeBoundary); + RBSphere->setObjectName(QString::fromUtf8("RBSphere")); + RBSphere->setIcon(QIcon(QString::fromUtf8("../../resources/zone_spherepoint.png"))); - hboxLayout->addWidget(buttonHelp); + hboxLayout->addWidget(RBSphere); - gridLayout->addWidget(GBButtons, 4, 0, 1, 2); + gridLayout->addWidget(TypeBoundary, 1, 0, 1, 2); gBSphere = new QGroupBox(CreateBoundaryAn); gBSphere->setObjectName(QString::fromUtf8("gBSphere")); - QSizePolicy sizePolicy9(static_cast(0), static_cast(0)); - sizePolicy9.setHorizontalStretch(0); - sizePolicy9.setVerticalStretch(0); - sizePolicy9.setHeightForWidth(gBSphere->sizePolicy().hasHeightForWidth()); - gBSphere->setSizePolicy(sizePolicy9); + QSizePolicy sizePolicy2(static_cast(0), static_cast(0)); + sizePolicy2.setHorizontalStretch(0); + sizePolicy2.setVerticalStretch(0); + sizePolicy2.setHeightForWidth(gBSphere->sizePolicy().hasHeightForWidth()); + gBSphere->setSizePolicy(sizePolicy2); gridLayout2 = new QGridLayout(gBSphere); gridLayout2->setSpacing(6); gridLayout2->setMargin(9); @@ -293,33 +181,33 @@ public: TLRayon = new QLabel(gBSphere); TLRayon->setObjectName(QString::fromUtf8("TLRayon")); - QSizePolicy sizePolicy10(static_cast(0), static_cast(0)); - sizePolicy10.setHorizontalStretch(0); - sizePolicy10.setVerticalStretch(0); - sizePolicy10.setHeightForWidth(TLRayon->sizePolicy().hasHeightForWidth()); - TLRayon->setSizePolicy(sizePolicy10); + QSizePolicy sizePolicy3(static_cast(0), static_cast(0)); + sizePolicy3.setHorizontalStretch(0); + sizePolicy3.setVerticalStretch(0); + sizePolicy3.setHeightForWidth(TLRayon->sizePolicy().hasHeightForWidth()); + TLRayon->setSizePolicy(sizePolicy3); TLRayon->setWordWrap(false); gridLayout2->addWidget(TLRayon, 1, 2, 1, 1); TLZcentre = new QLabel(gBSphere); TLZcentre->setObjectName(QString::fromUtf8("TLZcentre")); - QSizePolicy sizePolicy11(static_cast(0), static_cast(0)); - sizePolicy11.setHorizontalStretch(0); - sizePolicy11.setVerticalStretch(0); - sizePolicy11.setHeightForWidth(TLZcentre->sizePolicy().hasHeightForWidth()); - TLZcentre->setSizePolicy(sizePolicy11); + QSizePolicy sizePolicy4(static_cast(0), static_cast(0)); + sizePolicy4.setHorizontalStretch(0); + sizePolicy4.setVerticalStretch(0); + sizePolicy4.setHeightForWidth(TLZcentre->sizePolicy().hasHeightForWidth()); + TLZcentre->setSizePolicy(sizePolicy4); TLZcentre->setWordWrap(false); gridLayout2->addWidget(TLZcentre, 2, 0, 1, 1); TLYcentre = new QLabel(gBSphere); TLYcentre->setObjectName(QString::fromUtf8("TLYcentre")); - QSizePolicy sizePolicy12(static_cast(0), static_cast(0)); - sizePolicy12.setHorizontalStretch(0); - sizePolicy12.setVerticalStretch(0); - sizePolicy12.setHeightForWidth(TLYcentre->sizePolicy().hasHeightForWidth()); - TLYcentre->setSizePolicy(sizePolicy12); + QSizePolicy sizePolicy5(static_cast(0), static_cast(0)); + sizePolicy5.setHorizontalStretch(0); + sizePolicy5.setVerticalStretch(0); + sizePolicy5.setHeightForWidth(TLYcentre->sizePolicy().hasHeightForWidth()); + TLYcentre->setSizePolicy(sizePolicy5); TLYcentre->setWordWrap(false); gridLayout2->addWidget(TLYcentre, 1, 0, 1, 1); @@ -344,11 +232,11 @@ public: TLXcentre = new QLabel(gBSphere); TLXcentre->setObjectName(QString::fromUtf8("TLXcentre")); - QSizePolicy sizePolicy13(static_cast(0), static_cast(0)); - sizePolicy13.setHorizontalStretch(0); - sizePolicy13.setVerticalStretch(0); - sizePolicy13.setHeightForWidth(TLXcentre->sizePolicy().hasHeightForWidth()); - TLXcentre->setSizePolicy(sizePolicy13); + QSizePolicy sizePolicy6(static_cast(0), static_cast(0)); + sizePolicy6.setHorizontalStretch(0); + sizePolicy6.setVerticalStretch(0); + sizePolicy6.setHeightForWidth(TLXcentre->sizePolicy().hasHeightForWidth()); + TLXcentre->setSizePolicy(sizePolicy6); TLXcentre->setWordWrap(false); gridLayout2->addWidget(TLXcentre, 0, 0, 1, 1); @@ -356,45 +244,157 @@ public: gridLayout->addWidget(gBSphere, 3, 0, 1, 2); - TypeBoundary = new QGroupBox(CreateBoundaryAn); - TypeBoundary->setObjectName(QString::fromUtf8("TypeBoundary")); + gBCylindre = new QGroupBox(CreateBoundaryAn); + gBCylindre->setObjectName(QString::fromUtf8("gBCylindre")); + QSizePolicy sizePolicy7(static_cast(0), static_cast(0)); + sizePolicy7.setHorizontalStretch(0); + sizePolicy7.setVerticalStretch(0); + sizePolicy7.setHeightForWidth(gBCylindre->sizePolicy().hasHeightForWidth()); + gBCylindre->setSizePolicy(sizePolicy7); + gridLayout3 = new QGridLayout(gBCylindre); + gridLayout3->setSpacing(6); + gridLayout3->setMargin(9); + gridLayout3->setObjectName(QString::fromUtf8("gridLayout3")); + SpinBox_Xcent = new QDoubleSpinBox(gBCylindre); + SpinBox_Xcent->setObjectName(QString::fromUtf8("SpinBox_Xcent")); + SpinBox_Xcent->setDecimals(5); + SpinBox_Xcent->setMaximum(1e+09); + SpinBox_Xcent->setMinimum(-1e+09); + SpinBox_Xcent->setValue(0); + + gridLayout3->addWidget(SpinBox_Xcent, 0, 1, 1, 1); + + TLXcent = new QLabel(gBCylindre); + TLXcent->setObjectName(QString::fromUtf8("TLXcent")); + QSizePolicy sizePolicy8(static_cast(0), static_cast(0)); + sizePolicy8.setHorizontalStretch(0); + sizePolicy8.setVerticalStretch(0); + sizePolicy8.setHeightForWidth(TLXcent->sizePolicy().hasHeightForWidth()); + TLXcent->setSizePolicy(sizePolicy8); + TLXcent->setWordWrap(false); + + gridLayout3->addWidget(TLXcent, 0, 0, 1, 1); + + SpinBox_Radius = new QDoubleSpinBox(gBCylindre); + SpinBox_Radius->setObjectName(QString::fromUtf8("SpinBox_Radius")); + SpinBox_Radius->setDecimals(5); + SpinBox_Radius->setMaximum(1e+09); + + gridLayout3->addWidget(SpinBox_Radius, 3, 1, 1, 2); + + SpinBox_Zcent = new QDoubleSpinBox(gBCylindre); + SpinBox_Zcent->setObjectName(QString::fromUtf8("SpinBox_Zcent")); + SpinBox_Zcent->setDecimals(5); + SpinBox_Zcent->setMaximum(1e+09); + SpinBox_Zcent->setMinimum(-1e+09); + SpinBox_Zcent->setValue(0); + + gridLayout3->addWidget(SpinBox_Zcent, 2, 1, 1, 1); + + TLradius = new QLabel(gBCylindre); + TLradius->setObjectName(QString::fromUtf8("TLradius")); + QSizePolicy sizePolicy9(static_cast(0), static_cast(0)); + sizePolicy9.setHorizontalStretch(0); + sizePolicy9.setVerticalStretch(0); + sizePolicy9.setHeightForWidth(TLradius->sizePolicy().hasHeightForWidth()); + TLradius->setSizePolicy(sizePolicy9); + TLradius->setWordWrap(false); + + gridLayout3->addWidget(TLradius, 3, 0, 1, 1); + + TLZcent = new QLabel(gBCylindre); + TLZcent->setObjectName(QString::fromUtf8("TLZcent")); + QSizePolicy sizePolicy10(static_cast(0), static_cast(0)); + sizePolicy10.setHorizontalStretch(0); + sizePolicy10.setVerticalStretch(0); + sizePolicy10.setHeightForWidth(TLZcent->sizePolicy().hasHeightForWidth()); + TLZcent->setSizePolicy(sizePolicy10); + TLZcent->setWordWrap(false); + + gridLayout3->addWidget(TLZcent, 2, 0, 1, 1); + + TLYcent = new QLabel(gBCylindre); + TLYcent->setObjectName(QString::fromUtf8("TLYcent")); + QSizePolicy sizePolicy11(static_cast(0), static_cast(0)); + sizePolicy11.setHorizontalStretch(0); + sizePolicy11.setVerticalStretch(0); + sizePolicy11.setHeightForWidth(TLYcent->sizePolicy().hasHeightForWidth()); + TLYcent->setSizePolicy(sizePolicy11); + TLYcent->setWordWrap(false); + + gridLayout3->addWidget(TLYcent, 1, 0, 1, 1); + + SpinBox_Ycent = new QDoubleSpinBox(gBCylindre); + SpinBox_Ycent->setObjectName(QString::fromUtf8("SpinBox_Ycent")); + SpinBox_Ycent->setDecimals(5); + SpinBox_Ycent->setMaximum(1e+09); + SpinBox_Ycent->setMinimum(-1e+09); + SpinBox_Ycent->setValue(0); + + gridLayout3->addWidget(SpinBox_Ycent, 1, 1, 1, 1); + + TLXaxis = new QLabel(gBCylindre); + TLXaxis->setObjectName(QString::fromUtf8("TLXaxis")); + QSizePolicy sizePolicy12(static_cast(0), static_cast(0)); + sizePolicy12.setHorizontalStretch(0); + sizePolicy12.setVerticalStretch(0); + sizePolicy12.setHeightForWidth(TLXaxis->sizePolicy().hasHeightForWidth()); + TLXaxis->setSizePolicy(sizePolicy12); + TLXaxis->setWordWrap(false); + + gridLayout3->addWidget(TLXaxis, 0, 2, 1, 1); + + TLYaxis = new QLabel(gBCylindre); + TLYaxis->setObjectName(QString::fromUtf8("TLYaxis")); + QSizePolicy sizePolicy13(static_cast(0), static_cast(0)); + sizePolicy13.setHorizontalStretch(0); + sizePolicy13.setVerticalStretch(0); + sizePolicy13.setHeightForWidth(TLYaxis->sizePolicy().hasHeightForWidth()); + TLYaxis->setSizePolicy(sizePolicy13); + TLYaxis->setWordWrap(false); + + gridLayout3->addWidget(TLYaxis, 1, 2, 1, 1); + + TLZaxis = new QLabel(gBCylindre); + TLZaxis->setObjectName(QString::fromUtf8("TLZaxis")); QSizePolicy sizePolicy14(static_cast(0), static_cast(0)); sizePolicy14.setHorizontalStretch(0); sizePolicy14.setVerticalStretch(0); - sizePolicy14.setHeightForWidth(TypeBoundary->sizePolicy().hasHeightForWidth()); - TypeBoundary->setSizePolicy(sizePolicy14); - TypeBoundary->setMinimumSize(QSize(340, 0)); - hboxLayout1 = new QHBoxLayout(TypeBoundary); - hboxLayout1->setSpacing(6); - hboxLayout1->setMargin(9); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); - RBCylindre = new QRadioButton(TypeBoundary); - RBCylindre->setObjectName(QString::fromUtf8("RBCylindre")); - RBCylindre->setIcon(QIcon(QString::fromUtf8("../../resources/cylinderpointvector.png"))); - RBCylindre->setCheckable(true); - RBCylindre->setChecked(true); + sizePolicy14.setHeightForWidth(TLZaxis->sizePolicy().hasHeightForWidth()); + TLZaxis->setSizePolicy(sizePolicy14); + TLZaxis->setWordWrap(false); - hboxLayout1->addWidget(RBCylindre); + gridLayout3->addWidget(TLZaxis, 2, 2, 1, 1); - RBSphere = new QRadioButton(TypeBoundary); - RBSphere->setObjectName(QString::fromUtf8("RBSphere")); - RBSphere->setIcon(QIcon(QString::fromUtf8("../../resources/zone_spherepoint.png"))); + SpinBox_Zaxis = new QDoubleSpinBox(gBCylindre); + SpinBox_Zaxis->setObjectName(QString::fromUtf8("SpinBox_Zaxis")); + SpinBox_Zaxis->setDecimals(5); + SpinBox_Zaxis->setMaximum(1e+09); + SpinBox_Zaxis->setMinimum(-1e+09); + SpinBox_Zaxis->setValue(0); - hboxLayout1->addWidget(RBSphere); + gridLayout3->addWidget(SpinBox_Zaxis, 2, 3, 1, 1); + SpinBox_Yaxis = new QDoubleSpinBox(gBCylindre); + SpinBox_Yaxis->setObjectName(QString::fromUtf8("SpinBox_Yaxis")); + SpinBox_Yaxis->setDecimals(5); + SpinBox_Yaxis->setMaximum(1e+09); + SpinBox_Yaxis->setMinimum(-1e+09); + SpinBox_Yaxis->setValue(0); - gridLayout->addWidget(TypeBoundary, 1, 0, 1, 2); + gridLayout3->addWidget(SpinBox_Yaxis, 1, 3, 1, 1); - LEBoundaryName = new QLineEdit(CreateBoundaryAn); - LEBoundaryName->setObjectName(QString::fromUtf8("LEBoundaryName")); - LEBoundaryName->setMaxLength(32); + SpinBox_Xaxis = new QDoubleSpinBox(gBCylindre); + SpinBox_Xaxis->setObjectName(QString::fromUtf8("SpinBox_Xaxis")); + SpinBox_Xaxis->setDecimals(5); + SpinBox_Xaxis->setMaximum(1e+09); + SpinBox_Xaxis->setMinimum(-1e+09); + SpinBox_Xaxis->setValue(0); - gridLayout->addWidget(LEBoundaryName, 0, 1, 1, 1); + gridLayout3->addWidget(SpinBox_Xaxis, 0, 3, 1, 1); - Name = new QLabel(CreateBoundaryAn); - Name->setObjectName(QString::fromUtf8("Name")); - gridLayout->addWidget(Name, 0, 0, 1, 1); + gridLayout->addWidget(gBCylindre, 2, 0, 1, 2); retranslateUi(CreateBoundaryAn); @@ -410,7 +410,21 @@ public: void retranslateUi(QDialog *CreateBoundaryAn) { CreateBoundaryAn->setWindowTitle(QApplication::translate("CreateBoundaryAn", "Create an analytical boundary", 0, QApplication::UnicodeUTF8)); - gBCylindre->setTitle(QApplication::translate("CreateBoundaryAn", "Coordinates of the cylindre", 0, QApplication::UnicodeUTF8)); + GBButtons->setTitle(QString()); + buttonHelp->setText(QApplication::translate("CreateBoundaryAn", "Help", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("CreateBoundaryAn", "Cancel", 0, QApplication::UnicodeUTF8)); + buttonApply->setText(QApplication::translate("CreateBoundaryAn", "Apply", 0, QApplication::UnicodeUTF8)); + buttonOk->setText(QApplication::translate("CreateBoundaryAn", "OK", 0, QApplication::UnicodeUTF8)); + Name->setText(QApplication::translate("CreateBoundaryAn", "Name", 0, QApplication::UnicodeUTF8)); + TypeBoundary->setTitle(QApplication::translate("CreateBoundaryAn", "Type of boundary", 0, QApplication::UnicodeUTF8)); + RBCylindre->setText(QApplication::translate("CreateBoundaryAn", "Cylinder", 0, QApplication::UnicodeUTF8)); + RBSphere->setText(QApplication::translate("CreateBoundaryAn", "Sphere", 0, QApplication::UnicodeUTF8)); + gBSphere->setTitle(QApplication::translate("CreateBoundaryAn", "Coordinates", 0, QApplication::UnicodeUTF8)); + TLRayon->setText(QApplication::translate("CreateBoundaryAn", "Radius", 0, QApplication::UnicodeUTF8)); + TLZcentre->setText(QApplication::translate("CreateBoundaryAn", "Z centre", 0, QApplication::UnicodeUTF8)); + TLYcentre->setText(QApplication::translate("CreateBoundaryAn", "Y centre", 0, QApplication::UnicodeUTF8)); + TLXcentre->setText(QApplication::translate("CreateBoundaryAn", "X centre", 0, QApplication::UnicodeUTF8)); + gBCylindre->setTitle(QApplication::translate("CreateBoundaryAn", "Coordinates", 0, QApplication::UnicodeUTF8)); TLXcent->setText(QApplication::translate("CreateBoundaryAn", "X centre", 0, QApplication::UnicodeUTF8)); TLradius->setText(QApplication::translate("CreateBoundaryAn", "Radius", 0, QApplication::UnicodeUTF8)); TLZcent->setText(QApplication::translate("CreateBoundaryAn", "Z centre", 0, QApplication::UnicodeUTF8)); @@ -418,20 +432,6 @@ public: TLXaxis->setText(QApplication::translate("CreateBoundaryAn", "X axis", 0, QApplication::UnicodeUTF8)); TLYaxis->setText(QApplication::translate("CreateBoundaryAn", "Y axis", 0, QApplication::UnicodeUTF8)); TLZaxis->setText(QApplication::translate("CreateBoundaryAn", "Z axis", 0, QApplication::UnicodeUTF8)); - GBButtons->setTitle(QString()); - buttonOk->setText(QApplication::translate("CreateBoundaryAn", "OK", 0, QApplication::UnicodeUTF8)); - buttonApply->setText(QApplication::translate("CreateBoundaryAn", "Apply", 0, QApplication::UnicodeUTF8)); - buttonCancel->setText(QApplication::translate("CreateBoundaryAn", "Cancel", 0, QApplication::UnicodeUTF8)); - buttonHelp->setText(QApplication::translate("CreateBoundaryAn", "Help", 0, QApplication::UnicodeUTF8)); - gBSphere->setTitle(QApplication::translate("CreateBoundaryAn", "Coordinates of the sphere", 0, QApplication::UnicodeUTF8)); - TLRayon->setText(QApplication::translate("CreateBoundaryAn", "Radius", 0, QApplication::UnicodeUTF8)); - TLZcentre->setText(QApplication::translate("CreateBoundaryAn", "Z centre", 0, QApplication::UnicodeUTF8)); - TLYcentre->setText(QApplication::translate("CreateBoundaryAn", "Y centre", 0, QApplication::UnicodeUTF8)); - TLXcentre->setText(QApplication::translate("CreateBoundaryAn", "X centre", 0, QApplication::UnicodeUTF8)); - TypeBoundary->setTitle(QApplication::translate("CreateBoundaryAn", "Type of boundary", 0, QApplication::UnicodeUTF8)); - RBCylindre->setText(QString()); - RBSphere->setText(QString()); - Name->setText(QApplication::translate("CreateBoundaryAn", "Name", 0, QApplication::UnicodeUTF8)); Q_UNUSED(CreateBoundaryAn); } // retranslateUi diff --git a/src/HOMARDGUI/CreateBoundaryAn.ui b/src/HOMARDGUI/CreateBoundaryAn.ui index e7e67a70..0750df02 100644 --- a/src/HOMARDGUI/CreateBoundaryAn.ui +++ b/src/HOMARDGUI/CreateBoundaryAn.ui @@ -25,8 +25,8 @@ 6 - - + + 0 @@ -36,7 +36,7 @@ - Coordinates of the cylindre + @@ -45,52 +45,128 @@ 6 - - - - 5 - - - 999999999.000000000000000 + + + + Help - - -999999999.000000000000000 + + + + + + Cancel - - 0.000000000000000 + + + + + + Apply - - - - 0 - 0 - 0 - 0 - + + + OK + + + + + + + + + Name + + + + + + + 32 + + + + + + + + 0 + 0 + 0 + 0 + + + + + 340 + 0 + + + + Type of boundary + + + + 9 + + + 6 + + + - X centre + Cylinder - - false + + ../../resources/cylinderpointvector.png + + + true + + + true - - - - 5 + + + + Sphere - - 1000000000.000000000000000 + + ../../resources/zone_spherepoint.png - - + + + + + + + + 0 + 0 + 0 + 0 + + + + Coordinates + + + + 9 + + + 6 + + + 5 @@ -98,69 +174,15 @@ 999999999.000000000000000 - -999999999.000000000000000 + 0.000000000000000 0.000000000000000 - - - - - 0 - 0 - 0 - 0 - - - - Radius - - - false - - - - - - - - 0 - 0 - 0 - 0 - - - - Z centre - - - false - - - - - - - - 0 - 0 - 0 - 0 - - - - Y centre - - - false - - - - - + + 5 @@ -175,8 +197,8 @@ - - + + 0 @@ -186,15 +208,15 @@ - X axis + Radius false - - + + 0 @@ -204,15 +226,15 @@ - Y axis + Z centre false - - + + 0 @@ -222,15 +244,15 @@ - Z axis + Y centre false - - + + 5 @@ -245,8 +267,8 @@ - - + + 5 @@ -261,27 +283,29 @@ - - - - 5 - - - 999999999.000000000000000 + + + + + 0 + 0 + 0 + 0 + - - -999999999.000000000000000 + + X centre - - 0.000000000000000 + + false - - + + 0 @@ -291,84 +315,61 @@ - + Coordinates - + 9 6 - - - - OK + + + + 5 - - - - - - Apply + + 999999999.000000000000000 - - - - - - Cancel + + -999999999.000000000000000 + + + 0.000000000000000 - - + + + + + 0 + 0 + 0 + 0 + + - Help + X centre + + + false - - - - - - - - 0 - 0 - 0 - 0 - - - - Coordinates of the sphere - - - - 9 - - - 6 - - - + + 5 - 999999999.000000000000000 - - - 0.000000000000000 - - - 0.000000000000000 + 1000000000.000000000000000 - + 5 @@ -383,8 +384,8 @@ - - + + 0 @@ -402,7 +403,7 @@ - + 0 @@ -420,7 +421,7 @@ - + 0 @@ -438,7 +439,7 @@ - + 5 @@ -453,24 +454,26 @@ - - - - 5 - - - 999999999.000000000000000 + + + + + 0 + 0 + 0 + 0 + - - -999999999.000000000000000 + + X axis - - 0.000000000000000 + + false - - + + 0 @@ -480,85 +483,82 @@ - X centre + Y axis false - - - - - - - - 0 - 0 - 0 - 0 - - - - - 340 - 0 - - - - Type of boundary - - - - 9 - - - 6 - - - + + + + + 0 + 0 + 0 + 0 + + - + Z axis - - ../../resources/cylinderpointvector.png + + false - - true + + + + + + 5 - - true + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 - - - - + + + + 5 - - ../../resources/zone_spherepoint.png + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 - - - - 32 - - - - - - - Name - - - diff --git a/src/HOMARDGUI/CreateBoundaryDi.h b/src/HOMARDGUI/CreateBoundaryDi.h index 2b99f0f7..7caf93da 100644 --- a/src/HOMARDGUI/CreateBoundaryDi.h +++ b/src/HOMARDGUI/CreateBoundaryDi.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading ui file 'CreateBoundaryDi.ui' ** -** Created: Thu Feb 24 09:10:36 2011 +** Created: Thu Sep 1 16:37:21 2011 ** by: Qt User Interface Compiler version 4.2.1 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! @@ -26,18 +26,18 @@ class Ui_CreateBoundaryDi { public: QGridLayout *gridLayout; - QLabel *Name; - QLineEdit *LEBoundaryName; - QLabel *Mesh; - QPushButton *PushFichier; - QLineEdit *LEFileName; - QCheckBox *CBGroupe; QGroupBox *GBButtons; QGridLayout *gridLayout1; - QPushButton *buttonOk; - QPushButton *buttonApply; - QPushButton *buttonCancel; QPushButton *buttonHelp; + QPushButton *buttonCancel; + QPushButton *buttonApply; + QPushButton *buttonOk; + QCheckBox *CBGroupe; + QLineEdit *LEFileName; + QPushButton *PushFichier; + QLabel *Mesh; + QLineEdit *LEBoundaryName; + QLabel *Name; void setupUi(QDialog *CreateBoundaryDi) { @@ -53,67 +53,67 @@ public: gridLayout->setSpacing(6); gridLayout->setMargin(9); gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - Name = new QLabel(CreateBoundaryDi); - Name->setObjectName(QString::fromUtf8("Name")); + GBButtons = new QGroupBox(CreateBoundaryDi); + GBButtons->setObjectName(QString::fromUtf8("GBButtons")); + gridLayout1 = new QGridLayout(GBButtons); + gridLayout1->setSpacing(6); + gridLayout1->setMargin(9); + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + buttonHelp = new QPushButton(GBButtons); + buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - gridLayout->addWidget(Name, 0, 0, 1, 1); + gridLayout1->addWidget(buttonHelp, 0, 3, 1, 1); - LEBoundaryName = new QLineEdit(CreateBoundaryDi); - LEBoundaryName->setObjectName(QString::fromUtf8("LEBoundaryName")); - LEBoundaryName->setMinimumSize(QSize(382, 21)); - LEBoundaryName->setMaxLength(32); + buttonCancel = new QPushButton(GBButtons); + buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - gridLayout->addWidget(LEBoundaryName, 0, 1, 1, 2); + gridLayout1->addWidget(buttonCancel, 0, 2, 1, 1); - Mesh = new QLabel(CreateBoundaryDi); - Mesh->setObjectName(QString::fromUtf8("Mesh")); + buttonApply = new QPushButton(GBButtons); + buttonApply->setObjectName(QString::fromUtf8("buttonApply")); - gridLayout->addWidget(Mesh, 1, 0, 1, 1); + gridLayout1->addWidget(buttonApply, 0, 1, 1, 1); - PushFichier = new QPushButton(CreateBoundaryDi); - PushFichier->setObjectName(QString::fromUtf8("PushFichier")); + buttonOk = new QPushButton(GBButtons); + buttonOk->setObjectName(QString::fromUtf8("buttonOk")); - gridLayout->addWidget(PushFichier, 1, 1, 1, 1); + gridLayout1->addWidget(buttonOk, 0, 0, 1, 1); - LEFileName = new QLineEdit(CreateBoundaryDi); - LEFileName->setObjectName(QString::fromUtf8("LEFileName")); - LEFileName->setMinimumSize(QSize(370, 21)); - gridLayout->addWidget(LEFileName, 1, 2, 1, 1); + gridLayout->addWidget(GBButtons, 3, 0, 1, 3); CBGroupe = new QCheckBox(CreateBoundaryDi); CBGroupe->setObjectName(QString::fromUtf8("CBGroupe")); gridLayout->addWidget(CBGroupe, 2, 0, 1, 3); - GBButtons = new QGroupBox(CreateBoundaryDi); - GBButtons->setObjectName(QString::fromUtf8("GBButtons")); - gridLayout1 = new QGridLayout(GBButtons); - gridLayout1->setSpacing(6); - gridLayout1->setMargin(9); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); - buttonOk = new QPushButton(GBButtons); - buttonOk->setObjectName(QString::fromUtf8("buttonOk")); + LEFileName = new QLineEdit(CreateBoundaryDi); + LEFileName->setObjectName(QString::fromUtf8("LEFileName")); + LEFileName->setMinimumSize(QSize(370, 21)); - gridLayout1->addWidget(buttonOk, 0, 0, 1, 1); + gridLayout->addWidget(LEFileName, 1, 2, 1, 1); - buttonApply = new QPushButton(GBButtons); - buttonApply->setObjectName(QString::fromUtf8("buttonApply")); + PushFichier = new QPushButton(CreateBoundaryDi); + PushFichier->setObjectName(QString::fromUtf8("PushFichier")); - gridLayout1->addWidget(buttonApply, 0, 1, 1, 1); + gridLayout->addWidget(PushFichier, 1, 1, 1, 1); - buttonCancel = new QPushButton(GBButtons); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + Mesh = new QLabel(CreateBoundaryDi); + Mesh->setObjectName(QString::fromUtf8("Mesh")); - gridLayout1->addWidget(buttonCancel, 0, 2, 1, 1); + gridLayout->addWidget(Mesh, 1, 0, 1, 1); - buttonHelp = new QPushButton(GBButtons); - buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); + LEBoundaryName = new QLineEdit(CreateBoundaryDi); + LEBoundaryName->setObjectName(QString::fromUtf8("LEBoundaryName")); + LEBoundaryName->setMinimumSize(QSize(382, 21)); + LEBoundaryName->setMaxLength(32); - gridLayout1->addWidget(buttonHelp, 0, 3, 1, 1); + gridLayout->addWidget(LEBoundaryName, 0, 1, 1, 2); + Name = new QLabel(CreateBoundaryDi); + Name->setObjectName(QString::fromUtf8("Name")); - gridLayout->addWidget(GBButtons, 3, 0, 1, 3); + gridLayout->addWidget(Name, 0, 0, 1, 1); retranslateUi(CreateBoundaryDi); @@ -129,15 +129,15 @@ public: void retranslateUi(QDialog *CreateBoundaryDi) { CreateBoundaryDi->setWindowTitle(QApplication::translate("CreateBoundaryDi", "Create a discrete boundary", 0, QApplication::UnicodeUTF8)); - Name->setText(QApplication::translate("CreateBoundaryDi", "Name", 0, QApplication::UnicodeUTF8)); - Mesh->setText(QApplication::translate("CreateBoundaryDi", "Mesh", 0, QApplication::UnicodeUTF8)); - PushFichier->setText(QString()); - CBGroupe->setText(QApplication::translate("CreateBoundaryDi", "Filtering with groups", 0, QApplication::UnicodeUTF8)); GBButtons->setTitle(QString()); - buttonOk->setText(QApplication::translate("CreateBoundaryDi", "OK", 0, QApplication::UnicodeUTF8)); - buttonApply->setText(QApplication::translate("CreateBoundaryDi", "Apply", 0, QApplication::UnicodeUTF8)); - buttonCancel->setText(QApplication::translate("CreateBoundaryDi", "Cancel", 0, QApplication::UnicodeUTF8)); buttonHelp->setText(QApplication::translate("CreateBoundaryDi", "Help", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("CreateBoundaryDi", "Cancel", 0, QApplication::UnicodeUTF8)); + buttonApply->setText(QApplication::translate("CreateBoundaryDi", "Apply", 0, QApplication::UnicodeUTF8)); + buttonOk->setText(QApplication::translate("CreateBoundaryDi", "OK", 0, QApplication::UnicodeUTF8)); + CBGroupe->setText(QApplication::translate("CreateBoundaryDi", "Filtering with groups", 0, QApplication::UnicodeUTF8)); + PushFichier->setText(QString()); + Mesh->setText(QApplication::translate("CreateBoundaryDi", "Mesh", 0, QApplication::UnicodeUTF8)); + Name->setText(QApplication::translate("CreateBoundaryDi", "Name", 0, QApplication::UnicodeUTF8)); Q_UNUSED(CreateBoundaryDi); } // retranslateUi diff --git a/src/HOMARDGUI/CreateBoundaryDi.ui b/src/HOMARDGUI/CreateBoundaryDi.ui index 5df5cb02..3cc0ec09 100644 --- a/src/HOMARDGUI/CreateBoundaryDi.ui +++ b/src/HOMARDGUI/CreateBoundaryDi.ui @@ -33,57 +33,6 @@ 6 - - - - Name - - - - - - - - 382 - 21 - - - - 32 - - - - - - - Mesh - - - - - - - - - - - - - - - 370 - 21 - - - - - - - - Filtering with groups - - - @@ -96,37 +45,88 @@ 6 - - + + - OK + Help - - + + - Apply + Cancel - - + + - Cancel + Apply - - + + - Help + OK + + + + Filtering with groups + + + + + + + + 370 + 21 + + + + + + + + + + + + + + + Mesh + + + + + + + + 382 + 21 + + + + 32 + + + + + + + Name + + + diff --git a/src/HOMARDGUI/CreateCase.h b/src/HOMARDGUI/CreateCase.h index 44a27c33..e976bca2 100644 --- a/src/HOMARDGUI/CreateCase.h +++ b/src/HOMARDGUI/CreateCase.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading ui file 'CreateCase.ui' ** -** Created: Tue Mar 15 09:25:40 2011 +** Created: Mon Sep 12 15:31:56 2011 ** by: Qt User Interface Compiler version 4.2.1 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -25,61 +26,70 @@ #include #include #include +#include #include -#include #include class Ui_CreateCase { public: QGridLayout *gridLayout; - QGroupBox *GroupButtons; + QGroupBox *GBAdvancedOptions; QGridLayout *gridLayout1; - QPushButton *buttonOk; - QPushButton *buttonApply; - QPushButton *buttonCancel; - QPushButton *buttonHelp; + QSpacerItem *spacerItem; + QLabel *TLMinimalDiameter; + QSpinBox *spinBoxNivMax; + QDoubleSpinBox *doubleSpinBoxDiamMin; + QLabel *TLMaximalLevel; QGroupBox *GBBoundaryA; + QTableWidget *TWBoundary; QWidget *layoutWidget; - QVBoxLayout *vboxLayout; + QGridLayout *gridLayout2; + QPushButton *PBBoundaryAnEdit; QPushButton *PBBoundaryAnNew; QPushButton *PBBoundaryAnHelp; - QTableWidget *TWBoundary; + QCheckBox *CBAdvanced; + QGroupBox *GBBoundaryD; + QGridLayout *gridLayout3; + QPushButton *PBBoundaryDiEdit; + QPushButton *PBBoundaryDiNew; + QComboBox *CBBoundaryDi; + QSpacerItem *spacerItem1; + QPushButton *PBBoundaryDiHelp; + QGroupBox *GroupButtons; + QGridLayout *gridLayout4; + QPushButton *buttonHelp; + QPushButton *buttonCancel; + QPushButton *buttonApply; + QPushButton *buttonOk; QHBoxLayout *hboxLayout; + QCheckBox *CBBoundaryD; + QCheckBox *CBBoundaryA; + QHBoxLayout *hboxLayout1; QLabel *Name; QLineEdit *LECaseName; - QHBoxLayout *hboxLayout1; + QHBoxLayout *hboxLayout2; QLabel *Directory; QPushButton *PushDir; QLineEdit *LEDirName; - QHBoxLayout *hboxLayout2; + QHBoxLayout *hboxLayout3; QLabel *Mesh_2; QPushButton *PushFichier; QLineEdit *LEFileName; - QSpacerItem *spacerItem; + QSpacerItem *spacerItem2; QGroupBox *GBTypeConf; - QHBoxLayout *hboxLayout3; + QHBoxLayout *hboxLayout4; QRadioButton *RBConforme; QRadioButton *RBNonConforme; - QSpacerItem *spacerItem1; + QSpacerItem *spacerItem3; QGroupBox *GBTypeNoConf; - QHBoxLayout *hboxLayout4; + QHBoxLayout *hboxLayout5; QRadioButton *RB1NpM; QRadioButton *RB1NpA; QRadioButton *RBQuelconque; - QSpacerItem *spacerItem2; - QHBoxLayout *hboxLayout5; - QCheckBox *CBBoundaryD; - QCheckBox *CBBoundaryA; - QSpacerItem *spacerItem3; QSpacerItem *spacerItem4; - QGroupBox *GBBoundaryD; - QGridLayout *gridLayout2; - QPushButton *PBBoundaryDiHelp; - QPushButton *PBBoundaryDiNew; - QPushButton *PBBoundaryDiEdit; QSpacerItem *spacerItem5; - QComboBox *CBBoundaryDi; + QSpacerItem *spacerItem6; void setupUi(QDialog *CreateCase) { @@ -94,264 +104,322 @@ public: gridLayout->setSpacing(6); gridLayout->setMargin(9); gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - GroupButtons = new QGroupBox(CreateCase); - GroupButtons->setObjectName(QString::fromUtf8("GroupButtons")); - gridLayout1 = new QGridLayout(GroupButtons); + GBAdvancedOptions = new QGroupBox(CreateCase); + GBAdvancedOptions->setObjectName(QString::fromUtf8("GBAdvancedOptions")); + gridLayout1 = new QGridLayout(GBAdvancedOptions); gridLayout1->setSpacing(6); gridLayout1->setMargin(9); gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); - buttonOk = new QPushButton(GroupButtons); - buttonOk->setObjectName(QString::fromUtf8("buttonOk")); - buttonOk->setAutoDefault(false); + spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - gridLayout1->addWidget(buttonOk, 0, 0, 1, 1); + gridLayout1->addItem(spacerItem, 0, 2, 1, 1); - buttonApply = new QPushButton(GroupButtons); - buttonApply->setObjectName(QString::fromUtf8("buttonApply")); - buttonApply->setAutoDefault(false); + TLMinimalDiameter = new QLabel(GBAdvancedOptions); + TLMinimalDiameter->setObjectName(QString::fromUtf8("TLMinimalDiameter")); + QSizePolicy sizePolicy1(static_cast(0), static_cast(0)); + sizePolicy1.setHorizontalStretch(0); + sizePolicy1.setVerticalStretch(0); + sizePolicy1.setHeightForWidth(TLMinimalDiameter->sizePolicy().hasHeightForWidth()); + TLMinimalDiameter->setSizePolicy(sizePolicy1); + TLMinimalDiameter->setWordWrap(false); - gridLayout1->addWidget(buttonApply, 0, 1, 1, 1); + gridLayout1->addWidget(TLMinimalDiameter, 0, 0, 1, 1); - buttonCancel = new QPushButton(GroupButtons); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - buttonCancel->setAutoDefault(false); + spinBoxNivMax = new QSpinBox(GBAdvancedOptions); + spinBoxNivMax->setObjectName(QString::fromUtf8("spinBoxNivMax")); + spinBoxNivMax->setValue(99); - gridLayout1->addWidget(buttonCancel, 0, 2, 1, 1); + gridLayout1->addWidget(spinBoxNivMax, 0, 4, 1, 1); - buttonHelp = new QPushButton(GroupButtons); - buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - buttonHelp->setAutoDefault(false); + doubleSpinBoxDiamMin = new QDoubleSpinBox(GBAdvancedOptions); + doubleSpinBoxDiamMin->setObjectName(QString::fromUtf8("doubleSpinBoxDiamMin")); + doubleSpinBoxDiamMin->setDecimals(5); + + gridLayout1->addWidget(doubleSpinBoxDiamMin, 0, 1, 1, 1); + + TLMaximalLevel = new QLabel(GBAdvancedOptions); + TLMaximalLevel->setObjectName(QString::fromUtf8("TLMaximalLevel")); + QSizePolicy sizePolicy2(static_cast(0), static_cast(0)); + sizePolicy2.setHorizontalStretch(0); + sizePolicy2.setVerticalStretch(0); + sizePolicy2.setHeightForWidth(TLMaximalLevel->sizePolicy().hasHeightForWidth()); + TLMaximalLevel->setSizePolicy(sizePolicy2); + TLMaximalLevel->setWordWrap(false); - gridLayout1->addWidget(buttonHelp, 0, 3, 1, 1); + gridLayout1->addWidget(TLMaximalLevel, 0, 3, 1, 1); - gridLayout->addWidget(GroupButtons, 13, 0, 1, 2); + gridLayout->addWidget(GBAdvancedOptions, 14, 0, 1, 1); GBBoundaryA = new QGroupBox(CreateCase); GBBoundaryA->setObjectName(QString::fromUtf8("GBBoundaryA")); - GBBoundaryA->setMinimumSize(QSize(548, 300)); + GBBoundaryA->setMinimumSize(QSize(548, 200)); + TWBoundary = new QTableWidget(GBBoundaryA); + TWBoundary->setObjectName(QString::fromUtf8("TWBoundary")); + TWBoundary->setGeometry(QRect(4, 20, 371, 161)); + TWBoundary->setEditTriggers(QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::NoEditTriggers|QAbstractItemView::SelectedClicked); + TWBoundary->setShowGrid(true); + TWBoundary->setRowCount(0); + TWBoundary->setColumnCount(1); layoutWidget = new QWidget(GBBoundaryA); layoutWidget->setObjectName(QString::fromUtf8("layoutWidget")); - layoutWidget->setGeometry(QRect(410, 20, 120, 110)); - vboxLayout = new QVBoxLayout(layoutWidget); - vboxLayout->setSpacing(6); - vboxLayout->setMargin(0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + layoutWidget->setGeometry(QRect(430, 40, 77, 95)); + gridLayout2 = new QGridLayout(layoutWidget); + gridLayout2->setSpacing(6); + gridLayout2->setMargin(0); + gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); + PBBoundaryAnEdit = new QPushButton(layoutWidget); + PBBoundaryAnEdit->setObjectName(QString::fromUtf8("PBBoundaryAnEdit")); + PBBoundaryAnEdit->setAutoDefault(false); + + gridLayout2->addWidget(PBBoundaryAnEdit, 1, 0, 1, 1); + PBBoundaryAnNew = new QPushButton(layoutWidget); PBBoundaryAnNew->setObjectName(QString::fromUtf8("PBBoundaryAnNew")); PBBoundaryAnNew->setAutoDefault(false); - vboxLayout->addWidget(PBBoundaryAnNew); + gridLayout2->addWidget(PBBoundaryAnNew, 0, 0, 1, 1); PBBoundaryAnHelp = new QPushButton(layoutWidget); PBBoundaryAnHelp->setObjectName(QString::fromUtf8("PBBoundaryAnHelp")); PBBoundaryAnHelp->setAutoDefault(false); - vboxLayout->addWidget(PBBoundaryAnHelp); + gridLayout2->addWidget(PBBoundaryAnHelp, 2, 0, 1, 1); - TWBoundary = new QTableWidget(GBBoundaryA); - TWBoundary->setObjectName(QString::fromUtf8("TWBoundary")); - TWBoundary->setGeometry(QRect(4, 20, 371, 270)); - TWBoundary->setEditTriggers(QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::NoEditTriggers|QAbstractItemView::SelectedClicked); - TWBoundary->setShowGrid(true); - TWBoundary->setRowCount(0); - TWBoundary->setColumnCount(1); gridLayout->addWidget(GBBoundaryA, 12, 0, 1, 2); + CBAdvanced = new QCheckBox(CreateCase); + CBAdvanced->setObjectName(QString::fromUtf8("CBAdvanced")); + + gridLayout->addWidget(CBAdvanced, 13, 0, 1, 1); + + GBBoundaryD = new QGroupBox(CreateCase); + GBBoundaryD->setObjectName(QString::fromUtf8("GBBoundaryD")); + QSizePolicy sizePolicy3(static_cast(0), static_cast(0)); + sizePolicy3.setHorizontalStretch(0); + sizePolicy3.setVerticalStretch(0); + sizePolicy3.setHeightForWidth(GBBoundaryD->sizePolicy().hasHeightForWidth()); + GBBoundaryD->setSizePolicy(sizePolicy3); + gridLayout3 = new QGridLayout(GBBoundaryD); + gridLayout3->setSpacing(6); + gridLayout3->setMargin(9); + gridLayout3->setObjectName(QString::fromUtf8("gridLayout3")); + PBBoundaryDiEdit = new QPushButton(GBBoundaryD); + PBBoundaryDiEdit->setObjectName(QString::fromUtf8("PBBoundaryDiEdit")); + PBBoundaryDiEdit->setAutoDefault(false); + + gridLayout3->addWidget(PBBoundaryDiEdit, 0, 3, 1, 1); + + PBBoundaryDiNew = new QPushButton(GBBoundaryD); + PBBoundaryDiNew->setObjectName(QString::fromUtf8("PBBoundaryDiNew")); + PBBoundaryDiNew->setAutoDefault(false); + + gridLayout3->addWidget(PBBoundaryDiNew, 0, 2, 1, 1); + + CBBoundaryDi = new QComboBox(GBBoundaryD); + CBBoundaryDi->setObjectName(QString::fromUtf8("CBBoundaryDi")); + CBBoundaryDi->setSizeAdjustPolicy(QComboBox::AdjustToContents); + + gridLayout3->addWidget(CBBoundaryDi, 0, 0, 1, 1); + + spacerItem1 = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum); + + gridLayout3->addItem(spacerItem1, 0, 1, 1, 1); + + PBBoundaryDiHelp = new QPushButton(GBBoundaryD); + PBBoundaryDiHelp->setObjectName(QString::fromUtf8("PBBoundaryDiHelp")); + PBBoundaryDiHelp->setAutoDefault(false); + + gridLayout3->addWidget(PBBoundaryDiHelp, 0, 4, 1, 1); + + + gridLayout->addWidget(GBBoundaryD, 11, 0, 1, 1); + + GroupButtons = new QGroupBox(CreateCase); + GroupButtons->setObjectName(QString::fromUtf8("GroupButtons")); + gridLayout4 = new QGridLayout(GroupButtons); + gridLayout4->setSpacing(6); + gridLayout4->setMargin(9); + gridLayout4->setObjectName(QString::fromUtf8("gridLayout4")); + buttonHelp = new QPushButton(GroupButtons); + buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); + buttonHelp->setAutoDefault(false); + + gridLayout4->addWidget(buttonHelp, 0, 3, 1, 1); + + buttonCancel = new QPushButton(GroupButtons); + buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + buttonCancel->setAutoDefault(false); + + gridLayout4->addWidget(buttonCancel, 0, 2, 1, 1); + + buttonApply = new QPushButton(GroupButtons); + buttonApply->setObjectName(QString::fromUtf8("buttonApply")); + buttonApply->setAutoDefault(false); + + gridLayout4->addWidget(buttonApply, 0, 1, 1, 1); + + buttonOk = new QPushButton(GroupButtons); + buttonOk->setObjectName(QString::fromUtf8("buttonOk")); + buttonOk->setAutoDefault(false); + + gridLayout4->addWidget(buttonOk, 0, 0, 1, 1); + + + gridLayout->addWidget(GroupButtons, 15, 0, 1, 1); + hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(6); hboxLayout->setMargin(0); hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + CBBoundaryD = new QCheckBox(CreateCase); + CBBoundaryD->setObjectName(QString::fromUtf8("CBBoundaryD")); + + hboxLayout->addWidget(CBBoundaryD); + + CBBoundaryA = new QCheckBox(CreateCase); + CBBoundaryA->setObjectName(QString::fromUtf8("CBBoundaryA")); + + hboxLayout->addWidget(CBBoundaryA); + + + gridLayout->addLayout(hboxLayout, 9, 0, 1, 1); + + hboxLayout1 = new QHBoxLayout(); + hboxLayout1->setSpacing(6); + hboxLayout1->setMargin(0); + hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); Name = new QLabel(CreateCase); Name->setObjectName(QString::fromUtf8("Name")); - hboxLayout->addWidget(Name); + hboxLayout1->addWidget(Name); LECaseName = new QLineEdit(CreateCase); LECaseName->setObjectName(QString::fromUtf8("LECaseName")); LECaseName->setMinimumSize(QSize(382, 21)); - hboxLayout->addWidget(LECaseName); + hboxLayout1->addWidget(LECaseName); - gridLayout->addLayout(hboxLayout, 0, 0, 1, 2); + gridLayout->addLayout(hboxLayout1, 0, 0, 1, 2); - hboxLayout1 = new QHBoxLayout(); - hboxLayout1->setSpacing(6); - hboxLayout1->setMargin(0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout2 = new QHBoxLayout(); + hboxLayout2->setSpacing(6); + hboxLayout2->setMargin(0); + hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); Directory = new QLabel(CreateCase); Directory->setObjectName(QString::fromUtf8("Directory")); - hboxLayout1->addWidget(Directory); + hboxLayout2->addWidget(Directory); PushDir = new QPushButton(CreateCase); PushDir->setObjectName(QString::fromUtf8("PushDir")); PushDir->setAutoDefault(false); - hboxLayout1->addWidget(PushDir); + hboxLayout2->addWidget(PushDir); LEDirName = new QLineEdit(CreateCase); LEDirName->setObjectName(QString::fromUtf8("LEDirName")); LEDirName->setMinimumSize(QSize(382, 21)); - hboxLayout1->addWidget(LEDirName); + hboxLayout2->addWidget(LEDirName); - gridLayout->addLayout(hboxLayout1, 1, 0, 1, 1); + gridLayout->addLayout(hboxLayout2, 1, 0, 1, 1); - hboxLayout2 = new QHBoxLayout(); - hboxLayout2->setSpacing(6); - hboxLayout2->setMargin(0); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout3 = new QHBoxLayout(); + hboxLayout3->setSpacing(6); + hboxLayout3->setMargin(0); + hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); Mesh_2 = new QLabel(CreateCase); Mesh_2->setObjectName(QString::fromUtf8("Mesh_2")); - hboxLayout2->addWidget(Mesh_2); + hboxLayout3->addWidget(Mesh_2); PushFichier = new QPushButton(CreateCase); PushFichier->setObjectName(QString::fromUtf8("PushFichier")); PushFichier->setAutoDefault(false); - hboxLayout2->addWidget(PushFichier); + hboxLayout3->addWidget(PushFichier); LEFileName = new QLineEdit(CreateCase); LEFileName->setObjectName(QString::fromUtf8("LEFileName")); LEFileName->setMinimumSize(QSize(382, 21)); - hboxLayout2->addWidget(LEFileName); + hboxLayout3->addWidget(LEFileName); - gridLayout->addLayout(hboxLayout2, 3, 0, 1, 2); + gridLayout->addLayout(hboxLayout3, 3, 0, 1, 2); - spacerItem = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem2 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout->addItem(spacerItem, 4, 0, 1, 1); + gridLayout->addItem(spacerItem2, 4, 0, 1, 1); GBTypeConf = new QGroupBox(CreateCase); GBTypeConf->setObjectName(QString::fromUtf8("GBTypeConf")); - hboxLayout3 = new QHBoxLayout(GBTypeConf); - hboxLayout3->setSpacing(6); - hboxLayout3->setMargin(9); - hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); + hboxLayout4 = new QHBoxLayout(GBTypeConf); + hboxLayout4->setSpacing(6); + hboxLayout4->setMargin(9); + hboxLayout4->setObjectName(QString::fromUtf8("hboxLayout4")); RBConforme = new QRadioButton(GBTypeConf); RBConforme->setObjectName(QString::fromUtf8("RBConforme")); RBConforme->setChecked(true); - hboxLayout3->addWidget(RBConforme); + hboxLayout4->addWidget(RBConforme); RBNonConforme = new QRadioButton(GBTypeConf); RBNonConforme->setObjectName(QString::fromUtf8("RBNonConforme")); - hboxLayout3->addWidget(RBNonConforme); + hboxLayout4->addWidget(RBNonConforme); gridLayout->addWidget(GBTypeConf, 5, 0, 1, 2); - spacerItem1 = new QSpacerItem(20, 1, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem3 = new QSpacerItem(20, 1, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout->addItem(spacerItem1, 6, 0, 1, 1); + gridLayout->addItem(spacerItem3, 6, 0, 1, 1); GBTypeNoConf = new QGroupBox(CreateCase); GBTypeNoConf->setObjectName(QString::fromUtf8("GBTypeNoConf")); - hboxLayout4 = new QHBoxLayout(GBTypeNoConf); - hboxLayout4->setSpacing(6); - hboxLayout4->setMargin(9); - hboxLayout4->setObjectName(QString::fromUtf8("hboxLayout4")); + hboxLayout5 = new QHBoxLayout(GBTypeNoConf); + hboxLayout5->setSpacing(6); + hboxLayout5->setMargin(9); + hboxLayout5->setObjectName(QString::fromUtf8("hboxLayout5")); RB1NpM = new QRadioButton(GBTypeNoConf); RB1NpM->setObjectName(QString::fromUtf8("RB1NpM")); - hboxLayout4->addWidget(RB1NpM); + hboxLayout5->addWidget(RB1NpM); RB1NpA = new QRadioButton(GBTypeNoConf); RB1NpA->setObjectName(QString::fromUtf8("RB1NpA")); - hboxLayout4->addWidget(RB1NpA); + hboxLayout5->addWidget(RB1NpA); RBQuelconque = new QRadioButton(GBTypeNoConf); RBQuelconque->setObjectName(QString::fromUtf8("RBQuelconque")); - hboxLayout4->addWidget(RBQuelconque); + hboxLayout5->addWidget(RBQuelconque); gridLayout->addWidget(GBTypeNoConf, 7, 0, 1, 2); - spacerItem2 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); - - gridLayout->addItem(spacerItem2, 8, 0, 1, 1); - - hboxLayout5 = new QHBoxLayout(); - hboxLayout5->setSpacing(6); - hboxLayout5->setMargin(0); - hboxLayout5->setObjectName(QString::fromUtf8("hboxLayout5")); - CBBoundaryD = new QCheckBox(CreateCase); - CBBoundaryD->setObjectName(QString::fromUtf8("CBBoundaryD")); - - hboxLayout5->addWidget(CBBoundaryD); - - CBBoundaryA = new QCheckBox(CreateCase); - CBBoundaryA->setObjectName(QString::fromUtf8("CBBoundaryA")); - - hboxLayout5->addWidget(CBBoundaryA); - - - gridLayout->addLayout(hboxLayout5, 9, 0, 1, 1); + spacerItem4 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); - spacerItem3 = new QSpacerItem(20, 2, QSizePolicy::Minimum, QSizePolicy::Expanding); + gridLayout->addItem(spacerItem4, 8, 0, 1, 1); - gridLayout->addItem(spacerItem3, 10, 0, 1, 1); + spacerItem5 = new QSpacerItem(20, 2, QSizePolicy::Minimum, QSizePolicy::Expanding); - spacerItem4 = new QSpacerItem(20, 18, QSizePolicy::Minimum, QSizePolicy::Expanding); - - gridLayout->addItem(spacerItem4, 2, 1, 1, 1); - - GBBoundaryD = new QGroupBox(CreateCase); - GBBoundaryD->setObjectName(QString::fromUtf8("GBBoundaryD")); - QSizePolicy sizePolicy1(static_cast(0), static_cast(0)); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(GBBoundaryD->sizePolicy().hasHeightForWidth()); - GBBoundaryD->setSizePolicy(sizePolicy1); - gridLayout2 = new QGridLayout(GBBoundaryD); - gridLayout2->setSpacing(6); - gridLayout2->setMargin(9); - gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); - PBBoundaryDiHelp = new QPushButton(GBBoundaryD); - PBBoundaryDiHelp->setObjectName(QString::fromUtf8("PBBoundaryDiHelp")); - PBBoundaryDiHelp->setAutoDefault(false); + gridLayout->addItem(spacerItem5, 10, 0, 1, 1); - gridLayout2->addWidget(PBBoundaryDiHelp, 0, 4, 1, 1); + spacerItem6 = new QSpacerItem(20, 18, QSizePolicy::Minimum, QSizePolicy::Expanding); - PBBoundaryDiNew = new QPushButton(GBBoundaryD); - PBBoundaryDiNew->setObjectName(QString::fromUtf8("PBBoundaryDiNew")); - PBBoundaryDiNew->setAutoDefault(false); - - gridLayout2->addWidget(PBBoundaryDiNew, 0, 3, 1, 1); - - PBBoundaryDiEdit = new QPushButton(GBBoundaryD); - PBBoundaryDiEdit->setObjectName(QString::fromUtf8("PBBoundaryDiEdit")); - PBBoundaryDiEdit->setAutoDefault(false); - - gridLayout2->addWidget(PBBoundaryDiEdit, 0, 2, 1, 1); - - spacerItem5 = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum); - - gridLayout2->addItem(spacerItem5, 0, 1, 1, 1); - - CBBoundaryDi = new QComboBox(GBBoundaryD); - CBBoundaryDi->setObjectName(QString::fromUtf8("CBBoundaryDi")); - CBBoundaryDi->setSizeAdjustPolicy(QComboBox::AdjustToContents); - - gridLayout2->addWidget(CBBoundaryDi, 0, 0, 1, 1); - - - gridLayout->addWidget(GBBoundaryD, 11, 0, 1, 1); + gridLayout->addItem(spacerItem6, 2, 1, 1, 1); retranslateUi(CreateCase); - QSize size(597, 850); + QSize size(599, 925); size = size.expandedTo(CreateCase->minimumSizeHint()); CreateCase->resize(size); @@ -365,20 +433,31 @@ public: void retranslateUi(QDialog *CreateCase) { CreateCase->setWindowTitle(QApplication::translate("CreateCase", "Create a case", 0, QApplication::UnicodeUTF8)); - GroupButtons->setTitle(QString()); - buttonOk->setText(QApplication::translate("CreateCase", "OK", 0, QApplication::UnicodeUTF8)); - buttonApply->setText(QApplication::translate("CreateCase", "Apply", 0, QApplication::UnicodeUTF8)); - buttonCancel->setText(QApplication::translate("CreateCase", "Cancel", 0, QApplication::UnicodeUTF8)); - buttonHelp->setText(QApplication::translate("CreateCase", "Help", 0, QApplication::UnicodeUTF8)); + GBAdvancedOptions->setTitle(QApplication::translate("CreateCase", "Advanced options", 0, QApplication::UnicodeUTF8)); + TLMinimalDiameter->setText(QApplication::translate("CreateCase", "Minimal diameter", 0, QApplication::UnicodeUTF8)); + TLMaximalLevel->setText(QApplication::translate("CreateCase", "Maximal level", 0, QApplication::UnicodeUTF8)); GBBoundaryA->setTitle(QApplication::translate("CreateCase", "Analytical boundary", 0, QApplication::UnicodeUTF8)); - PBBoundaryAnNew->setText(QApplication::translate("CreateCase", "New", 0, QApplication::UnicodeUTF8)); - PBBoundaryAnHelp->setText(QApplication::translate("CreateCase", "Help", 0, QApplication::UnicodeUTF8)); if (TWBoundary->columnCount() < 1) TWBoundary->setColumnCount(1); QTableWidgetItem *__colItem = new QTableWidgetItem(); __colItem->setText(QApplication::translate("CreateCase", "a_virer", 0, QApplication::UnicodeUTF8)); TWBoundary->setHorizontalHeaderItem(0, __colItem); + PBBoundaryAnEdit->setText(QApplication::translate("CreateCase", "Edit", 0, QApplication::UnicodeUTF8)); + PBBoundaryAnNew->setText(QApplication::translate("CreateCase", "New", 0, QApplication::UnicodeUTF8)); + PBBoundaryAnHelp->setText(QApplication::translate("CreateCase", "Help", 0, QApplication::UnicodeUTF8)); + CBAdvanced->setText(QApplication::translate("CreateCase", "Advanced options", 0, QApplication::UnicodeUTF8)); + GBBoundaryD->setTitle(QApplication::translate("CreateCase", "Discrete boundary", 0, QApplication::UnicodeUTF8)); + PBBoundaryDiEdit->setText(QApplication::translate("CreateCase", "Edit", 0, QApplication::UnicodeUTF8)); + PBBoundaryDiNew->setText(QApplication::translate("CreateCase", "New", 0, QApplication::UnicodeUTF8)); + PBBoundaryDiHelp->setText(QApplication::translate("CreateCase", "Help", 0, QApplication::UnicodeUTF8)); + GroupButtons->setTitle(QString()); + buttonHelp->setText(QApplication::translate("CreateCase", "Help", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("CreateCase", "Cancel", 0, QApplication::UnicodeUTF8)); + buttonApply->setText(QApplication::translate("CreateCase", "Apply", 0, QApplication::UnicodeUTF8)); + buttonOk->setText(QApplication::translate("CreateCase", "OK", 0, QApplication::UnicodeUTF8)); + CBBoundaryD->setText(QApplication::translate("CreateCase", "Discrete boundary", 0, QApplication::UnicodeUTF8)); + CBBoundaryA->setText(QApplication::translate("CreateCase", "Analytical boundary", 0, QApplication::UnicodeUTF8)); Name->setText(QApplication::translate("CreateCase", "Name", 0, QApplication::UnicodeUTF8)); Directory->setText(QApplication::translate("CreateCase", "Directory", 0, QApplication::UnicodeUTF8)); PushDir->setText(QString()); @@ -391,12 +470,6 @@ public: RB1NpM->setText(QApplication::translate("CreateCase", "1 hanging node per mesh", 0, QApplication::UnicodeUTF8)); RB1NpA->setText(QApplication::translate("CreateCase", "1 node per edge", 0, QApplication::UnicodeUTF8)); RBQuelconque->setText(QApplication::translate("CreateCase", "Free", 0, QApplication::UnicodeUTF8)); - CBBoundaryD->setText(QApplication::translate("CreateCase", "Discrete boundary", 0, QApplication::UnicodeUTF8)); - CBBoundaryA->setText(QApplication::translate("CreateCase", "Analytical boundary", 0, QApplication::UnicodeUTF8)); - GBBoundaryD->setTitle(QApplication::translate("CreateCase", "Discrete boundary", 0, QApplication::UnicodeUTF8)); - PBBoundaryDiHelp->setText(QApplication::translate("CreateCase", "Help", 0, QApplication::UnicodeUTF8)); - PBBoundaryDiNew->setText(QApplication::translate("CreateCase", "New", 0, QApplication::UnicodeUTF8)); - PBBoundaryDiEdit->setText(QApplication::translate("CreateCase", "Edit", 0, QApplication::UnicodeUTF8)); Q_UNUSED(CreateCase); } // retranslateUi diff --git a/src/HOMARDGUI/CreateCase.ui b/src/HOMARDGUI/CreateCase.ui index 64884b5c..9deb2cde 100644 --- a/src/HOMARDGUI/CreateCase.ui +++ b/src/HOMARDGUI/CreateCase.ui @@ -5,8 +5,8 @@ 0 0 - 597 - 850 + 599 + 925 @@ -30,10 +30,10 @@ 6 - - + + - + Advanced options @@ -42,42 +42,65 @@ 6 - - - - OK + + + + Qt::Horizontal - - false + + + 40 + 20 + - + - - + + + + + 0 + 0 + 0 + 0 + + - Apply + Minimal diameter - + false - - - - Cancel + + + + 99 - - false + + + + + + 5 - + + + + 0 + 0 + 0 + 0 + + - Help + Maximal level - + false @@ -90,29 +113,66 @@ 548 - 300 + 200 Analytical boundary - + - 410 + 4 20 - 120 - 110 + 371 + 161 + + + + QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::NoEditTriggers|QAbstractItemView::SelectedClicked + + + true + + + 0 + + + 1 + + + + a_virer + + + + + + + 430 + 40 + 77 + 95 - + 0 6 - + + + + Edit + + + false + + + + New @@ -122,7 +182,7 @@ - + Help @@ -134,34 +194,172 @@ - - - - 4 - 20 - 371 - 270 - - - - QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::NoEditTriggers|QAbstractItemView::SelectedClicked + + + + + + Advanced options + + + + + + + + 0 + 0 + 0 + 0 + + + + Discrete boundary + + + + 9 - - true + + 6 - - 0 + + + + Edit + + + false + + + + + + + New + + + false + + + + + + + -1 + + + QComboBox::AdjustToContents + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + Help + + + false + + + + + + + + + + + + + + 9 - - 1 + + 6 - + + + + Help + + + false + + + + + + + Cancel + + + false + + + + + + + Apply + + + false + + + + + + + OK + + + false + + + + + + + + + + 0 + + + 6 + + + - a_virer + Discrete boundary - - - + + + + + + Analytical boundary + + + + @@ -371,30 +569,6 @@ - - - - 0 - - - 6 - - - - - Discrete boundary - - - - - - - Analytical boundary - - - - - @@ -421,85 +595,6 @@ - - - - - 0 - 0 - 0 - 0 - - - - Discrete boundary - - - - 9 - - - 6 - - - - - Help - - - false - - - - - - - New - - - false - - - - - - - Edit - - - false - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 40 - 13 - - - - - - - - -1 - - - QComboBox::AdjustToContents - - - - - - diff --git a/src/HOMARDGUI/CreateHypothesis.h b/src/HOMARDGUI/CreateHypothesis.h index edac2890..2d7d60d2 100644 --- a/src/HOMARDGUI/CreateHypothesis.h +++ b/src/HOMARDGUI/CreateHypothesis.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading ui file 'CreateHypothesis.ui' ** -** Created: Tue Mar 15 11:33:40 2011 +** Created: Fri Sep 2 15:33:39 2011 ** by: Qt User Interface Compiler version 4.2.1 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! @@ -61,6 +61,7 @@ public: QHBoxLayout *hboxLayout3; QRadioButton *RBL2; QRadioButton *RBInf; + QCheckBox *CBJump; QHBoxLayout *hboxLayout4; QGroupBox *GBRefinementThresholds; QGridLayout *gridLayout4; @@ -274,6 +275,11 @@ public: vboxLayout->addLayout(hboxLayout3); + CBJump = new QCheckBox(GBFieldManagement); + CBJump->setObjectName(QString::fromUtf8("CBJump")); + + vboxLayout->addWidget(CBJump); + hboxLayout2->addLayout(vboxLayout); @@ -333,7 +339,7 @@ public: SpinBox_RAbs = new QDoubleSpinBox(GBRefinementThresholds); SpinBox_RAbs->setObjectName(QString::fromUtf8("SpinBox_RAbs")); SpinBox_RAbs->setEnabled(false); - SpinBox_RAbs->setDecimals(3); + SpinBox_RAbs->setDecimals(8); SpinBox_RAbs->setMaximum(100); SpinBox_RAbs->setSingleStep(0.1); @@ -391,7 +397,7 @@ public: SpinBox_CAbs = new QDoubleSpinBox(GBCoarseningThresholds); SpinBox_CAbs->setObjectName(QString::fromUtf8("SpinBox_CAbs")); SpinBox_CAbs->setEnabled(false); - SpinBox_CAbs->setDecimals(3); + SpinBox_CAbs->setDecimals(8); SpinBox_CAbs->setMaximum(100); SpinBox_CAbs->setSingleStep(0.1); @@ -579,6 +585,7 @@ public: TWCMP->setHorizontalHeaderItem(1, __colItem1); RBL2->setText(QApplication::translate("CreateHypothesis", "L2 norm", 0, QApplication::UnicodeUTF8)); RBInf->setText(QApplication::translate("CreateHypothesis", "Infinite norm", 0, QApplication::UnicodeUTF8)); + CBJump->setText(QApplication::translate("CreateHypothesis", "Jump between elements", 0, QApplication::UnicodeUTF8)); GBRefinementThresholds->setTitle(QApplication::translate("CreateHypothesis", "Refinement threshold", 0, QApplication::UnicodeUTF8)); RBRPE->setText(QApplication::translate("CreateHypothesis", "Percentage of meshes", 0, QApplication::UnicodeUTF8)); SpinBox_RPE->setSuffix(QApplication::translate("CreateHypothesis", " %", 0, QApplication::UnicodeUTF8)); diff --git a/src/HOMARDGUI/CreateHypothesis.ui b/src/HOMARDGUI/CreateHypothesis.ui index 7bc8b7f4..a5a91ed4 100644 --- a/src/HOMARDGUI/CreateHypothesis.ui +++ b/src/HOMARDGUI/CreateHypothesis.ui @@ -309,6 +309,13 @@ + + + + Jump between elements + + + @@ -412,7 +419,7 @@ false - 3 + 8 100.000000000000000 @@ -515,7 +522,7 @@ false - 3 + 8 100.000000000000000 diff --git a/src/HOMARDGUI/CreateIteration.h b/src/HOMARDGUI/CreateIteration.h index b116d885..36fa710d 100644 --- a/src/HOMARDGUI/CreateIteration.h +++ b/src/HOMARDGUI/CreateIteration.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading ui file 'CreateIteration.ui' ** -** Created: Tue Mar 15 10:16:06 2011 +** Created: Thu Sep 1 13:07:29 2011 ** by: Qt User Interface Compiler version 4.2.1 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! @@ -29,34 +29,34 @@ class Ui_CreateIteration { public: QGridLayout *gridLayout; + QGroupBox *GBField; + QGridLayout *gridLayout1; + QLineEdit *LEFieldFile; + QSpacerItem *spacerItem; + QRadioButton *RBChosen; + QSpacerItem *spacerItem1; + QSpinBox *SpinBox_Rank; + QLabel *Rank; + QSpacerItem *spacerItem2; + QSpinBox *SpinBox_TimeStep; + QLabel *TimeStep; + QSpacerItem *spacerItem3; + QRadioButton *RBLast; + QRadioButton *RBNo; + QPushButton *PushFieldFile; + QLabel *FieldFile; QLabel *Iteration_Name; QLineEdit *LEIterationName; QLabel *Iter_Parent; - QSpacerItem *spacerItem; + QSpacerItem *spacerItem4; QPushButton *PBIterParent; QLineEdit *LEIterationParentName; QLabel *Mesh_n; - QSpacerItem *spacerItem1; + QSpacerItem *spacerItem5; QLineEdit *LEMeshName_n; - QSpacerItem *spacerItem2; + QSpacerItem *spacerItem6; QLabel *Mesh_np1; QLineEdit *LEMeshName_np1; - QSpacerItem *spacerItem3; - QGroupBox *GBField; - QGridLayout *gridLayout1; - QLabel *FieldFile; - QPushButton *PushFieldFile; - QLineEdit *LEFieldFile; - QSpacerItem *spacerItem4; - QRadioButton *RBNo; - QRadioButton *RBLast; - QRadioButton *RBChosen; - QSpacerItem *spacerItem5; - QLabel *TimeStep; - QSpinBox *SpinBox_TimeStep; - QSpacerItem *spacerItem6; - QLabel *Rank; - QSpinBox *SpinBox_Rank; QSpacerItem *spacerItem7; QSpacerItem *spacerItem8; QGroupBox *Hypothese; @@ -80,6 +80,90 @@ public: gridLayout->setSpacing(6); gridLayout->setMargin(9); gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + GBField = new QGroupBox(CreateIteration); + GBField->setObjectName(QString::fromUtf8("GBField")); + gridLayout1 = new QGridLayout(GBField); + gridLayout1->setSpacing(6); + gridLayout1->setMargin(9); + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + LEFieldFile = new QLineEdit(GBField); + LEFieldFile->setObjectName(QString::fromUtf8("LEFieldFile")); + LEFieldFile->setMinimumSize(QSize(282, 21)); + + gridLayout1->addWidget(LEFieldFile, 0, 2, 1, 5); + + spacerItem = new QSpacerItem(138, 18, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout1->addItem(spacerItem, 1, 3, 1, 4); + + RBChosen = new QRadioButton(GBField); + RBChosen->setObjectName(QString::fromUtf8("RBChosen")); + + gridLayout1->addWidget(RBChosen, 2, 6, 1, 1); + + spacerItem1 = new QSpacerItem(255, 13, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout1->addItem(spacerItem1, 4, 6, 1, 1); + + SpinBox_Rank = new QSpinBox(GBField); + SpinBox_Rank->setObjectName(QString::fromUtf8("SpinBox_Rank")); + SpinBox_Rank->setMaximum(1010000); + SpinBox_Rank->setMinimum(-1); + SpinBox_Rank->setValue(1); + + gridLayout1->addWidget(SpinBox_Rank, 4, 5, 1, 1); + + Rank = new QLabel(GBField); + Rank->setObjectName(QString::fromUtf8("Rank")); + + gridLayout1->addWidget(Rank, 4, 4, 1, 1); + + spacerItem2 = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum); + + gridLayout1->addItem(spacerItem2, 4, 2, 1, 2); + + SpinBox_TimeStep = new QSpinBox(GBField); + SpinBox_TimeStep->setObjectName(QString::fromUtf8("SpinBox_TimeStep")); + SpinBox_TimeStep->setMaximum(100000); + SpinBox_TimeStep->setMinimum(-2); + SpinBox_TimeStep->setValue(-1); + + gridLayout1->addWidget(SpinBox_TimeStep, 4, 1, 1, 1); + + TimeStep = new QLabel(GBField); + TimeStep->setObjectName(QString::fromUtf8("TimeStep")); + + gridLayout1->addWidget(TimeStep, 4, 0, 1, 1); + + spacerItem3 = new QSpacerItem(138, 28, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout1->addItem(spacerItem3, 3, 0, 1, 4); + + RBLast = new QRadioButton(GBField); + RBLast->setObjectName(QString::fromUtf8("RBLast")); + + gridLayout1->addWidget(RBLast, 2, 3, 1, 3); + + RBNo = new QRadioButton(GBField); + RBNo->setObjectName(QString::fromUtf8("RBNo")); + RBNo->setCheckable(true); + RBNo->setChecked(true); + + gridLayout1->addWidget(RBNo, 2, 0, 1, 3); + + PushFieldFile = new QPushButton(GBField); + PushFieldFile->setObjectName(QString::fromUtf8("PushFieldFile")); + + gridLayout1->addWidget(PushFieldFile, 0, 1, 1, 1); + + FieldFile = new QLabel(GBField); + FieldFile->setObjectName(QString::fromUtf8("FieldFile")); + + gridLayout1->addWidget(FieldFile, 0, 0, 1, 1); + + + gridLayout->addWidget(GBField, 6, 0, 1, 4); + Iteration_Name = new QLabel(CreateIteration); Iteration_Name->setObjectName(QString::fromUtf8("Iteration_Name")); @@ -97,9 +181,9 @@ public: gridLayout->addWidget(Iter_Parent, 1, 0, 1, 1); - spacerItem = new QSpacerItem(20, 24, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem4 = new QSpacerItem(20, 24, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout->addItem(spacerItem, 1, 1, 1, 1); + gridLayout->addItem(spacerItem4, 1, 1, 1, 1); PBIterParent = new QPushButton(CreateIteration); PBIterParent->setObjectName(QString::fromUtf8("PBIterParent")); @@ -121,9 +205,9 @@ public: gridLayout->addWidget(Mesh_n, 2, 0, 1, 1); - spacerItem1 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem5 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout->addItem(spacerItem1, 2, 1, 1, 1); + gridLayout->addItem(spacerItem5, 2, 1, 1, 1); LEMeshName_n = new QLineEdit(CreateIteration); LEMeshName_n->setObjectName(QString::fromUtf8("LEMeshName_n")); @@ -133,9 +217,9 @@ public: gridLayout->addWidget(LEMeshName_n, 2, 2, 1, 2); - spacerItem2 = new QSpacerItem(20, 22, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem6 = new QSpacerItem(20, 22, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout->addItem(spacerItem2, 3, 1, 1, 1); + gridLayout->addItem(spacerItem6, 3, 1, 1, 1); Mesh_np1 = new QLabel(CreateIteration); Mesh_np1->setObjectName(QString::fromUtf8("Mesh_np1")); @@ -149,93 +233,9 @@ public: gridLayout->addWidget(LEMeshName_np1, 4, 2, 1, 2); - spacerItem3 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding); - - gridLayout->addItem(spacerItem3, 5, 1, 1, 1); - - GBField = new QGroupBox(CreateIteration); - GBField->setObjectName(QString::fromUtf8("GBField")); - gridLayout1 = new QGridLayout(GBField); - gridLayout1->setSpacing(6); - gridLayout1->setMargin(9); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); - FieldFile = new QLabel(GBField); - FieldFile->setObjectName(QString::fromUtf8("FieldFile")); - - gridLayout1->addWidget(FieldFile, 0, 0, 1, 1); - - PushFieldFile = new QPushButton(GBField); - PushFieldFile->setObjectName(QString::fromUtf8("PushFieldFile")); - - gridLayout1->addWidget(PushFieldFile, 0, 1, 1, 1); - - LEFieldFile = new QLineEdit(GBField); - LEFieldFile->setObjectName(QString::fromUtf8("LEFieldFile")); - LEFieldFile->setMinimumSize(QSize(282, 21)); - - gridLayout1->addWidget(LEFieldFile, 0, 2, 1, 6); - - spacerItem4 = new QSpacerItem(138, 18, QSizePolicy::Minimum, QSizePolicy::Expanding); - - gridLayout1->addItem(spacerItem4, 1, 3, 1, 4); - - RBNo = new QRadioButton(GBField); - RBNo->setObjectName(QString::fromUtf8("RBNo")); - RBNo->setCheckable(true); - RBNo->setChecked(true); - - gridLayout1->addWidget(RBNo, 2, 0, 1, 3); - - RBLast = new QRadioButton(GBField); - RBLast->setObjectName(QString::fromUtf8("RBLast")); - - gridLayout1->addWidget(RBLast, 2, 3, 1, 3); - - RBChosen = new QRadioButton(GBField); - RBChosen->setObjectName(QString::fromUtf8("RBChosen")); - - gridLayout1->addWidget(RBChosen, 2, 7, 1, 1); + spacerItem7 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding); - spacerItem5 = new QSpacerItem(138, 28, QSizePolicy::Minimum, QSizePolicy::Expanding); - - gridLayout1->addItem(spacerItem5, 3, 0, 1, 4); - - TimeStep = new QLabel(GBField); - TimeStep->setObjectName(QString::fromUtf8("TimeStep")); - - gridLayout1->addWidget(TimeStep, 4, 0, 1, 1); - - SpinBox_TimeStep = new QSpinBox(GBField); - SpinBox_TimeStep->setObjectName(QString::fromUtf8("SpinBox_TimeStep")); - SpinBox_TimeStep->setMaximum(100000); - SpinBox_TimeStep->setMinimum(-2); - SpinBox_TimeStep->setValue(-1); - - gridLayout1->addWidget(SpinBox_TimeStep, 4, 1, 1, 1); - - spacerItem6 = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum); - - gridLayout1->addItem(spacerItem6, 4, 2, 1, 2); - - Rank = new QLabel(GBField); - Rank->setObjectName(QString::fromUtf8("Rank")); - - gridLayout1->addWidget(Rank, 4, 4, 1, 1); - - SpinBox_Rank = new QSpinBox(GBField); - SpinBox_Rank->setObjectName(QString::fromUtf8("SpinBox_Rank")); - SpinBox_Rank->setMaximum(1010000); - SpinBox_Rank->setMinimum(-1); - SpinBox_Rank->setValue(1); - - gridLayout1->addWidget(SpinBox_Rank, 4, 5, 1, 1); - - spacerItem7 = new QSpacerItem(255, 13, QSizePolicy::Expanding, QSizePolicy::Minimum); - - gridLayout1->addItem(spacerItem7, 4, 6, 1, 2); - - - gridLayout->addWidget(GBField, 6, 0, 1, 4); + gridLayout->addItem(spacerItem7, 5, 1, 1, 1); spacerItem8 = new QSpacerItem(20, 22, QSizePolicy::Minimum, QSizePolicy::Expanding); @@ -272,7 +272,7 @@ public: spacerItem10 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout->addItem(spacerItem10, 9, 0, 1, 2); + gridLayout->addItem(spacerItem10, 9, 0, 1, 1); GroupButtons = new QGroupBox(CreateIteration); GroupButtons->setObjectName(QString::fromUtf8("GroupButtons")); @@ -308,7 +308,7 @@ public: retranslateUi(CreateIteration); - QSize size(587, 598); + QSize size(610, 598); size = size.expandedTo(CreateIteration->minimumSizeHint()); CreateIteration->resize(size); @@ -322,19 +322,19 @@ public: void retranslateUi(QWidget *CreateIteration) { CreateIteration->setWindowTitle(QApplication::translate("CreateIteration", "Create an iteration", 0, QApplication::UnicodeUTF8)); + GBField->setTitle(QApplication::translate("CreateIteration", "Field information", 0, QApplication::UnicodeUTF8)); + RBChosen->setText(QApplication::translate("CreateIteration", "Chosen time step", 0, QApplication::UnicodeUTF8)); + Rank->setText(QApplication::translate("CreateIteration", "Rank", 0, QApplication::UnicodeUTF8)); + TimeStep->setText(QApplication::translate("CreateIteration", "Time step", 0, QApplication::UnicodeUTF8)); + RBLast->setText(QApplication::translate("CreateIteration", "Last time step", 0, QApplication::UnicodeUTF8)); + RBNo->setText(QApplication::translate("CreateIteration", "No time step", 0, QApplication::UnicodeUTF8)); + PushFieldFile->setText(QString()); + FieldFile->setText(QApplication::translate("CreateIteration", "Field file", 0, QApplication::UnicodeUTF8)); Iteration_Name->setText(QApplication::translate("CreateIteration", "Iteration Name", 0, QApplication::UnicodeUTF8)); Iter_Parent->setText(QApplication::translate("CreateIteration", "Previous iteration", 0, QApplication::UnicodeUTF8)); PBIterParent->setText(QString()); Mesh_n->setText(QApplication::translate("CreateIteration", "Mesh n", 0, QApplication::UnicodeUTF8)); Mesh_np1->setText(QApplication::translate("CreateIteration", "Mesh n+1", 0, QApplication::UnicodeUTF8)); - GBField->setTitle(QApplication::translate("CreateIteration", "Field information", 0, QApplication::UnicodeUTF8)); - FieldFile->setText(QApplication::translate("CreateIteration", "Field file", 0, QApplication::UnicodeUTF8)); - PushFieldFile->setText(QString()); - RBNo->setText(QApplication::translate("CreateIteration", "No time step", 0, QApplication::UnicodeUTF8)); - RBLast->setText(QApplication::translate("CreateIteration", "Last time step", 0, QApplication::UnicodeUTF8)); - RBChosen->setText(QApplication::translate("CreateIteration", "Chosen time step", 0, QApplication::UnicodeUTF8)); - TimeStep->setText(QApplication::translate("CreateIteration", "Time step", 0, QApplication::UnicodeUTF8)); - Rank->setText(QApplication::translate("CreateIteration", "Rank", 0, QApplication::UnicodeUTF8)); Hypothese->setTitle(QApplication::translate("CreateIteration", "Hypothesis", 0, QApplication::UnicodeUTF8)); PBHypoEdit->setText(QApplication::translate("CreateIteration", "Edit", 0, QApplication::UnicodeUTF8)); PBHypoNew->setText(QApplication::translate("CreateIteration", "New", 0, QApplication::UnicodeUTF8)); diff --git a/src/HOMARDGUI/CreateIteration.ui b/src/HOMARDGUI/CreateIteration.ui index 1b2eb8e4..01a0d38b 100644 --- a/src/HOMARDGUI/CreateIteration.ui +++ b/src/HOMARDGUI/CreateIteration.ui @@ -5,7 +5,7 @@ 0 0 - 587 + 610 598 @@ -19,6 +19,170 @@ 6 + + + + Field information + + + + 9 + + + 6 + + + + + + 282 + 21 + + + + + + + + Qt::Vertical + + + + 138 + 18 + + + + + + + + Chosen time step + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 255 + 13 + + + + + + + + 1010000 + + + -1 + + + 1 + + + + + + + Rank + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + 100000 + + + -2 + + + -1 + + + + + + + Time step + + + + + + + Qt::Vertical + + + + 138 + 28 + + + + + + + + Last time step + + + + + + + No time step + + + true + + + true + + + + + + + + + + + + + + Field file + + + + + + @@ -173,170 +337,6 @@ - - - - Field information - - - - 9 - - - 6 - - - - - Field file - - - - - - - - - - - - - - - 282 - 21 - - - - - - - - Qt::Vertical - - - - 138 - 18 - - - - - - - - No time step - - - true - - - true - - - - - - - Last time step - - - - - - - Chosen time step - - - - - - - Qt::Vertical - - - - 138 - 28 - - - - - - - - Time step - - - - - - - 100000 - - - -2 - - - -1 - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 40 - 13 - - - - - - - - Rank - - - - - - - 1010000 - - - -1 - - - 1 - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 255 - 13 - - - - - - - @@ -405,7 +405,7 @@ - + Qt::Vertical diff --git a/src/HOMARDGUI/CreateListGroup.h b/src/HOMARDGUI/CreateListGroup.h index 49c5a17f..f57ebc20 100644 --- a/src/HOMARDGUI/CreateListGroup.h +++ b/src/HOMARDGUI/CreateListGroup.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading ui file 'CreateListGroup.ui' ** -** Created: Thu Feb 24 09:10:36 2011 +** Created: Thu Sep 1 16:35:32 2011 ** by: Qt User Interface Compiler version 4.2.1 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! @@ -24,15 +24,15 @@ class Ui_CreateListGroup { public: QGridLayout *gridLayout; - QGroupBox *GBOptions; - QGridLayout *gridLayout1; - QTableWidget *TWGroupe; QGroupBox *GBButtons; - QGridLayout *gridLayout2; - QPushButton *buttonOk; - QPushButton *buttonApply; - QPushButton *buttonCancel; + QGridLayout *gridLayout1; QPushButton *buttonHelp; + QPushButton *buttonCancel; + QPushButton *buttonApply; + QPushButton *buttonOk; + QGroupBox *GBOptions; + QGridLayout *gridLayout2; + QTableWidget *TWGroupe; void setupUi(QDialog *CreateListGroup) { @@ -48,51 +48,51 @@ public: gridLayout->setSpacing(6); gridLayout->setMargin(9); gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - GBOptions = new QGroupBox(CreateListGroup); - GBOptions->setObjectName(QString::fromUtf8("GBOptions")); - gridLayout1 = new QGridLayout(GBOptions); + GBButtons = new QGroupBox(CreateListGroup); + GBButtons->setObjectName(QString::fromUtf8("GBButtons")); + gridLayout1 = new QGridLayout(GBButtons); gridLayout1->setSpacing(6); gridLayout1->setMargin(9); gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); - TWGroupe = new QTableWidget(GBOptions); - TWGroupe->setObjectName(QString::fromUtf8("TWGroupe")); - TWGroupe->setShowGrid(true); - TWGroupe->setRowCount(0); - TWGroupe->setColumnCount(2); - - gridLayout1->addWidget(TWGroupe, 0, 0, 1, 1); - + buttonHelp = new QPushButton(GBButtons); + buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - gridLayout->addWidget(GBOptions, 0, 0, 1, 1); + gridLayout1->addWidget(buttonHelp, 0, 3, 1, 1); - GBButtons = new QGroupBox(CreateListGroup); - GBButtons->setObjectName(QString::fromUtf8("GBButtons")); - gridLayout2 = new QGridLayout(GBButtons); - gridLayout2->setSpacing(6); - gridLayout2->setMargin(9); - gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); - buttonOk = new QPushButton(GBButtons); - buttonOk->setObjectName(QString::fromUtf8("buttonOk")); + buttonCancel = new QPushButton(GBButtons); + buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - gridLayout2->addWidget(buttonOk, 0, 0, 1, 1); + gridLayout1->addWidget(buttonCancel, 0, 2, 1, 1); buttonApply = new QPushButton(GBButtons); buttonApply->setObjectName(QString::fromUtf8("buttonApply")); - gridLayout2->addWidget(buttonApply, 0, 1, 1, 1); + gridLayout1->addWidget(buttonApply, 0, 1, 1, 1); - buttonCancel = new QPushButton(GBButtons); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + buttonOk = new QPushButton(GBButtons); + buttonOk->setObjectName(QString::fromUtf8("buttonOk")); - gridLayout2->addWidget(buttonCancel, 0, 2, 1, 1); + gridLayout1->addWidget(buttonOk, 0, 0, 1, 1); - buttonHelp = new QPushButton(GBButtons); - buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - gridLayout2->addWidget(buttonHelp, 0, 3, 1, 1); + gridLayout->addWidget(GBButtons, 1, 0, 1, 1); + + GBOptions = new QGroupBox(CreateListGroup); + GBOptions->setObjectName(QString::fromUtf8("GBOptions")); + gridLayout2 = new QGridLayout(GBOptions); + gridLayout2->setSpacing(6); + gridLayout2->setMargin(9); + gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); + TWGroupe = new QTableWidget(GBOptions); + TWGroupe->setObjectName(QString::fromUtf8("TWGroupe")); + TWGroupe->setShowGrid(true); + TWGroupe->setRowCount(0); + TWGroupe->setColumnCount(2); + + gridLayout2->addWidget(TWGroupe, 0, 0, 1, 1); - gridLayout->addWidget(GBButtons, 1, 0, 1, 1); + gridLayout->addWidget(GBOptions, 0, 0, 1, 1); retranslateUi(CreateListGroup); @@ -108,6 +108,11 @@ public: void retranslateUi(QDialog *CreateListGroup) { CreateListGroup->setWindowTitle(QApplication::translate("CreateListGroup", "Selection of groups", 0, QApplication::UnicodeUTF8)); + GBButtons->setTitle(QString()); + buttonHelp->setText(QApplication::translate("CreateListGroup", "Help", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("CreateListGroup", "Cancel", 0, QApplication::UnicodeUTF8)); + buttonApply->setText(QApplication::translate("CreateListGroup", "Apply", 0, QApplication::UnicodeUTF8)); + buttonOk->setText(QApplication::translate("CreateListGroup", "OK", 0, QApplication::UnicodeUTF8)); GBOptions->setTitle(QApplication::translate("CreateListGroup", "Selected groups", 0, QApplication::UnicodeUTF8)); if (TWGroupe->columnCount() < 2) TWGroupe->setColumnCount(2); @@ -119,11 +124,6 @@ public: QTableWidgetItem *__colItem1 = new QTableWidgetItem(); __colItem1->setText(QApplication::translate("CreateListGroup", "Group", 0, QApplication::UnicodeUTF8)); TWGroupe->setHorizontalHeaderItem(1, __colItem1); - GBButtons->setTitle(QString()); - buttonOk->setText(QApplication::translate("CreateListGroup", "OK", 0, QApplication::UnicodeUTF8)); - buttonApply->setText(QApplication::translate("CreateListGroup", "Apply", 0, QApplication::UnicodeUTF8)); - buttonCancel->setText(QApplication::translate("CreateListGroup", "Cancel", 0, QApplication::UnicodeUTF8)); - buttonHelp->setText(QApplication::translate("CreateListGroup", "Help", 0, QApplication::UnicodeUTF8)); Q_UNUSED(CreateListGroup); } // retranslateUi diff --git a/src/HOMARDGUI/CreateListGroup.ui b/src/HOMARDGUI/CreateListGroup.ui index f20fdde0..06c60611 100644 --- a/src/HOMARDGUI/CreateListGroup.ui +++ b/src/HOMARDGUI/CreateListGroup.ui @@ -33,6 +33,49 @@ 6 + + + + + + + + 9 + + + 6 + + + + + Help + + + + + + + Cancel + + + + + + + Apply + + + + + + + OK + + + + + + @@ -71,49 +114,6 @@ - - - - - - - - 9 - - - 6 - - - - - OK - - - - - - - Apply - - - - - - - Cancel - - - - - - - Help - - - - - - diff --git a/src/HOMARDGUI/CreateZone.h b/src/HOMARDGUI/CreateZone.h index 1bbdb5a3..70b1d125 100644 --- a/src/HOMARDGUI/CreateZone.h +++ b/src/HOMARDGUI/CreateZone.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading ui file 'CreateZone.ui' ** -** Created: Thu Feb 24 09:10:36 2011 +** Created: Thu Sep 1 13:03:50 2011 ** by: Qt User Interface Compiler version 4.2.1 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -28,14 +27,48 @@ class Ui_CreateZone { public: QGridLayout *gridLayout; - QLabel *Name; - QLineEdit *LEZoneName; + QGroupBox *GBButtons; + QGridLayout *gridLayout1; + QPushButton *buttonHelp; + QPushButton *buttonCancel; + QPushButton *buttonApply; + QPushButton *buttonOk; QGroupBox *TypeZone; - QHBoxLayout *hboxLayout; - QRadioButton *RBBox; + QGridLayout *gridLayout2; QRadioButton *RBSphere; + QRadioButton *RBPipe; + QRadioButton *RBCylinder; + QRadioButton *RBBox; + QGroupBox *gBCylindre; + QGridLayout *gridLayout3; + QDoubleSpinBox *SpinBox_Haut; + QLabel *TLHaut; + QLabel *TLRadius; + QDoubleSpinBox *SpinBox_Xaxis; + QDoubleSpinBox *SpinBox_Yaxis; + QDoubleSpinBox *SpinBox_Zaxis; + QLabel *TLZaxis; + QLabel *TLYaxis; + QLabel *TLXaxis; + QDoubleSpinBox *SpinBox_Ybase; + QLabel *TLYbase; + QLabel *TLZbase; + QDoubleSpinBox *SpinBox_Zbase; + QDoubleSpinBox *SpinBox_Radius; + QLabel *TLXbase; + QDoubleSpinBox *SpinBox_Xbase; + QGroupBox *gBSphere; + QGridLayout *gridLayout4; + QLabel *TLXcentre; + QDoubleSpinBox *SpinBox_Xcentre; + QLabel *TLYcentre; + QDoubleSpinBox *SpinBox_Ycentre; + QLabel *TLRayon; + QDoubleSpinBox *SpinBox_Rayon; + QLabel *TLZcentre; + QDoubleSpinBox *SpinBox_Zcentre; QGroupBox *gBBox; - QGridLayout *gridLayout1; + QGridLayout *gridLayout5; QLabel *TLXmini; QDoubleSpinBox *SpinBox_Xmini; QLabel *TLYmini; @@ -48,22 +81,28 @@ public: QLabel *TLYmaxi; QDoubleSpinBox *SpinBox_Xmaxi; QDoubleSpinBox *SpinBox_Ymaxi; - QGroupBox *gBSphere; - QGridLayout *gridLayout2; - QLabel *TLXcentre; - QDoubleSpinBox *SpinBox_Xcentre; - QLabel *TLYcentre; - QDoubleSpinBox *SpinBox_Ycentre; - QLabel *TLRayon; - QDoubleSpinBox *SpinBox_Rayon; - QLabel *TLZcentre; - QDoubleSpinBox *SpinBox_Zcentre; - QGroupBox *GBButtons; - QHBoxLayout *hboxLayout1; - QPushButton *buttonOk; - QPushButton *buttonApply; - QPushButton *buttonCancel; - QPushButton *buttonHelp; + QLineEdit *LEZoneName; + QLabel *Name; + QGroupBox *gBPipe; + QGridLayout *gridLayout6; + QLabel *TLHaut_p; + QDoubleSpinBox *SpinBox_Xbase_p; + QLabel *TLXbase_p; + QDoubleSpinBox *SpinBox_Radius_int; + QDoubleSpinBox *SpinBox_Zbase_p; + QLabel *TLRadius_int; + QLabel *TLZbase_p; + QLabel *TLYbase_p; + QDoubleSpinBox *SpinBox_Ybase_p; + QLabel *TLXaxis_p; + QLabel *TLYaxis_p; + QLabel *TLZaxis_p; + QDoubleSpinBox *SpinBox_Zaxis_p; + QDoubleSpinBox *SpinBox_Yaxis_p; + QDoubleSpinBox *SpinBox_Xaxis_p; + QDoubleSpinBox *SpinBox_Radius_ext; + QLabel *TLRadius_ext; + QDoubleSpinBox *SpinBox_Haut_p; void setupUi(QDialog *CreateZone) { @@ -74,201 +113,273 @@ public: gridLayout->setSpacing(6); gridLayout->setMargin(9); gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - Name = new QLabel(CreateZone); - Name->setObjectName(QString::fromUtf8("Name")); + GBButtons = new QGroupBox(CreateZone); + GBButtons->setObjectName(QString::fromUtf8("GBButtons")); + QSizePolicy sizePolicy(static_cast(0), static_cast(0)); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(GBButtons->sizePolicy().hasHeightForWidth()); + GBButtons->setSizePolicy(sizePolicy); + gridLayout1 = new QGridLayout(GBButtons); + gridLayout1->setSpacing(6); + gridLayout1->setMargin(9); + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + buttonHelp = new QPushButton(GBButtons); + buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - gridLayout->addWidget(Name, 0, 0, 1, 1); + gridLayout1->addWidget(buttonHelp, 0, 3, 1, 1); - LEZoneName = new QLineEdit(CreateZone); - LEZoneName->setObjectName(QString::fromUtf8("LEZoneName")); - LEZoneName->setMaxLength(32); + buttonCancel = new QPushButton(GBButtons); + buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - gridLayout->addWidget(LEZoneName, 0, 1, 1, 1); + gridLayout1->addWidget(buttonCancel, 0, 2, 1, 1); + + buttonApply = new QPushButton(GBButtons); + buttonApply->setObjectName(QString::fromUtf8("buttonApply")); + + gridLayout1->addWidget(buttonApply, 0, 1, 1, 1); + + buttonOk = new QPushButton(GBButtons); + buttonOk->setObjectName(QString::fromUtf8("buttonOk")); + + gridLayout1->addWidget(buttonOk, 0, 0, 1, 1); + + + gridLayout->addWidget(GBButtons, 6, 0, 1, 2); TypeZone = new QGroupBox(CreateZone); TypeZone->setObjectName(QString::fromUtf8("TypeZone")); - QSizePolicy sizePolicy(static_cast(0), static_cast(0)); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(TypeZone->sizePolicy().hasHeightForWidth()); - TypeZone->setSizePolicy(sizePolicy); + QSizePolicy sizePolicy1(static_cast(0), static_cast(0)); + sizePolicy1.setHorizontalStretch(0); + sizePolicy1.setVerticalStretch(0); + sizePolicy1.setHeightForWidth(TypeZone->sizePolicy().hasHeightForWidth()); + TypeZone->setSizePolicy(sizePolicy1); TypeZone->setMinimumSize(QSize(340, 0)); - hboxLayout = new QHBoxLayout(TypeZone); - hboxLayout->setSpacing(6); - hboxLayout->setMargin(9); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + gridLayout2 = new QGridLayout(TypeZone); + gridLayout2->setSpacing(6); + gridLayout2->setMargin(9); + gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); + RBSphere = new QRadioButton(TypeZone); + RBSphere->setObjectName(QString::fromUtf8("RBSphere")); + RBSphere->setIcon(QIcon(QString::fromUtf8("../../resources/zone_spherepoint.png"))); + + gridLayout2->addWidget(RBSphere, 0, 3, 1, 1); + + RBPipe = new QRadioButton(TypeZone); + RBPipe->setObjectName(QString::fromUtf8("RBPipe")); + RBPipe->setIcon(QIcon(QString::fromUtf8("../../resources/pipe.png"))); + + gridLayout2->addWidget(RBPipe, 0, 2, 1, 1); + + RBCylinder = new QRadioButton(TypeZone); + RBCylinder->setObjectName(QString::fromUtf8("RBCylinder")); + RBCylinder->setIcon(QIcon(QString::fromUtf8("../../resources/cylinderpointvector.png"))); + + gridLayout2->addWidget(RBCylinder, 0, 1, 1, 1); + RBBox = new QRadioButton(TypeZone); RBBox->setObjectName(QString::fromUtf8("RBBox")); RBBox->setIcon(QIcon(QString::fromUtf8("../../resources/zone_boxdxyz.png"))); RBBox->setCheckable(true); RBBox->setChecked(true); - hboxLayout->addWidget(RBBox); - - RBSphere = new QRadioButton(TypeZone); - RBSphere->setObjectName(QString::fromUtf8("RBSphere")); - RBSphere->setIcon(QIcon(QString::fromUtf8("../../resources/zone_spherepoint.png"))); - - hboxLayout->addWidget(RBSphere); + gridLayout2->addWidget(RBBox, 0, 0, 1, 1); gridLayout->addWidget(TypeZone, 1, 0, 1, 2); - gBBox = new QGroupBox(CreateZone); - gBBox->setObjectName(QString::fromUtf8("gBBox")); - QSizePolicy sizePolicy1(static_cast(0), static_cast(0)); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(gBBox->sizePolicy().hasHeightForWidth()); - gBBox->setSizePolicy(sizePolicy1); - gridLayout1 = new QGridLayout(gBBox); - gridLayout1->setSpacing(6); - gridLayout1->setMargin(9); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); - TLXmini = new QLabel(gBBox); - TLXmini->setObjectName(QString::fromUtf8("TLXmini")); + gBCylindre = new QGroupBox(CreateZone); + gBCylindre->setObjectName(QString::fromUtf8("gBCylindre")); QSizePolicy sizePolicy2(static_cast(0), static_cast(0)); sizePolicy2.setHorizontalStretch(0); sizePolicy2.setVerticalStretch(0); - sizePolicy2.setHeightForWidth(TLXmini->sizePolicy().hasHeightForWidth()); - TLXmini->setSizePolicy(sizePolicy2); - TLXmini->setWordWrap(false); - - gridLayout1->addWidget(TLXmini, 0, 0, 1, 1); - - SpinBox_Xmini = new QDoubleSpinBox(gBBox); - SpinBox_Xmini->setObjectName(QString::fromUtf8("SpinBox_Xmini")); - SpinBox_Xmini->setDecimals(5); - SpinBox_Xmini->setMaximum(1e+09); - SpinBox_Xmini->setMinimum(-1e+09); - SpinBox_Xmini->setValue(0); - - gridLayout1->addWidget(SpinBox_Xmini, 0, 1, 1, 1); - - TLYmini = new QLabel(gBBox); - TLYmini->setObjectName(QString::fromUtf8("TLYmini")); + sizePolicy2.setHeightForWidth(gBCylindre->sizePolicy().hasHeightForWidth()); + gBCylindre->setSizePolicy(sizePolicy2); + gBCylindre->setFocusPolicy(Qt::TabFocus); + gridLayout3 = new QGridLayout(gBCylindre); + gridLayout3->setSpacing(6); + gridLayout3->setMargin(9); + gridLayout3->setObjectName(QString::fromUtf8("gridLayout3")); + SpinBox_Haut = new QDoubleSpinBox(gBCylindre); + SpinBox_Haut->setObjectName(QString::fromUtf8("SpinBox_Haut")); + SpinBox_Haut->setDecimals(5); + SpinBox_Haut->setMaximum(1e+09); + + gridLayout3->addWidget(SpinBox_Haut, 4, 1, 1, 1); + + TLHaut = new QLabel(gBCylindre); + TLHaut->setObjectName(QString::fromUtf8("TLHaut")); QSizePolicy sizePolicy3(static_cast(0), static_cast(0)); sizePolicy3.setHorizontalStretch(0); sizePolicy3.setVerticalStretch(0); - sizePolicy3.setHeightForWidth(TLYmini->sizePolicy().hasHeightForWidth()); - TLYmini->setSizePolicy(sizePolicy3); - TLYmini->setWordWrap(false); + sizePolicy3.setHeightForWidth(TLHaut->sizePolicy().hasHeightForWidth()); + TLHaut->setSizePolicy(sizePolicy3); + TLHaut->setWordWrap(false); - gridLayout1->addWidget(TLYmini, 1, 0, 1, 1); + gridLayout3->addWidget(TLHaut, 4, 0, 1, 1); - SpinBox_Ymini = new QDoubleSpinBox(gBBox); - SpinBox_Ymini->setObjectName(QString::fromUtf8("SpinBox_Ymini")); - SpinBox_Ymini->setDecimals(5); - SpinBox_Ymini->setMaximum(1e+09); - SpinBox_Ymini->setMinimum(-1e+09); - SpinBox_Ymini->setValue(0); - - gridLayout1->addWidget(SpinBox_Ymini, 1, 1, 1, 1); - - TLZmini = new QLabel(gBBox); - TLZmini->setObjectName(QString::fromUtf8("TLZmini")); + TLRadius = new QLabel(gBCylindre); + TLRadius->setObjectName(QString::fromUtf8("TLRadius")); QSizePolicy sizePolicy4(static_cast(0), static_cast(0)); sizePolicy4.setHorizontalStretch(0); sizePolicy4.setVerticalStretch(0); - sizePolicy4.setHeightForWidth(TLZmini->sizePolicy().hasHeightForWidth()); - TLZmini->setSizePolicy(sizePolicy4); - TLZmini->setWordWrap(false); + sizePolicy4.setHeightForWidth(TLRadius->sizePolicy().hasHeightForWidth()); + TLRadius->setSizePolicy(sizePolicy4); + TLRadius->setWordWrap(false); - gridLayout1->addWidget(TLZmini, 2, 0, 1, 1); + gridLayout3->addWidget(TLRadius, 3, 0, 1, 1); - SpinBox_Zmini = new QDoubleSpinBox(gBBox); - SpinBox_Zmini->setObjectName(QString::fromUtf8("SpinBox_Zmini")); - SpinBox_Zmini->setDecimals(5); - SpinBox_Zmini->setMaximum(1e+09); - SpinBox_Zmini->setMinimum(-1e+09); - SpinBox_Zmini->setValue(0); + SpinBox_Xaxis = new QDoubleSpinBox(gBCylindre); + SpinBox_Xaxis->setObjectName(QString::fromUtf8("SpinBox_Xaxis")); + SpinBox_Xaxis->setDecimals(5); + SpinBox_Xaxis->setMaximum(1e+09); + SpinBox_Xaxis->setMinimum(-1e+09); + SpinBox_Xaxis->setValue(0); - gridLayout1->addWidget(SpinBox_Zmini, 2, 1, 1, 1); + gridLayout3->addWidget(SpinBox_Xaxis, 0, 3, 1, 1); - TLXmaxi = new QLabel(gBBox); - TLXmaxi->setObjectName(QString::fromUtf8("TLXmaxi")); + SpinBox_Yaxis = new QDoubleSpinBox(gBCylindre); + SpinBox_Yaxis->setObjectName(QString::fromUtf8("SpinBox_Yaxis")); + SpinBox_Yaxis->setDecimals(5); + SpinBox_Yaxis->setMaximum(1e+09); + SpinBox_Yaxis->setMinimum(-1e+09); + SpinBox_Yaxis->setValue(0); + + gridLayout3->addWidget(SpinBox_Yaxis, 1, 3, 1, 1); + + SpinBox_Zaxis = new QDoubleSpinBox(gBCylindre); + SpinBox_Zaxis->setObjectName(QString::fromUtf8("SpinBox_Zaxis")); + SpinBox_Zaxis->setDecimals(5); + SpinBox_Zaxis->setMaximum(1e+09); + SpinBox_Zaxis->setMinimum(-1e+09); + SpinBox_Zaxis->setValue(0); + + gridLayout3->addWidget(SpinBox_Zaxis, 2, 3, 1, 1); + + TLZaxis = new QLabel(gBCylindre); + TLZaxis->setObjectName(QString::fromUtf8("TLZaxis")); QSizePolicy sizePolicy5(static_cast(0), static_cast(0)); sizePolicy5.setHorizontalStretch(0); sizePolicy5.setVerticalStretch(0); - sizePolicy5.setHeightForWidth(TLXmaxi->sizePolicy().hasHeightForWidth()); - TLXmaxi->setSizePolicy(sizePolicy5); - TLXmaxi->setWordWrap(false); + sizePolicy5.setHeightForWidth(TLZaxis->sizePolicy().hasHeightForWidth()); + TLZaxis->setSizePolicy(sizePolicy5); + TLZaxis->setWordWrap(false); - gridLayout1->addWidget(TLXmaxi, 0, 2, 1, 1); + gridLayout3->addWidget(TLZaxis, 2, 2, 1, 1); - TLZmaxi = new QLabel(gBBox); - TLZmaxi->setObjectName(QString::fromUtf8("TLZmaxi")); + TLYaxis = new QLabel(gBCylindre); + TLYaxis->setObjectName(QString::fromUtf8("TLYaxis")); QSizePolicy sizePolicy6(static_cast(0), static_cast(0)); sizePolicy6.setHorizontalStretch(0); sizePolicy6.setVerticalStretch(0); - sizePolicy6.setHeightForWidth(TLZmaxi->sizePolicy().hasHeightForWidth()); - TLZmaxi->setSizePolicy(sizePolicy6); - TLZmaxi->setWordWrap(false); + sizePolicy6.setHeightForWidth(TLYaxis->sizePolicy().hasHeightForWidth()); + TLYaxis->setSizePolicy(sizePolicy6); + TLYaxis->setWordWrap(false); - gridLayout1->addWidget(TLZmaxi, 2, 2, 1, 1); + gridLayout3->addWidget(TLYaxis, 1, 2, 1, 1); - SpinBox_Zmaxi = new QDoubleSpinBox(gBBox); - SpinBox_Zmaxi->setObjectName(QString::fromUtf8("SpinBox_Zmaxi")); - SpinBox_Zmaxi->setDecimals(5); - SpinBox_Zmaxi->setMaximum(1e+09); - SpinBox_Zmaxi->setMinimum(-1e+09); - SpinBox_Zmaxi->setValue(0); - - gridLayout1->addWidget(SpinBox_Zmaxi, 2, 3, 1, 1); - - TLYmaxi = new QLabel(gBBox); - TLYmaxi->setObjectName(QString::fromUtf8("TLYmaxi")); + TLXaxis = new QLabel(gBCylindre); + TLXaxis->setObjectName(QString::fromUtf8("TLXaxis")); QSizePolicy sizePolicy7(static_cast(0), static_cast(0)); sizePolicy7.setHorizontalStretch(0); sizePolicy7.setVerticalStretch(0); - sizePolicy7.setHeightForWidth(TLYmaxi->sizePolicy().hasHeightForWidth()); - TLYmaxi->setSizePolicy(sizePolicy7); - TLYmaxi->setWordWrap(false); + sizePolicy7.setHeightForWidth(TLXaxis->sizePolicy().hasHeightForWidth()); + TLXaxis->setSizePolicy(sizePolicy7); + TLXaxis->setWordWrap(false); - gridLayout1->addWidget(TLYmaxi, 1, 2, 1, 1); + gridLayout3->addWidget(TLXaxis, 0, 2, 1, 1); - SpinBox_Xmaxi = new QDoubleSpinBox(gBBox); - SpinBox_Xmaxi->setObjectName(QString::fromUtf8("SpinBox_Xmaxi")); - SpinBox_Xmaxi->setDecimals(5); - SpinBox_Xmaxi->setMaximum(1e+09); - SpinBox_Xmaxi->setMinimum(-1e+09); - SpinBox_Xmaxi->setValue(0); + SpinBox_Ybase = new QDoubleSpinBox(gBCylindre); + SpinBox_Ybase->setObjectName(QString::fromUtf8("SpinBox_Ybase")); + SpinBox_Ybase->setDecimals(5); + SpinBox_Ybase->setMaximum(1e+09); + SpinBox_Ybase->setMinimum(-1e+09); + SpinBox_Ybase->setValue(0); - gridLayout1->addWidget(SpinBox_Xmaxi, 0, 3, 1, 1); + gridLayout3->addWidget(SpinBox_Ybase, 1, 1, 1, 1); - SpinBox_Ymaxi = new QDoubleSpinBox(gBBox); - SpinBox_Ymaxi->setObjectName(QString::fromUtf8("SpinBox_Ymaxi")); - SpinBox_Ymaxi->setDecimals(5); - SpinBox_Ymaxi->setMaximum(1e+09); - SpinBox_Ymaxi->setMinimum(-1e+09); - SpinBox_Ymaxi->setValue(0); + TLYbase = new QLabel(gBCylindre); + TLYbase->setObjectName(QString::fromUtf8("TLYbase")); + QSizePolicy sizePolicy8(static_cast(0), static_cast(0)); + sizePolicy8.setHorizontalStretch(0); + sizePolicy8.setVerticalStretch(0); + sizePolicy8.setHeightForWidth(TLYbase->sizePolicy().hasHeightForWidth()); + TLYbase->setSizePolicy(sizePolicy8); + TLYbase->setWordWrap(false); + + gridLayout3->addWidget(TLYbase, 1, 0, 1, 1); - gridLayout1->addWidget(SpinBox_Ymaxi, 1, 3, 1, 1); + TLZbase = new QLabel(gBCylindre); + TLZbase->setObjectName(QString::fromUtf8("TLZbase")); + QSizePolicy sizePolicy9(static_cast(0), static_cast(0)); + sizePolicy9.setHorizontalStretch(0); + sizePolicy9.setVerticalStretch(0); + sizePolicy9.setHeightForWidth(TLZbase->sizePolicy().hasHeightForWidth()); + TLZbase->setSizePolicy(sizePolicy9); + TLZbase->setWordWrap(false); + gridLayout3->addWidget(TLZbase, 2, 0, 1, 1); - gridLayout->addWidget(gBBox, 2, 0, 1, 2); + SpinBox_Zbase = new QDoubleSpinBox(gBCylindre); + SpinBox_Zbase->setObjectName(QString::fromUtf8("SpinBox_Zbase")); + SpinBox_Zbase->setDecimals(5); + SpinBox_Zbase->setMaximum(1e+09); + SpinBox_Zbase->setMinimum(-1e+09); + SpinBox_Zbase->setValue(0); + + gridLayout3->addWidget(SpinBox_Zbase, 2, 1, 1, 1); + + SpinBox_Radius = new QDoubleSpinBox(gBCylindre); + SpinBox_Radius->setObjectName(QString::fromUtf8("SpinBox_Radius")); + SpinBox_Radius->setDecimals(5); + SpinBox_Radius->setMaximum(1e+09); + + gridLayout3->addWidget(SpinBox_Radius, 3, 1, 1, 1); + + TLXbase = new QLabel(gBCylindre); + TLXbase->setObjectName(QString::fromUtf8("TLXbase")); + QSizePolicy sizePolicy10(static_cast(0), static_cast(0)); + sizePolicy10.setHorizontalStretch(0); + sizePolicy10.setVerticalStretch(0); + sizePolicy10.setHeightForWidth(TLXbase->sizePolicy().hasHeightForWidth()); + TLXbase->setSizePolicy(sizePolicy10); + TLXbase->setWordWrap(false); + + gridLayout3->addWidget(TLXbase, 0, 0, 1, 1); + + SpinBox_Xbase = new QDoubleSpinBox(gBCylindre); + SpinBox_Xbase->setObjectName(QString::fromUtf8("SpinBox_Xbase")); + SpinBox_Xbase->setDecimals(5); + SpinBox_Xbase->setMaximum(1e+09); + SpinBox_Xbase->setMinimum(-1e+09); + SpinBox_Xbase->setValue(0); + + gridLayout3->addWidget(SpinBox_Xbase, 0, 1, 1, 1); + + + gridLayout->addWidget(gBCylindre, 4, 0, 1, 2); gBSphere = new QGroupBox(CreateZone); gBSphere->setObjectName(QString::fromUtf8("gBSphere")); - QSizePolicy sizePolicy8(static_cast(0), static_cast(0)); - sizePolicy8.setHorizontalStretch(0); - sizePolicy8.setVerticalStretch(0); - sizePolicy8.setHeightForWidth(gBSphere->sizePolicy().hasHeightForWidth()); - gBSphere->setSizePolicy(sizePolicy8); - gridLayout2 = new QGridLayout(gBSphere); - gridLayout2->setSpacing(6); - gridLayout2->setMargin(9); - gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); + QSizePolicy sizePolicy11(static_cast(0), static_cast(0)); + sizePolicy11.setHorizontalStretch(0); + sizePolicy11.setVerticalStretch(0); + sizePolicy11.setHeightForWidth(gBSphere->sizePolicy().hasHeightForWidth()); + gBSphere->setSizePolicy(sizePolicy11); + gridLayout4 = new QGridLayout(gBSphere); + gridLayout4->setSpacing(6); + gridLayout4->setMargin(9); + gridLayout4->setObjectName(QString::fromUtf8("gridLayout4")); TLXcentre = new QLabel(gBSphere); TLXcentre->setObjectName(QString::fromUtf8("TLXcentre")); - QSizePolicy sizePolicy9(static_cast(0), static_cast(0)); - sizePolicy9.setHorizontalStretch(0); - sizePolicy9.setVerticalStretch(0); - sizePolicy9.setHeightForWidth(TLXcentre->sizePolicy().hasHeightForWidth()); - TLXcentre->setSizePolicy(sizePolicy9); + QSizePolicy sizePolicy12(static_cast(0), static_cast(0)); + sizePolicy12.setHorizontalStretch(0); + sizePolicy12.setVerticalStretch(0); + sizePolicy12.setHeightForWidth(TLXcentre->sizePolicy().hasHeightForWidth()); + TLXcentre->setSizePolicy(sizePolicy12); TLXcentre->setWordWrap(false); - gridLayout2->addWidget(TLXcentre, 0, 0, 1, 1); + gridLayout4->addWidget(TLXcentre, 0, 0, 1, 1); SpinBox_Xcentre = new QDoubleSpinBox(gBSphere); SpinBox_Xcentre->setObjectName(QString::fromUtf8("SpinBox_Xcentre")); @@ -277,18 +388,18 @@ public: SpinBox_Xcentre->setMinimum(-1e+09); SpinBox_Xcentre->setValue(0); - gridLayout2->addWidget(SpinBox_Xcentre, 0, 1, 1, 1); + gridLayout4->addWidget(SpinBox_Xcentre, 0, 1, 1, 1); TLYcentre = new QLabel(gBSphere); TLYcentre->setObjectName(QString::fromUtf8("TLYcentre")); - QSizePolicy sizePolicy10(static_cast(0), static_cast(0)); - sizePolicy10.setHorizontalStretch(0); - sizePolicy10.setVerticalStretch(0); - sizePolicy10.setHeightForWidth(TLYcentre->sizePolicy().hasHeightForWidth()); - TLYcentre->setSizePolicy(sizePolicy10); + QSizePolicy sizePolicy13(static_cast(0), static_cast(0)); + sizePolicy13.setHorizontalStretch(0); + sizePolicy13.setVerticalStretch(0); + sizePolicy13.setHeightForWidth(TLYcentre->sizePolicy().hasHeightForWidth()); + TLYcentre->setSizePolicy(sizePolicy13); TLYcentre->setWordWrap(false); - gridLayout2->addWidget(TLYcentre, 1, 0, 1, 1); + gridLayout4->addWidget(TLYcentre, 1, 0, 1, 1); SpinBox_Ycentre = new QDoubleSpinBox(gBSphere); SpinBox_Ycentre->setObjectName(QString::fromUtf8("SpinBox_Ycentre")); @@ -297,18 +408,18 @@ public: SpinBox_Ycentre->setMinimum(-1e+09); SpinBox_Ycentre->setValue(0); - gridLayout2->addWidget(SpinBox_Ycentre, 1, 1, 1, 1); + gridLayout4->addWidget(SpinBox_Ycentre, 1, 1, 1, 1); TLRayon = new QLabel(gBSphere); TLRayon->setObjectName(QString::fromUtf8("TLRayon")); - QSizePolicy sizePolicy11(static_cast(0), static_cast(0)); - sizePolicy11.setHorizontalStretch(0); - sizePolicy11.setVerticalStretch(0); - sizePolicy11.setHeightForWidth(TLRayon->sizePolicy().hasHeightForWidth()); - TLRayon->setSizePolicy(sizePolicy11); + QSizePolicy sizePolicy14(static_cast(0), static_cast(0)); + sizePolicy14.setHorizontalStretch(0); + sizePolicy14.setVerticalStretch(0); + sizePolicy14.setHeightForWidth(TLRayon->sizePolicy().hasHeightForWidth()); + TLRayon->setSizePolicy(sizePolicy14); TLRayon->setWordWrap(false); - gridLayout2->addWidget(TLRayon, 1, 2, 1, 1); + gridLayout4->addWidget(TLRayon, 1, 2, 1, 1); SpinBox_Rayon = new QDoubleSpinBox(gBSphere); SpinBox_Rayon->setObjectName(QString::fromUtf8("SpinBox_Rayon")); @@ -317,18 +428,18 @@ public: SpinBox_Rayon->setMinimum(-1e+09); SpinBox_Rayon->setValue(0); - gridLayout2->addWidget(SpinBox_Rayon, 1, 3, 1, 1); + gridLayout4->addWidget(SpinBox_Rayon, 1, 3, 1, 1); TLZcentre = new QLabel(gBSphere); TLZcentre->setObjectName(QString::fromUtf8("TLZcentre")); - QSizePolicy sizePolicy12(static_cast(0), static_cast(0)); - sizePolicy12.setHorizontalStretch(0); - sizePolicy12.setVerticalStretch(0); - sizePolicy12.setHeightForWidth(TLZcentre->sizePolicy().hasHeightForWidth()); - TLZcentre->setSizePolicy(sizePolicy12); + QSizePolicy sizePolicy15(static_cast(0), static_cast(0)); + sizePolicy15.setHorizontalStretch(0); + sizePolicy15.setVerticalStretch(0); + sizePolicy15.setHeightForWidth(TLZcentre->sizePolicy().hasHeightForWidth()); + TLZcentre->setSizePolicy(sizePolicy15); TLZcentre->setWordWrap(false); - gridLayout2->addWidget(TLZcentre, 2, 0, 1, 1); + gridLayout4->addWidget(TLZcentre, 2, 0, 1, 1); SpinBox_Zcentre = new QDoubleSpinBox(gBSphere); SpinBox_Zcentre->setObjectName(QString::fromUtf8("SpinBox_Zcentre")); @@ -337,49 +448,348 @@ public: SpinBox_Zcentre->setMinimum(-1e+09); SpinBox_Zcentre->setValue(0); - gridLayout2->addWidget(SpinBox_Zcentre, 2, 1, 1, 1); + gridLayout4->addWidget(SpinBox_Zcentre, 2, 1, 1, 1); gridLayout->addWidget(gBSphere, 3, 0, 1, 2); - GBButtons = new QGroupBox(CreateZone); - GBButtons->setObjectName(QString::fromUtf8("GBButtons")); - QSizePolicy sizePolicy13(static_cast(0), static_cast(0)); - sizePolicy13.setHorizontalStretch(0); - sizePolicy13.setVerticalStretch(0); - sizePolicy13.setHeightForWidth(GBButtons->sizePolicy().hasHeightForWidth()); - GBButtons->setSizePolicy(sizePolicy13); - hboxLayout1 = new QHBoxLayout(GBButtons); - hboxLayout1->setSpacing(6); - hboxLayout1->setMargin(9); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); - buttonOk = new QPushButton(GBButtons); - buttonOk->setObjectName(QString::fromUtf8("buttonOk")); + gBBox = new QGroupBox(CreateZone); + gBBox->setObjectName(QString::fromUtf8("gBBox")); + QSizePolicy sizePolicy16(static_cast(0), static_cast(0)); + sizePolicy16.setHorizontalStretch(0); + sizePolicy16.setVerticalStretch(0); + sizePolicy16.setHeightForWidth(gBBox->sizePolicy().hasHeightForWidth()); + gBBox->setSizePolicy(sizePolicy16); + gridLayout5 = new QGridLayout(gBBox); + gridLayout5->setSpacing(6); + gridLayout5->setMargin(9); + gridLayout5->setObjectName(QString::fromUtf8("gridLayout5")); + TLXmini = new QLabel(gBBox); + TLXmini->setObjectName(QString::fromUtf8("TLXmini")); + QSizePolicy sizePolicy17(static_cast(0), static_cast(0)); + sizePolicy17.setHorizontalStretch(0); + sizePolicy17.setVerticalStretch(0); + sizePolicy17.setHeightForWidth(TLXmini->sizePolicy().hasHeightForWidth()); + TLXmini->setSizePolicy(sizePolicy17); + TLXmini->setWordWrap(false); - hboxLayout1->addWidget(buttonOk); + gridLayout5->addWidget(TLXmini, 0, 0, 1, 1); - buttonApply = new QPushButton(GBButtons); - buttonApply->setObjectName(QString::fromUtf8("buttonApply")); + SpinBox_Xmini = new QDoubleSpinBox(gBBox); + SpinBox_Xmini->setObjectName(QString::fromUtf8("SpinBox_Xmini")); + SpinBox_Xmini->setDecimals(5); + SpinBox_Xmini->setMaximum(1e+09); + SpinBox_Xmini->setMinimum(-1e+09); + SpinBox_Xmini->setValue(0); - hboxLayout1->addWidget(buttonApply); + gridLayout5->addWidget(SpinBox_Xmini, 0, 1, 1, 1); - buttonCancel = new QPushButton(GBButtons); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + TLYmini = new QLabel(gBBox); + TLYmini->setObjectName(QString::fromUtf8("TLYmini")); + QSizePolicy sizePolicy18(static_cast(0), static_cast(0)); + sizePolicy18.setHorizontalStretch(0); + sizePolicy18.setVerticalStretch(0); + sizePolicy18.setHeightForWidth(TLYmini->sizePolicy().hasHeightForWidth()); + TLYmini->setSizePolicy(sizePolicy18); + TLYmini->setWordWrap(false); - hboxLayout1->addWidget(buttonCancel); + gridLayout5->addWidget(TLYmini, 1, 0, 1, 1); - buttonHelp = new QPushButton(GBButtons); - buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); + SpinBox_Ymini = new QDoubleSpinBox(gBBox); + SpinBox_Ymini->setObjectName(QString::fromUtf8("SpinBox_Ymini")); + SpinBox_Ymini->setDecimals(5); + SpinBox_Ymini->setMaximum(1e+09); + SpinBox_Ymini->setMinimum(-1e+09); + SpinBox_Ymini->setValue(0); - hboxLayout1->addWidget(buttonHelp); + gridLayout5->addWidget(SpinBox_Ymini, 1, 1, 1, 1); + TLZmini = new QLabel(gBBox); + TLZmini->setObjectName(QString::fromUtf8("TLZmini")); + QSizePolicy sizePolicy19(static_cast(0), static_cast(0)); + sizePolicy19.setHorizontalStretch(0); + sizePolicy19.setVerticalStretch(0); + sizePolicy19.setHeightForWidth(TLZmini->sizePolicy().hasHeightForWidth()); + TLZmini->setSizePolicy(sizePolicy19); + TLZmini->setWordWrap(false); - gridLayout->addWidget(GBButtons, 4, 0, 1, 2); + gridLayout5->addWidget(TLZmini, 2, 0, 1, 1); + + SpinBox_Zmini = new QDoubleSpinBox(gBBox); + SpinBox_Zmini->setObjectName(QString::fromUtf8("SpinBox_Zmini")); + SpinBox_Zmini->setDecimals(5); + SpinBox_Zmini->setMaximum(1e+09); + SpinBox_Zmini->setMinimum(-1e+09); + SpinBox_Zmini->setValue(0); + + gridLayout5->addWidget(SpinBox_Zmini, 2, 1, 1, 1); + + TLXmaxi = new QLabel(gBBox); + TLXmaxi->setObjectName(QString::fromUtf8("TLXmaxi")); + QSizePolicy sizePolicy20(static_cast(0), static_cast(0)); + sizePolicy20.setHorizontalStretch(0); + sizePolicy20.setVerticalStretch(0); + sizePolicy20.setHeightForWidth(TLXmaxi->sizePolicy().hasHeightForWidth()); + TLXmaxi->setSizePolicy(sizePolicy20); + TLXmaxi->setWordWrap(false); + + gridLayout5->addWidget(TLXmaxi, 0, 2, 1, 1); + + TLZmaxi = new QLabel(gBBox); + TLZmaxi->setObjectName(QString::fromUtf8("TLZmaxi")); + QSizePolicy sizePolicy21(static_cast(0), static_cast(0)); + sizePolicy21.setHorizontalStretch(0); + sizePolicy21.setVerticalStretch(0); + sizePolicy21.setHeightForWidth(TLZmaxi->sizePolicy().hasHeightForWidth()); + TLZmaxi->setSizePolicy(sizePolicy21); + TLZmaxi->setWordWrap(false); + + gridLayout5->addWidget(TLZmaxi, 2, 2, 1, 1); + + SpinBox_Zmaxi = new QDoubleSpinBox(gBBox); + SpinBox_Zmaxi->setObjectName(QString::fromUtf8("SpinBox_Zmaxi")); + SpinBox_Zmaxi->setDecimals(5); + SpinBox_Zmaxi->setMaximum(1e+09); + SpinBox_Zmaxi->setMinimum(-1e+09); + SpinBox_Zmaxi->setValue(0); + + gridLayout5->addWidget(SpinBox_Zmaxi, 2, 3, 1, 1); + + TLYmaxi = new QLabel(gBBox); + TLYmaxi->setObjectName(QString::fromUtf8("TLYmaxi")); + QSizePolicy sizePolicy22(static_cast(0), static_cast(0)); + sizePolicy22.setHorizontalStretch(0); + sizePolicy22.setVerticalStretch(0); + sizePolicy22.setHeightForWidth(TLYmaxi->sizePolicy().hasHeightForWidth()); + TLYmaxi->setSizePolicy(sizePolicy22); + TLYmaxi->setWordWrap(false); + + gridLayout5->addWidget(TLYmaxi, 1, 2, 1, 1); + + SpinBox_Xmaxi = new QDoubleSpinBox(gBBox); + SpinBox_Xmaxi->setObjectName(QString::fromUtf8("SpinBox_Xmaxi")); + SpinBox_Xmaxi->setDecimals(5); + SpinBox_Xmaxi->setMaximum(1e+09); + SpinBox_Xmaxi->setMinimum(-1e+09); + SpinBox_Xmaxi->setValue(0); + + gridLayout5->addWidget(SpinBox_Xmaxi, 0, 3, 1, 1); + + SpinBox_Ymaxi = new QDoubleSpinBox(gBBox); + SpinBox_Ymaxi->setObjectName(QString::fromUtf8("SpinBox_Ymaxi")); + SpinBox_Ymaxi->setDecimals(5); + SpinBox_Ymaxi->setMaximum(1e+09); + SpinBox_Ymaxi->setMinimum(-1e+09); + SpinBox_Ymaxi->setValue(0); + + gridLayout5->addWidget(SpinBox_Ymaxi, 1, 3, 1, 1); + + + gridLayout->addWidget(gBBox, 2, 0, 1, 2); + + LEZoneName = new QLineEdit(CreateZone); + LEZoneName->setObjectName(QString::fromUtf8("LEZoneName")); + LEZoneName->setMaxLength(32); + + gridLayout->addWidget(LEZoneName, 0, 1, 1, 1); + + Name = new QLabel(CreateZone); + Name->setObjectName(QString::fromUtf8("Name")); + + gridLayout->addWidget(Name, 0, 0, 1, 1); + + gBPipe = new QGroupBox(CreateZone); + gBPipe->setObjectName(QString::fromUtf8("gBPipe")); + QSizePolicy sizePolicy23(static_cast(0), static_cast(0)); + sizePolicy23.setHorizontalStretch(0); + sizePolicy23.setVerticalStretch(0); + sizePolicy23.setHeightForWidth(gBPipe->sizePolicy().hasHeightForWidth()); + gBPipe->setSizePolicy(sizePolicy23); + gridLayout6 = new QGridLayout(gBPipe); + gridLayout6->setSpacing(6); + gridLayout6->setMargin(9); + gridLayout6->setObjectName(QString::fromUtf8("gridLayout6")); + TLHaut_p = new QLabel(gBPipe); + TLHaut_p->setObjectName(QString::fromUtf8("TLHaut_p")); + QSizePolicy sizePolicy24(static_cast(0), static_cast(0)); + sizePolicy24.setHorizontalStretch(0); + sizePolicy24.setVerticalStretch(0); + sizePolicy24.setHeightForWidth(TLHaut_p->sizePolicy().hasHeightForWidth()); + TLHaut_p->setSizePolicy(sizePolicy24); + TLHaut_p->setWordWrap(false); + + gridLayout6->addWidget(TLHaut_p, 4, 0, 1, 1); + + SpinBox_Xbase_p = new QDoubleSpinBox(gBPipe); + SpinBox_Xbase_p->setObjectName(QString::fromUtf8("SpinBox_Xbase_p")); + SpinBox_Xbase_p->setDecimals(5); + SpinBox_Xbase_p->setMaximum(1e+09); + SpinBox_Xbase_p->setMinimum(-1e+09); + SpinBox_Xbase_p->setValue(0); + + gridLayout6->addWidget(SpinBox_Xbase_p, 0, 1, 1, 1); + + TLXbase_p = new QLabel(gBPipe); + TLXbase_p->setObjectName(QString::fromUtf8("TLXbase_p")); + QSizePolicy sizePolicy25(static_cast(0), static_cast(0)); + sizePolicy25.setHorizontalStretch(0); + sizePolicy25.setVerticalStretch(0); + sizePolicy25.setHeightForWidth(TLXbase_p->sizePolicy().hasHeightForWidth()); + TLXbase_p->setSizePolicy(sizePolicy25); + TLXbase_p->setWordWrap(false); + + gridLayout6->addWidget(TLXbase_p, 0, 0, 1, 1); + + SpinBox_Radius_int = new QDoubleSpinBox(gBPipe); + SpinBox_Radius_int->setObjectName(QString::fromUtf8("SpinBox_Radius_int")); + SpinBox_Radius_int->setDecimals(5); + SpinBox_Radius_int->setMaximum(1e+09); + + gridLayout6->addWidget(SpinBox_Radius_int, 3, 1, 1, 1); + + SpinBox_Zbase_p = new QDoubleSpinBox(gBPipe); + SpinBox_Zbase_p->setObjectName(QString::fromUtf8("SpinBox_Zbase_p")); + SpinBox_Zbase_p->setDecimals(5); + SpinBox_Zbase_p->setMaximum(1e+09); + SpinBox_Zbase_p->setMinimum(-1e+09); + SpinBox_Zbase_p->setValue(0); + + gridLayout6->addWidget(SpinBox_Zbase_p, 2, 1, 1, 1); + + TLRadius_int = new QLabel(gBPipe); + TLRadius_int->setObjectName(QString::fromUtf8("TLRadius_int")); + QSizePolicy sizePolicy26(static_cast(0), static_cast(0)); + sizePolicy26.setHorizontalStretch(0); + sizePolicy26.setVerticalStretch(0); + sizePolicy26.setHeightForWidth(TLRadius_int->sizePolicy().hasHeightForWidth()); + TLRadius_int->setSizePolicy(sizePolicy26); + TLRadius_int->setWordWrap(false); + + gridLayout6->addWidget(TLRadius_int, 3, 0, 1, 1); + + TLZbase_p = new QLabel(gBPipe); + TLZbase_p->setObjectName(QString::fromUtf8("TLZbase_p")); + QSizePolicy sizePolicy27(static_cast(0), static_cast(0)); + sizePolicy27.setHorizontalStretch(0); + sizePolicy27.setVerticalStretch(0); + sizePolicy27.setHeightForWidth(TLZbase_p->sizePolicy().hasHeightForWidth()); + TLZbase_p->setSizePolicy(sizePolicy27); + TLZbase_p->setWordWrap(false); + + gridLayout6->addWidget(TLZbase_p, 2, 0, 1, 1); + + TLYbase_p = new QLabel(gBPipe); + TLYbase_p->setObjectName(QString::fromUtf8("TLYbase_p")); + QSizePolicy sizePolicy28(static_cast(0), static_cast(0)); + sizePolicy28.setHorizontalStretch(0); + sizePolicy28.setVerticalStretch(0); + sizePolicy28.setHeightForWidth(TLYbase_p->sizePolicy().hasHeightForWidth()); + TLYbase_p->setSizePolicy(sizePolicy28); + TLYbase_p->setWordWrap(false); + + gridLayout6->addWidget(TLYbase_p, 1, 0, 1, 1); + + SpinBox_Ybase_p = new QDoubleSpinBox(gBPipe); + SpinBox_Ybase_p->setObjectName(QString::fromUtf8("SpinBox_Ybase_p")); + SpinBox_Ybase_p->setDecimals(5); + SpinBox_Ybase_p->setMaximum(1e+09); + SpinBox_Ybase_p->setMinimum(-1e+09); + SpinBox_Ybase_p->setValue(0); + + gridLayout6->addWidget(SpinBox_Ybase_p, 1, 1, 1, 1); + + TLXaxis_p = new QLabel(gBPipe); + TLXaxis_p->setObjectName(QString::fromUtf8("TLXaxis_p")); + QSizePolicy sizePolicy29(static_cast(0), static_cast(0)); + sizePolicy29.setHorizontalStretch(0); + sizePolicy29.setVerticalStretch(0); + sizePolicy29.setHeightForWidth(TLXaxis_p->sizePolicy().hasHeightForWidth()); + TLXaxis_p->setSizePolicy(sizePolicy29); + TLXaxis_p->setWordWrap(false); + + gridLayout6->addWidget(TLXaxis_p, 0, 2, 1, 1); + + TLYaxis_p = new QLabel(gBPipe); + TLYaxis_p->setObjectName(QString::fromUtf8("TLYaxis_p")); + QSizePolicy sizePolicy30(static_cast(0), static_cast(0)); + sizePolicy30.setHorizontalStretch(0); + sizePolicy30.setVerticalStretch(0); + sizePolicy30.setHeightForWidth(TLYaxis_p->sizePolicy().hasHeightForWidth()); + TLYaxis_p->setSizePolicy(sizePolicy30); + TLYaxis_p->setWordWrap(false); + + gridLayout6->addWidget(TLYaxis_p, 1, 2, 1, 1); + + TLZaxis_p = new QLabel(gBPipe); + TLZaxis_p->setObjectName(QString::fromUtf8("TLZaxis_p")); + QSizePolicy sizePolicy31(static_cast(0), static_cast(0)); + sizePolicy31.setHorizontalStretch(0); + sizePolicy31.setVerticalStretch(0); + sizePolicy31.setHeightForWidth(TLZaxis_p->sizePolicy().hasHeightForWidth()); + TLZaxis_p->setSizePolicy(sizePolicy31); + TLZaxis_p->setWordWrap(false); + + gridLayout6->addWidget(TLZaxis_p, 2, 2, 1, 1); + + SpinBox_Zaxis_p = new QDoubleSpinBox(gBPipe); + SpinBox_Zaxis_p->setObjectName(QString::fromUtf8("SpinBox_Zaxis_p")); + SpinBox_Zaxis_p->setDecimals(5); + SpinBox_Zaxis_p->setMaximum(1e+09); + SpinBox_Zaxis_p->setMinimum(-1e+09); + SpinBox_Zaxis_p->setValue(0); + + gridLayout6->addWidget(SpinBox_Zaxis_p, 2, 3, 1, 1); + + SpinBox_Yaxis_p = new QDoubleSpinBox(gBPipe); + SpinBox_Yaxis_p->setObjectName(QString::fromUtf8("SpinBox_Yaxis_p")); + SpinBox_Yaxis_p->setDecimals(5); + SpinBox_Yaxis_p->setMaximum(1e+09); + SpinBox_Yaxis_p->setMinimum(-1e+09); + SpinBox_Yaxis_p->setValue(0); + + gridLayout6->addWidget(SpinBox_Yaxis_p, 1, 3, 1, 1); + + SpinBox_Xaxis_p = new QDoubleSpinBox(gBPipe); + SpinBox_Xaxis_p->setObjectName(QString::fromUtf8("SpinBox_Xaxis_p")); + SpinBox_Xaxis_p->setDecimals(5); + SpinBox_Xaxis_p->setMaximum(1e+09); + SpinBox_Xaxis_p->setMinimum(-1e+09); + SpinBox_Xaxis_p->setValue(0); + + gridLayout6->addWidget(SpinBox_Xaxis_p, 0, 3, 1, 1); + + SpinBox_Radius_ext = new QDoubleSpinBox(gBPipe); + SpinBox_Radius_ext->setObjectName(QString::fromUtf8("SpinBox_Radius_ext")); + SpinBox_Radius_ext->setDecimals(5); + SpinBox_Radius_ext->setMaximum(1e+09); + + gridLayout6->addWidget(SpinBox_Radius_ext, 3, 3, 1, 1); + + TLRadius_ext = new QLabel(gBPipe); + TLRadius_ext->setObjectName(QString::fromUtf8("TLRadius_ext")); + QSizePolicy sizePolicy32(static_cast(0), static_cast(0)); + sizePolicy32.setHorizontalStretch(0); + sizePolicy32.setVerticalStretch(0); + sizePolicy32.setHeightForWidth(TLRadius_ext->sizePolicy().hasHeightForWidth()); + TLRadius_ext->setSizePolicy(sizePolicy32); + TLRadius_ext->setWordWrap(false); + + gridLayout6->addWidget(TLRadius_ext, 3, 2, 1, 1); + + SpinBox_Haut_p = new QDoubleSpinBox(gBPipe); + SpinBox_Haut_p->setObjectName(QString::fromUtf8("SpinBox_Haut_p")); + SpinBox_Haut_p->setDecimals(5); + SpinBox_Haut_p->setMaximum(1e+09); + + gridLayout6->addWidget(SpinBox_Haut_p, 4, 1, 1, 1); + + + gridLayout->addWidget(gBPipe, 5, 0, 1, 2); retranslateUi(CreateZone); - QSize size(454, 472); + QSize size(551, 880); size = size.expandedTo(CreateZone->minimumSizeHint()); CreateZone->resize(size); @@ -390,10 +800,30 @@ public: void retranslateUi(QDialog *CreateZone) { CreateZone->setWindowTitle(QApplication::translate("CreateZone", "Create a zone", 0, QApplication::UnicodeUTF8)); - Name->setText(QApplication::translate("CreateZone", "Name", 0, QApplication::UnicodeUTF8)); + GBButtons->setTitle(QString()); + buttonHelp->setText(QApplication::translate("CreateZone", "Help", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("CreateZone", "Cancel", 0, QApplication::UnicodeUTF8)); + buttonApply->setText(QApplication::translate("CreateZone", "Apply", 0, QApplication::UnicodeUTF8)); + buttonOk->setText(QApplication::translate("CreateZone", "OK", 0, QApplication::UnicodeUTF8)); TypeZone->setTitle(QApplication::translate("CreateZone", "Type of zone", 0, QApplication::UnicodeUTF8)); - RBBox->setText(QString()); - RBSphere->setText(QString()); + RBSphere->setText(QApplication::translate("CreateZone", "Sphere", 0, QApplication::UnicodeUTF8)); + RBPipe->setText(QApplication::translate("CreateZone", "Pipe", 0, QApplication::UnicodeUTF8)); + RBCylinder->setText(QApplication::translate("CreateZone", "Cylinder", 0, QApplication::UnicodeUTF8)); + RBBox->setText(QApplication::translate("CreateZone", "Box", 0, QApplication::UnicodeUTF8)); + gBCylindre->setTitle(QApplication::translate("CreateZone", "Coordinates", 0, QApplication::UnicodeUTF8)); + TLHaut->setText(QApplication::translate("CreateZone", "Height", 0, QApplication::UnicodeUTF8)); + TLRadius->setText(QApplication::translate("CreateZone", "Radius", 0, QApplication::UnicodeUTF8)); + TLZaxis->setText(QApplication::translate("CreateZone", "Z axis", 0, QApplication::UnicodeUTF8)); + TLYaxis->setText(QApplication::translate("CreateZone", "Y axis", 0, QApplication::UnicodeUTF8)); + TLXaxis->setText(QApplication::translate("CreateZone", "X axis", 0, QApplication::UnicodeUTF8)); + TLYbase->setText(QApplication::translate("CreateZone", "Y base", 0, QApplication::UnicodeUTF8)); + TLZbase->setText(QApplication::translate("CreateZone", "Z base", 0, QApplication::UnicodeUTF8)); + TLXbase->setText(QApplication::translate("CreateZone", "X base", 0, QApplication::UnicodeUTF8)); + gBSphere->setTitle(QApplication::translate("CreateZone", "Coordinates", 0, QApplication::UnicodeUTF8)); + TLXcentre->setText(QApplication::translate("CreateZone", "X centre", 0, QApplication::UnicodeUTF8)); + TLYcentre->setText(QApplication::translate("CreateZone", "Y centre", 0, QApplication::UnicodeUTF8)); + TLRayon->setText(QApplication::translate("CreateZone", "Radius", 0, QApplication::UnicodeUTF8)); + TLZcentre->setText(QApplication::translate("CreateZone", "Z centre", 0, QApplication::UnicodeUTF8)); gBBox->setTitle(QApplication::translate("CreateZone", "Coordinates", 0, QApplication::UnicodeUTF8)); TLXmini->setText(QApplication::translate("CreateZone", "X mini", 0, QApplication::UnicodeUTF8)); TLYmini->setText(QApplication::translate("CreateZone", "Y mini", 0, QApplication::UnicodeUTF8)); @@ -401,16 +831,17 @@ public: TLXmaxi->setText(QApplication::translate("CreateZone", "X maxi", 0, QApplication::UnicodeUTF8)); TLZmaxi->setText(QApplication::translate("CreateZone", "Z maxi", 0, QApplication::UnicodeUTF8)); TLYmaxi->setText(QApplication::translate("CreateZone", "Y maxi", 0, QApplication::UnicodeUTF8)); - gBSphere->setTitle(QApplication::translate("CreateZone", "Coordinates", 0, QApplication::UnicodeUTF8)); - TLXcentre->setText(QApplication::translate("CreateZone", "X centre", 0, QApplication::UnicodeUTF8)); - TLYcentre->setText(QApplication::translate("CreateZone", "Y centre", 0, QApplication::UnicodeUTF8)); - TLRayon->setText(QApplication::translate("CreateZone", "Radius", 0, QApplication::UnicodeUTF8)); - TLZcentre->setText(QApplication::translate("CreateZone", "Z centre", 0, QApplication::UnicodeUTF8)); - GBButtons->setTitle(QString()); - buttonOk->setText(QApplication::translate("CreateZone", "OK", 0, QApplication::UnicodeUTF8)); - buttonApply->setText(QApplication::translate("CreateZone", "Apply", 0, QApplication::UnicodeUTF8)); - buttonCancel->setText(QApplication::translate("CreateZone", "Cancel", 0, QApplication::UnicodeUTF8)); - buttonHelp->setText(QApplication::translate("CreateZone", "Help", 0, QApplication::UnicodeUTF8)); + Name->setText(QApplication::translate("CreateZone", "Name", 0, QApplication::UnicodeUTF8)); + gBPipe->setTitle(QApplication::translate("CreateZone", "Coordinates", 0, QApplication::UnicodeUTF8)); + TLHaut_p->setText(QApplication::translate("CreateZone", "Height", 0, QApplication::UnicodeUTF8)); + TLXbase_p->setText(QApplication::translate("CreateZone", "X base", 0, QApplication::UnicodeUTF8)); + TLRadius_int->setText(QApplication::translate("CreateZone", "Internal radius", 0, QApplication::UnicodeUTF8)); + TLZbase_p->setText(QApplication::translate("CreateZone", "Z base", 0, QApplication::UnicodeUTF8)); + TLYbase_p->setText(QApplication::translate("CreateZone", "Y base", 0, QApplication::UnicodeUTF8)); + TLXaxis_p->setText(QApplication::translate("CreateZone", "X axis", 0, QApplication::UnicodeUTF8)); + TLYaxis_p->setText(QApplication::translate("CreateZone", "Y axis", 0, QApplication::UnicodeUTF8)); + TLZaxis_p->setText(QApplication::translate("CreateZone", "Z axis", 0, QApplication::UnicodeUTF8)); + TLRadius_ext->setText(QApplication::translate("CreateZone", "External radius", 0, QApplication::UnicodeUTF8)); Q_UNUSED(CreateZone); } // retranslateUi diff --git a/src/HOMARDGUI/CreateZone.ui b/src/HOMARDGUI/CreateZone.ui index e851ad47..aef1b45f 100644 --- a/src/HOMARDGUI/CreateZone.ui +++ b/src/HOMARDGUI/CreateZone.ui @@ -5,8 +5,8 @@ 0 0 - 454 - 472 + 551 + 880 @@ -25,18 +25,55 @@ 6 - - - - Name + + + + + 0 + 0 + 0 + 0 + - - - - - - 32 + + + + + 9 + + + 6 + + + + + Help + + + + + + + Cancel + + + + + + + Apply + + + + + + + OK + + + + @@ -58,44 +95,64 @@ Type of zone - + 9 6 - - + + - + Sphere - ../../resources/zone_boxdxyz.png + ../../resources/zone_spherepoint.png - - true + + + + + + Pipe - - true + + ../../resources/pipe.png - - + + - + Cylinder - ../../resources/zone_spherepoint.png + ../../resources/cylinderpointvector.png + + + + + + + Box + + + ../../resources/zone_boxdxyz.png + + + true + + + true - - + + 0 @@ -104,6 +161,9 @@ 0 + + Qt::TabFocus + Coordinates @@ -114,8 +174,18 @@ 6 - - + + + + 5 + + + 1000000000.000000000000000 + + + + + 0 @@ -125,15 +195,33 @@ - X mini + Height false - - + + + + + 0 + 0 + 0 + 0 + + + + Radius + + + false + + + + + 5 @@ -148,8 +236,40 @@ - - + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + 0 @@ -159,31 +279,33 @@ - Y mini + Z axis false - - - - 5 - - - 999999999.000000000000000 + + + + + 0 + 0 + 0 + 0 + - - -999999999.000000000000000 + + Y axis - - 0.000000000000000 + + false - - + + 0 @@ -193,15 +315,15 @@ - Z mini + X axis false - - + + 5 @@ -216,8 +338,8 @@ - - + + 0 @@ -227,15 +349,15 @@ - X maxi + Y base false - - + + 0 @@ -245,15 +367,15 @@ - Z maxi + Z base false - - + + 5 @@ -268,8 +390,18 @@ - - + + + + 5 + + + 1000000000.000000000000000 + + + + + 0 @@ -279,31 +411,15 @@ - Y maxi + X base false - - - - 5 - - - 999999999.000000000000000 - - - -999999999.000000000000000 - - - 0.000000000000000 - - - - - + + 5 @@ -480,8 +596,8 @@ - - + + 0 @@ -491,40 +607,541 @@ - + Coordinates - + 9 6 - - - - OK + + + + + 0 + 0 + 0 + 0 + - - - - - Apply + X mini + + + false - - - - Cancel + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 - - + + + + + 0 + 0 + 0 + 0 + + - Help + Y mini + + + false + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + Z mini + + + false + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + X maxi + + + false + + + + + + + + 0 + 0 + 0 + 0 + + + + Z maxi + + + false + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + Y maxi + + + false + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + + + + 32 + + + + + + + Name + + + + + + + + 0 + 0 + 0 + 0 + + + + Coordinates + + + + 9 + + + 6 + + + + + + 0 + 0 + 0 + 0 + + + + Height + + + false + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + X base + + + false + + + + + + + 5 + + + 1000000000.000000000000000 + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + Internal radius + + + false + + + + + + + + 0 + 0 + 0 + 0 + + + + Z base + + + false + + + + + + + + 0 + 0 + 0 + 0 + + + + Y base + + + false + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + X axis + + + false + + + + + + + + 0 + 0 + 0 + 0 + + + + Y axis + + + false + + + + + + + + 0 + 0 + 0 + 0 + + + + Z axis + + + false + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + 5 + + + 1000000000.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + External radius + + + false + + + + + + + 5 + + + 1000000000.000000000000000 diff --git a/src/HOMARDGUI/HOMARDGUI.cxx b/src/HOMARDGUI/HOMARDGUI.cxx index 36ede587..eaa4dde3 100644 --- a/src/HOMARDGUI/HOMARDGUI.cxx +++ b/src/HOMARDGUI/HOMARDGUI.cxx @@ -23,34 +23,33 @@ using namespace std; #include "HOMARDGUI.h" -#include // SALOME Includes -#include -#include -#include - -#include -#include -#include -#include -#include +#include "Utils_ORB_INIT.hxx" +#include "Utils_SINGLETON.hxx" +#include "SALOME_LifeCycleCORBA.hxx" + +#include "SUIT_ResourceMgr.h" +#include "SUIT_MessageBox.h" +#include "SUIT_Session.h" +#include "SUIT_ViewWindow.h" +#include "SUIT_ViewManager.h" #include -#include -#include +#include "CAM_Module.h" +#include "OB_Browser.h" -#include -#include +#include "SALOME_ListIO.hxx" +#include "SALOME_ListIteratorOfListIO.hxx" -#include -#include -#include -#include -#include +#include "SalomeApp_Application.h" +#include "SalomeApp_DataModel.h" +#include "SalomeApp_Study.h" +#include "LightApp_SelectionMgr.h" +#include "LightApp_Selection.h" #include -#include -#include +#include "SalomeApp_Module.h" +#include "SALOMEconfig.h" #include #include @@ -73,7 +72,7 @@ using namespace std; #include //Pour le _CAST -#include +#include "SALOMEDS_Study.hxx" #include "HOMARDGUI_Utils.h" static CORBA::ORB_var _orb; @@ -127,7 +126,7 @@ void HOMARDGUI::initialize( CAM_Application* app ) //================================================ void HOMARDGUI::createHOMARDAction( const int id, const QString& po_id, const QString& icon_id, const int key, const bool toggle ) { - MESSAGE("HOMARDGUI::createHOMARDAction"); +// MESSAGE("HOMARDGUI::createHOMARDAction"); QIcon icon; QWidget* parent = application()->desktop(); SUIT_ResourceMgr* resMgr = application()->resourceMgr(); @@ -208,9 +207,9 @@ void HOMARDGUI::OnGUIEvent() if ( !obj || !obj->inherits( "QAction" ) ) return; int id = actionId((QAction*)obj); - // bool ret; + bool ret; if ( id != -1 ) - /*ret = */OnGUIEvent( id ); + ret = OnGUIEvent( id ); MESSAGE("************** End of HOMARDGUI::OnGUIEvent()"); } @@ -556,10 +555,5 @@ extern "C" { { return new HOMARDGUI(""); } - - char* getModuleVersion() - { - return (char*)HOMARD_VERSION_STR; - } } diff --git a/src/HOMARDGUI/HOMARDGUI_Utils.cxx b/src/HOMARDGUI/HOMARDGUI_Utils.cxx index c96ec9cf..5007818f 100644 --- a/src/HOMARDGUI/HOMARDGUI_Utils.cxx +++ b/src/HOMARDGUI/HOMARDGUI_Utils.cxx @@ -55,8 +55,8 @@ SALOME_ListIO HOMARD_UTILS::mySelected; { return theStudy->studyDS(); } - - + + //================================================================ // Function : GetActiveStudy // Returne un pointeur sur l'etude active @@ -69,7 +69,7 @@ SUIT_Study* HOMARD_UTILS::GetActiveStudy() else return NULL; } - + //================================================================ // Function : GetActiveStudyDocument // Returne un pointeur sur l'etude active @@ -83,7 +83,7 @@ _PTR(Study) HOMARD_UTILS::GetActiveStudyDocument() else return _PTR(Study)(); } - + //================================================================ // Function : updateObjBrowser // Purpose : met a jour l arbre d 'etude pour Homard @@ -93,14 +93,14 @@ void HOMARD_UTILS::updateObjBrowser() SalomeApp_Application* app = dynamic_cast(SUIT_Session::session()->activeApplication()); if (app) { // Le nom identifiant doit etre la valeur du parametre - // name de la section HOMARD du fichier SalomeApp.xml + // name de la section HOMARD du fichier SalomeApp.xml CAM_Module* module = app->module("Homard" ); SalomeApp_Module* appMod = dynamic_cast( module ); if ( appMod ) { app->updateObjectBrowser(); appMod->updateObjBrowser( true ); } - else + else MESSAGE( "--- HOMARD::updateObjBrowser: appMod = NULL"); } } @@ -116,13 +116,13 @@ const SALOME_ListIO& HOMARD_UTILS::selectedIO() if( aSelectionMgr ) { aSelectionMgr->selectedObjects( mySelected ); - for (SALOME_ListIteratorOfListIO it (mySelected); it.More(); it.Next()) + for (SALOME_ListIteratorOfListIO it (mySelected); it.More(); it.Next()) SCRUTE(it.Value()->getEntry()); }; return mySelected; - + } - + //================================================================ // Function : IObjectCount // Return the number of selected objects @@ -139,7 +139,7 @@ int HOMARD_UTILS::IObjectCount() } return 0; } - + //================================================================ // Function : firstIObject // Purpose : Return the first selected object in the selected object list @@ -265,125 +265,6 @@ bool HOMARD_UTILS::isFileSummary(_PTR(SObject) MonObj) { return isObject( MonObj, QString("Summary"), 0 ) ; } -//================================================================ -// Function : ChercheFileDansSelection -// Retourne Le nom du fichier associe -//================================================================ -QString HOMARD_UTILS::ChercheFileDansSelection() -{ - MESSAGE("ChercheFileDansSelection"); - int nbSel = HOMARD_UTILS::IObjectCount() ; - if (nbSel > 1 or nbSel == 0) return QString::null; - - Handle(SALOME_InteractiveObject) aIO = HOMARD_UTILS::firstIObject(); - ASSERT(aIO); - if (!( aIO->hasEntry())) return QString::null; - - _PTR(Study) myStudy = HOMARD_UTILS::GetActiveStudyDocument(); - _PTR(SObject) aSObj ( myStudy->FindObjectID( aIO->getEntry() ) ); - if (!aSObj) return QString::null; - - _PTR(GenericAttribute) anAttr; - if (!aSObj->FindAttribute(anAttr, "AttributeExternalFileDef")) return QString::null; - _PTR(AttributeExternalFileDef) aFileName (anAttr); - std::string aFile = aFileName->Value(); - SCRUTE(aFile); - return QString(aFile.c_str()); -} - -//============================================================ -// Function ChercheDansDir -// Cherche tous les fichiers dans la directory qui correspondent -// a la fois a la base et au numero d iteration, numero d iteration +1 -// exple info.00.bilan -// ou qual.tetr.00.dat -//================================================================================ -QStringList HOMARD_UTILS::ChercheDansDir(QString direct, QString base, int numIter) -//================================================================================ -{ - QStringList liste; - - - QString strNum = QString(""); - if (numIter != -1) strNum = HOMARD_UTILS::Transforme(numIter); - QString strNum1 = QString(""); - if (numIter != -1) strNum1 = HOMARD_UTILS::Transforme(numIter+1); - - struct dirent **namelist; - int n = scandir(direct.toLatin1(), &namelist, 0, alphasort); - while(n--) - { - QString fich =QString( namelist[n]->d_name); - if (fich.contains(base) > 0) - { - if (numIter != -1) - { - if ((fich.contains(strNum)>0) or (fich.contains(strNum1)>0)) - liste.append(fich); - } - else - { - liste.append(fich); - } - } - } - return liste; -} - -QString HOMARD_UTILS::Transforme(int num) -{ - std::ostringstream nb ; - nb << std::setw(2) << std::setfill('0') << num ; - QString retour= QString(nb.str().c_str()); - return retour; - -} - -//============================================================================= -void HOMARD_UTILS::AddNewRoot(int Tag, QString Racine) -//============================================================================= -{ - _PTR(Study) myStudy = HOMARD_UTILS::GetActiveStudyDocument(); - ASSERT(myStudy); - _PTR(StudyBuilder) myBuilder( myStudy->NewBuilder() ); - ASSERT(myBuilder); - _PTR(SComponent) aFather=myStudy->FindComponent("HOMARD"); - ASSERT(aFather); - - _PTR(SObject) InfoRoot = myBuilder->NewObjectToTag (aFather, Tag); - _PTR(GenericAttribute) anAttr; - anAttr = myBuilder->FindOrCreateAttribute(InfoRoot, "AttributeName"); - _PTR(AttributeName) aName (anAttr); - aName->SetValue(Racine.toStdString()); -} -//============================================================================= -void HOMARD_UTILS::RangeSousTag(int Tag,QString FileName, int TagFichier, QString Comment,QString FileDir) -//============================================================================= -{ - _PTR(SObject) Root; - _PTR(Study) myStudy = HOMARD_UTILS::GetActiveStudyDocument(); - ASSERT(myStudy); - _PTR(StudyBuilder) myBuilder( myStudy->NewBuilder() ); - ASSERT(myBuilder); - _PTR(SComponent) aFather=myStudy->FindComponent("HOMARD"); - ASSERT(aFather); - bool found = aFather->FindSubObject(Tag,Root); - ASSERT(found); - - _PTR(SObject) MonInfo = myBuilder->NewObjectToTag (Root, TagFichier); - ASSERT(MonInfo); - _PTR(GenericAttribute) anAttr; - anAttr = myBuilder->FindOrCreateAttribute(MonInfo, "AttributeName"); - _PTR(AttributeName) aName (anAttr); - aName->SetValue(FileName.toStdString()); - QString FileComplet = FileDir +QString("/") +FileName; - anAttr = myBuilder->FindOrCreateAttribute(MonInfo, "AttributeExternalFileDef"); - _PTR(AttributeExternalFileDef) aFile (anAttr); - aFile->SetValue((FileComplet).toStdString()); - anAttr = myBuilder->FindOrCreateAttribute(MonInfo, "AttributeComment"); - _PTR(AttributeComment) aComment (anAttr); - aComment->SetValue(Comment.toStdString()); -} //========================================================================================================= void HOMARD_UTILS::PushOnHelp(QString monFichierAide) diff --git a/src/HOMARDGUI/HOMARDGUI_Utils.h b/src/HOMARDGUI/HOMARDGUI_Utils.h index 12bfc0ce..0f802794 100644 --- a/src/HOMARDGUI/HOMARDGUI_Utils.h +++ b/src/HOMARDGUI/HOMARDGUI_Utils.h @@ -51,19 +51,19 @@ class SalomeApp_Module; class LightApp_SelectionMgr; namespace HOMARD_UTILS { - + _PTR(Study) GetCStudy(const SalomeApp_Study* theStudy); SUIT_Study* GetActiveStudy(); _PTR(Study) GetActiveStudyDocument(); void updateObjBrowser(); - + const SALOME_ListIO& selectedIO(); // Function returns a list of SALOME_InteractiveObject's from // selection manager in GUI int IObjectCount() ; // Function returns the number of selected objects - + Handle(SALOME_InteractiveObject) firstIObject() ; // Function returns the first selected object in the list // of selected objects @@ -83,15 +83,8 @@ namespace HOMARD_UTILS { bool isFileSummary(_PTR(SObject) MonObj); bool isObject(_PTR(SObject) MonObj, QString TypeObject, int option ); - QString ChercheFileDansSelection(); - QStringList ChercheDansDir (QString direct, QString base, int numIter); - void RangeSousTag (int Tag,QString FileName, int TagFichier, QString Comment,QString FileDir); - void PushOnHelp(QString monFichierAide); - QString Transforme(int num); - - void AddNewRoot(int Tag, QString Racine); extern SALOME_ListIO mySelected; } diff --git a/src/HOMARDGUI/HOMARD_msg_en.ts b/src/HOMARDGUI/HOMARD_msg_en.ts index 6f5f7684..db4b63ab 100644 --- a/src/HOMARDGUI/HOMARD_msg_en.ts +++ b/src/HOMARDGUI/HOMARD_msg_en.ts @@ -291,6 +291,10 @@ HOM_ZONE_LIMIT %1 maxi must be greater than %1 mini. + + HOM_ZONE_RAYON + The external radius must be greater than the internal radius. + HOM_ZONE_EDIT_WINDOW_TITLE Edition of a zone @@ -307,6 +311,10 @@ HOM_BOUN_CASE The meshfile of the case is unknown. + + HOM_AXE + The axis must be a non 0 vector. + HOM_BOUN_A_EDIT_WINDOW_TITLE Edition of an analytical boundary @@ -315,5 +323,9 @@ HOM_BOUN_D_EDIT_WINDOW_TITLE Edition of a discrete boundary + + HOM_GROU_EDIT_WINDOW_TITLE + Selected groups + diff --git a/src/HOMARDGUI/HOMARD_msg_fr.ts b/src/HOMARDGUI/HOMARD_msg_fr.ts index 5e0bbe15..bb336547 100644 --- a/src/HOMARDGUI/HOMARD_msg_fr.ts +++ b/src/HOMARDGUI/HOMARD_msg_fr.ts @@ -335,6 +335,18 @@ 1 node per edge 1 noeud pendant par arête + + Advanced options + Options avancées + + + Minimal diameter + Diamètre minimal + + + Maximal level + Niveau maximal + Create an iteration Création d'une itération @@ -471,6 +483,10 @@ Field name Nom du champ + + Jump between elements + Saut entre éléments + Component Composante @@ -523,6 +539,10 @@ HOM_ZONE_LIMIT %1 maxi doit être plus grand que %1 mini. + + HOM_ZONE_RAYON + Le rayon externe doit être supérieur au rayon interne. + HOM_ZONE_EDIT_WINDOW_TITLE Edition d'une zone @@ -531,6 +551,30 @@ Type of zone Type de la zone + + Box + Boîte + + + Sphere + Sphère + + + Cylinder + Cylindre + + + Disk + Disque + + + Disk with hole + Disque avec trou + + + Pipe + Tuyau + Coordinates Coordonnées @@ -548,16 +592,20 @@ Type de la frontière - Coordinates of the cylindre - Coordonnées du cylindre + Radius + Rayon - Coordinates of the sphere - Coordonnées de la sphère + External radius + Rayon externe - Radius - Rayon + Internal radius + Rayon interne + + + Height + Hauteur X axis @@ -583,6 +631,10 @@ HOM_BOUN_CASE Le fichier du maillage du cas est inconnu. + + HOM_AXE + L'axe doit être un vecteur non nul. + HOM_BOUN_A_EDIT_WINDOW_TITLE Edition d'une frontière analytique @@ -591,6 +643,10 @@ HOM_BOUN_D_EDIT_WINDOW_TITLE Edition d'une frontière discrète + + HOM_GROU_EDIT_WINDOW_TITLE + Groupes choisis + Filtering with groups Filtrage par les groupes diff --git a/src/HOMARDGUI/MonCreateBoundaryAn.cxx b/src/HOMARDGUI/MonCreateBoundaryAn.cxx index c0543b17..0d603476 100644 --- a/src/HOMARDGUI/MonCreateBoundaryAn.cxx +++ b/src/HOMARDGUI/MonCreateBoundaryAn.cxx @@ -73,8 +73,8 @@ MonCreateBoundaryAn::MonCreateBoundaryAn(MonCreateCase* parent, bool modal, InitConnect( ); SetNewBoundaryAnName() ; - InitValBoundaryAn(); // Cherche les valeurs de la boite englobante le maillage - InitMinMax(); // Initialise les bornes des boutons + InitValBoundaryAn(); // Cherche les valeurs de la boite englobante le maillage + InitMinMax(); // Initialise les bornes des boutons SetCylinder(); // Propose un cylindre en premier choix } // -------------------------------------------------------------------------------------------------------------- @@ -149,7 +149,7 @@ void MonCreateBoundaryAn::InitValBoundaryAn() MESSAGE ("_Zmin : " << _Zmin << " _Zmax : " << _Zmax << " _Zincr : " << _Zincr) ; MESSAGE ("_DMax : " << _DMax); -// 2. Caracteristiques des zones +// 2. Caracteristiques des frontieres // en X _Xcentre=(_Xmin + _Xmax)/2.; // en Y @@ -168,16 +168,16 @@ void MonCreateBoundaryAn::InitMinMax() SpinBox_Xaxis->setSingleStep(0.1); SpinBox_Xcentre->setSingleStep(_Xincr); //en Y - SpinBox_Yaxis->setSingleStep(0.1); - SpinBox_Ycentre->setSingleStep(_Yincr); + SpinBox_Yaxis->setSingleStep(0.1); + SpinBox_Ycentre->setSingleStep(_Yincr); //en Z - SpinBox_Zaxis->setSingleStep(0.1); - SpinBox_Zcentre->setSingleStep(_Zincr); + SpinBox_Zaxis->setSingleStep(0.1); + SpinBox_Zcentre->setSingleStep(_Zincr); // Rayon - SpinBox_Radius->setSingleStep(_Rayon/10.); - SpinBox_Radius->setMinimum(0.); - SpinBox_Rayon->setSingleStep(_Rayon/10.); - SpinBox_Rayon->setMinimum(0.); + SpinBox_Radius->setSingleStep(_Rayon/10.); + SpinBox_Radius->setMinimum(0.); + SpinBox_Rayon->setSingleStep(_Rayon/10.); + SpinBox_Rayon->setMinimum(0.); } // ------------------------------------------------------------------------ bool MonCreateBoundaryAn::PushOnApply() @@ -205,19 +205,26 @@ bool MonCreateBoundaryAn::PushOnApply() (_BoundaryAnYaxis != SpinBox_Yaxis->value()) or (_BoundaryAnZaxis != SpinBox_Zaxis->value()) ) { - Chgt = true; - _BoundaryAnXaxis= SpinBox_Xaxis->value(); - _BoundaryAnYaxis= SpinBox_Yaxis->value(); - _BoundaryAnZaxis= SpinBox_Zaxis->value(); - _BoundaryAnXcentre=SpinBox_Xcent->value(); - _BoundaryAnYcentre=SpinBox_Ycent->value(); - _BoundaryAnZcentre=SpinBox_Zcent->value(); - _BoundaryAnRayon=SpinBox_Radius->value(); + Chgt = true; + _BoundaryAnXaxis= SpinBox_Xaxis->value(); + _BoundaryAnYaxis= SpinBox_Yaxis->value(); + _BoundaryAnZaxis= SpinBox_Zaxis->value(); + _BoundaryAnXcentre=SpinBox_Xcent->value(); + _BoundaryAnYcentre=SpinBox_Ycent->value(); + _BoundaryAnZcentre=SpinBox_Zcent->value(); + _BoundaryAnRayon=SpinBox_Radius->value(); + double daux = _BoundaryAnXaxis*_BoundaryAnXaxis + _BoundaryAnYaxis*_BoundaryAnYaxis + _BoundaryAnZaxis*_BoundaryAnZaxis ; + if ( daux < 0.0000001 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_AXE") ); + return false; + } } break; } - case 4 : // il s agit d une sphere + case 2 : // il s agit d une sphere { if ((_BoundaryAnXcentre != SpinBox_Xcentre->value()) or (_BoundaryAnYcentre != SpinBox_Ycentre->value()) or @@ -242,42 +249,28 @@ bool MonCreateBoundaryAn::PushOnApply() bool MonCreateBoundaryAn:: CreateOrUpdateBoundaryAn() //---------------------------------------------------- // Creation de l'objet boundary -// Mise a jour des attributs de la BoundaryAn - { if (_aBoundaryAnName != LEBoundaryName->text().trimmed()) { - try - { - _aBoundaryAnName = LEBoundaryName->text().trimmed(); - aBoundaryAn = _myHomardGen->CreateBoundary( \ - CORBA::string_dup(_aBoundaryAnName.toStdString().c_str()), \ - CORBA::Long(_BoundaryType) ); - _parent->addBoundaryAn(_aBoundaryAnName); - } - catch( SALOME::SALOME_Exception& S_ex ) + _aBoundaryAnName = LEBoundaryName->text().trimmed(); + switch (_BoundaryType) { - QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QString(CORBA::string_dup(S_ex.details.text)) ); - return false; - } - } -// Mise en place des attributs - aBoundaryAn->SetBoundaryType(_BoundaryType); - switch (_BoundaryType) - { case 1 : // il s agit d un cylindre { - aBoundaryAn->SetCylinder(_BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnXaxis, _BoundaryAnYaxis, _BoundaryAnZaxis, _BoundaryAnRayon ); + aBoundaryAn = _myHomardGen->CreateBoundaryCylinder(CORBA::string_dup(_aBoundaryAnName.toStdString().c_str()), \ + _BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnXaxis, _BoundaryAnYaxis, _BoundaryAnZaxis, _BoundaryAnRayon ); break; } - case 2 : // il s agit d une sphere { - aBoundaryAn->SetSphere(_BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnRayon); + aBoundaryAn = _myHomardGen->CreateBoundarySphere(CORBA::string_dup(_aBoundaryAnName.toStdString().c_str()), \ + _BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnRayon); break; } + } + _parent->addBoundaryAn(_aBoundaryAnName); } +// Mise en place des attributs aBoundaryAn->SetLimit(_Xincr, _Yincr, _Zincr); HOMARD_UTILS::updateObjBrowser(); @@ -331,13 +324,13 @@ void MonCreateBoundaryAn::SetCylinder() adjustSize(); _BoundaryType=1; SpinBox_Xcent->setValue(_Xcentre); - SpinBox_Xaxis->setValue(1.); + SpinBox_Xaxis->setValue(0.); SpinBox_Ycent->setValue(_Ycentre); - SpinBox_Yaxis->setValue(1.); + SpinBox_Yaxis->setValue(0.); SpinBox_Zcent->setValue(_Zcentre); SpinBox_Zaxis->setValue(1.); SpinBox_Radius->setValue(_Rayon); - MESSAGE("Fin de SetCylinder") +// MESSAGE("Fin de SetCylinder") } // ------------------------------------------------------------------------ void MonCreateBoundaryAn::SetSphere() @@ -352,7 +345,7 @@ void MonCreateBoundaryAn::SetSphere() SpinBox_Ycentre->setValue(_Ycentre); SpinBox_Zcentre->setValue(_Zcentre); SpinBox_Rayon->setValue(_Rayon); - MESSAGE("Fin de SetSphere") +// MESSAGE("Fin de SetSphere") } diff --git a/src/HOMARDGUI/MonCreateBoundaryDi.cxx b/src/HOMARDGUI/MonCreateBoundaryDi.cxx index 70994860..a96fd9ae 100644 --- a/src/HOMARDGUI/MonCreateBoundaryDi.cxx +++ b/src/HOMARDGUI/MonCreateBoundaryDi.cxx @@ -108,7 +108,7 @@ bool MonCreateBoundaryDi::PushOnApply() try { _aBoundaryName=aBoundaryName; - _aBoundary=_myHomardGen->CreateBoundary(CORBA::string_dup(_aBoundaryName.toStdString().c_str()),0); + _aBoundary=_myHomardGen->CreateBoundaryDi(CORBA::string_dup(_aBoundaryName.toStdString().c_str()), aMeshName.toStdString().c_str(), aMeshFile.toStdString().c_str()); _parent->addBoundaryDi(_aBoundaryName); _aBoundary->SetCaseCreation(_aCaseName.toStdString().c_str()); } @@ -120,9 +120,7 @@ bool MonCreateBoundaryDi::PushOnApply() } } -// Mise en place des attributs - _aBoundary->SetMeshFile(aMeshFile.toStdString().c_str()); - _aBoundary->SetMeshName(aMeshName.toStdString().c_str()); +// Les groupes AssocieLesGroupes(); HOMARD_UTILS::updateObjBrowser(); diff --git a/src/HOMARDGUI/MonCreateCase.cxx b/src/HOMARDGUI/MonCreateCase.cxx index 402a7ae5..36da0c36 100644 --- a/src/HOMARDGUI/MonCreateCase.cxx +++ b/src/HOMARDGUI/MonCreateCase.cxx @@ -43,7 +43,9 @@ MonCreateCase::MonCreateCase(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var */ : Ui_CreateCase(), - _aCaseName(""),_aDirName(""), _ConfType(1) + _aCaseName(""),_aDirName(""), _ConfType(1), + _NivMax(-1), + _DiamMin(-1.) { _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen); setupUi(this); @@ -54,9 +56,8 @@ MonCreateCase::MonCreateCase(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var GBBoundaryA->setVisible(0); GBBoundaryD->setVisible(0); GBTypeNoConf->setVisible(0); + GBAdvancedOptions->setVisible(0); adjustSize(); - GetBoundarys(); - } // ------------------------------------------------------------------------ @@ -81,10 +82,14 @@ void MonCreateCase::InitConnect() connect( CBBoundaryD, SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryD())); connect( PBBoundaryDiNew, SIGNAL(pressed()), this, SLOT(PushBoundaryDiNew())); connect( PBBoundaryDiEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryDiEdit()) ); + connect( PBBoundaryDiHelp, SIGNAL(pressed()), this, SLOT(PushBoundaryDiHelp()) ); connect( CBBoundaryA, SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryA())); connect( PBBoundaryAnNew, SIGNAL(pressed()), this, SLOT(PushBoundaryAnNew())); + connect( PBBoundaryAnEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryAnEdit()) ); connect( PBBoundaryAnHelp, SIGNAL(pressed()), this, SLOT(PushBoundaryAnHelp()) ); + connect( CBAdvanced, SIGNAL(stateChanged(int)), this, SLOT(SetAdvanced())); + connect( buttonOk, SIGNAL(pressed()), this, SLOT(PushOnOK())); connect( buttonApply, SIGNAL(pressed()), this, SLOT(PushOnApply())); connect( buttonCancel, SIGNAL(pressed()), this, SLOT(close())); @@ -92,24 +97,44 @@ void MonCreateCase::InitConnect() connect( LECaseName, SIGNAL(textChanged(QString)), this, SLOT(CaseNameChanged())); } // ------------------------------------------------------------------------ -void MonCreateCase::GetBoundarys() +void MonCreateCase::InitBoundarys() // ------------------------------------------------------------------------ +// Initialisation des menus avec les frontieres deja enregistrees { - HOMARD::HOMARD_Boundary_var myBoundary ; - HOMARD::listeBoundarys_var mesBoundarys = _myHomardGen->GetAllBoundarys(); - for (int i=0; ilength(); i++) - { - myBoundary = _myHomardGen->GetBoundary(mesBoundarys[i]); - int type_obj = myBoundary->GetBoundaryType() ; - if ( type_obj==0 ) { CBBoundaryDi->addItem(QString(mesBoundarys[i])); } - } + MESSAGE("InitBoundarys"); +// Pour les frontieres analytiques : la colonne des groupes + HOMARD::ListGroupType_var _listeGroupesCas = aCase->GetGroups(); + QTableWidgetItem *__colItem = new QTableWidgetItem(); + __colItem->setText(QApplication::translate("CreateCase", "", 0, QApplication::UnicodeUTF8)); + TWBoundary->setHorizontalHeaderItem(0, __colItem); + for ( int i = 0; i < _listeGroupesCas->length(); i++ ) + { + TWBoundary->insertRow(i); + TWBoundary->setItem( i, 0, new QTableWidgetItem(QString((_listeGroupesCas)[i]).trimmed())); + TWBoundary->item( i, 0 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable ); + } +// Pour les frontieres discretes : la liste a saisir +// Pour les frontieres analytiques : les colonnes de chaque frontiere + HOMARD::HOMARD_Boundary_var myBoundary ; + HOMARD::listeBoundarys_var mesBoundarys = _myHomardGen->GetAllBoundarys(); +// MESSAGE("Nombre de frontieres enregistrees : "<length()); + for (int i=0; ilength(); i++) + { + myBoundary = _myHomardGen->GetBoundary(mesBoundarys[i]); + int type_obj = myBoundary->GetBoundaryType() ; + if ( type_obj==0 ) { CBBoundaryDi->addItem(QString(mesBoundarys[i])); } + else { addBoundaryAn(QString(mesBoundarys[i])); } + } +// Ajustement + TWBoundary->resizeColumnsToContents(); + TWBoundary->resizeRowsToContents(); + TWBoundary->clearSelection(); } - // ------------------------------- bool MonCreateCase::PushOnApply() // -------------------------------- { - MESSAGE("MonCreateCase::PushOnApply"); + MESSAGE("PushOnApply"); QString aCaseName=LECaseName->text().trimmed(); if ( aCaseName == "" ) { @@ -214,6 +239,7 @@ bool MonCreateCase::PushOnApply() } LEFileName->setReadOnly(true); PushFichier->hide(); + InitBoundarys(); } aCase->SetDirName(aDirName.toStdString().c_str()); @@ -252,6 +278,16 @@ bool MonCreateCase::PushOnApply() } } } +// Options avancees + if (CBAdvanced->isChecked()) + { +// Enregistrement du niveau maximal + _NivMax = spinBoxNivMax->value() ; +// Enregistrement du diametre minimal + _DiamMin = doubleSpinBoxDiamMin->value() ; + } + aCase->SetNivMax(_NivMax); + aCase->SetDiamMin(_DiamMin); HOMARD_UTILS::updateObjBrowser(); return true; @@ -348,15 +384,14 @@ void MonCreateCase::SetQuelconque() void MonCreateCase::SetBoundaryD() // ------------------------------------------------------------------------ { - if (CBBoundaryD->isChecked()) + MESSAGE("Debut de SetBoundaryD "); + if (CBBoundaryD->isChecked()) { - GBBoundaryD->setVisible(1); bool bOK = PushOnApply(); - if ( ! bOK) { - GBBoundaryD->setVisible(0); - CBBoundaryD->setChecked(0); - CBBoundaryD->setCheckState(Qt::Unchecked); - } + if (bOK) { GBBoundaryD->setVisible(1); } + else { GBBoundaryD->setVisible(0); + CBBoundaryD->setChecked(0); + CBBoundaryD->setCheckState(Qt::Unchecked); } } else { GBBoundaryD->setVisible(0); } adjustSize(); @@ -386,47 +421,37 @@ void MonCreateCase::PushBoundaryDiEdit() BoundaryDlg->show(); } // ------------------------------------------------------------------------ +void MonCreateCase::PushBoundaryDiHelp() +// ------------------------------------------------------------------------ +{ + HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html#frontiere-discrete") ) ; +} +// ------------------------------------------------------------------------ void MonCreateCase::SetBoundaryA() // ------------------------------------------------------------------------ { - MESSAGE("Debut de MonCreateCase::SetBoundaryA "); + MESSAGE("Debut de SetBoundaryA "); if (CBBoundaryA->isChecked()) { bool bOK = PushOnApply(); - if (bOK) { - GBBoundaryA->setVisible(1); - HOMARD::ListGroupType_var _listeGroupesCas = aCase->GetGroups(); - QTableWidgetItem *__colItem = new QTableWidgetItem(); - __colItem->setText(QApplication::translate("CreateCase", "", 0, QApplication::UnicodeUTF8)); - TWBoundary->setHorizontalHeaderItem(0, __colItem); - for ( int i = 0; i < _listeGroupesCas->length(); i++ ) - { - TWBoundary->insertRow(i); - TWBoundary->setItem( i, 0, new QTableWidgetItem(QString((_listeGroupesCas)[i]).trimmed())); - TWBoundary->item( i, 0 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable ); - } - TWBoundary->resizeColumnsToContents(); - TWBoundary->resizeRowsToContents(); - TWBoundary->clearSelection(); - } - else{ - GBBoundaryA->setVisible(0); - CBBoundaryA->setChecked(0); - CBBoundaryA->setCheckState(Qt::Unchecked); } + if (bOK) { GBBoundaryA->setVisible(1); } + else { GBBoundaryA->setVisible(0); + CBBoundaryA->setChecked(0); + CBBoundaryA->setCheckState(Qt::Unchecked); } } else { GBBoundaryA->setVisible(0); } adjustSize(); // -// MESSAGE("Fin de MonCreateCase::SetBoundaryA "); +// MESSAGE("Fin de SetBoundaryA "); } // ------------------------------------------------------------------------ void MonCreateCase::addBoundaryAn(QString newBoundary) // ------------------------------------------------------------------------ { - MESSAGE("Debut de MonCreateCase::addBoundaryAn "); + MESSAGE("Debut de addBoundaryAn "); // Ajout d'une nouvelle colonne int nbcol = TWBoundary->columnCount(); - MESSAGE("nbcol " << nbcol); +// MESSAGE("nbcol " << nbcol); nbcol += 1 ; TWBoundary->setColumnCount ( nbcol ) ; QTableWidgetItem *__colItem = new QTableWidgetItem(); @@ -435,7 +460,7 @@ void MonCreateCase::addBoundaryAn(QString newBoundary) /* TWBoundary->horizontalHeaderItem(nbcol-1)->setFlags( Qt::ItemIsSelectable|Qt::ItemIsEnabled );*/ // Chaque case est a cocher int nbrow = TWBoundary->rowCount(); - MESSAGE("nbrow " << nbrow); +// MESSAGE("nbrow " << nbrow); for ( int i = 0; i < nbrow; i++ ) { TWBoundary->setItem( i, nbcol-1, new QTableWidgetItem( QString ("") ) ); @@ -456,6 +481,24 @@ void MonCreateCase::PushBoundaryAnNew() BoundaryDlg->show(); } // ------------------------------------------------------------------------ +void MonCreateCase::PushBoundaryAnEdit() +// ------------------------------------------------------------------------ +{ + QString nom=""; + int nbcol = TWBoundary->columnCount(); + for ( int i = 1; i < nbcol; i++ ) + { + QTableWidgetItem *__colItem = new QTableWidgetItem(); + __colItem = TWBoundary->horizontalHeaderItem(i); + nom = QString(__colItem->text()) ; + MESSAGE("nom "<show(); } + } +} +// ------------------------------------------------------------------------ void MonCreateCase::PushBoundaryAnHelp() // ------------------------------------------------------------------------ { @@ -471,3 +514,15 @@ void MonCreateCase::CaseNameChanged() PushFichier->show(); } } +// ------------------------------------------------------------------------ +void MonCreateCase::SetAdvanced() +// ------------------------------------------------------------------------ +{ + MESSAGE("Debut de SetAdvanced "); + if (CBAdvanced->isChecked()) { GBAdvancedOptions->setVisible(1); } + else + { GBAdvancedOptions->setVisible(0); + _NivMax = -1 ; + _DiamMin = -1. ; } + adjustSize(); +} diff --git a/src/HOMARDGUI/MonCreateCase.h b/src/HOMARDGUI/MonCreateCase.h index 725bbc5f..b1459141 100644 --- a/src/HOMARDGUI/MonCreateCase.h +++ b/src/HOMARDGUI/MonCreateCase.h @@ -46,13 +46,15 @@ protected : QString _aDirName; int _ConfType; + int _NivMax; + double _DiamMin; HOMARD::HOMARD_Cas_var aCase ; HOMARD::HOMARD_Gen_var _myHomardGen; virtual void InitConnect(); - virtual void GetBoundarys(); + virtual void InitBoundarys(); virtual void SetNewCaseName(); public slots: @@ -68,10 +70,14 @@ public slots: virtual void SetBoundaryD(); virtual void PushBoundaryDiNew(); virtual void PushBoundaryDiEdit(); + virtual void PushBoundaryDiHelp(); virtual void SetBoundaryA(); virtual void PushBoundaryAnNew(); + virtual void PushBoundaryAnEdit(); virtual void PushBoundaryAnHelp(); + virtual void SetAdvanced(); + virtual void PushOnOK(); virtual bool PushOnApply(); virtual void PushOnHelp(); diff --git a/src/HOMARDGUI/MonCreateHypothesis.cxx b/src/HOMARDGUI/MonCreateHypothesis.cxx index ff390327..bf5e275b 100644 --- a/src/HOMARDGUI/MonCreateHypothesis.cxx +++ b/src/HOMARDGUI/MonCreateHypothesis.cxx @@ -48,7 +48,7 @@ MonCreateHypothesis::MonCreateHypothesis(MonCreateIteration* parent, bool modal, _aTypeAdap(-2), _aTypeRaff(1), _aTypeDera(0), _TypeThR(3), _ThreshR(0), _TypeThC(0), _ThreshC(0), - _UsCmpI(0), _TypeFieldInterp(0) + _UsField(0), _UsCmpI(0), _TypeFieldInterp(0) { MESSAGE("Constructeur") ; _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen); @@ -57,12 +57,13 @@ MonCreateHypothesis::MonCreateHypothesis(MonCreateIteration* parent, bool modal, InitConnect(); SetNewHypothesisName(); - if (_aFieldFile != QString("")) { - RBChamp->setChecked(1); - SetChamp(); - } else { - RBUniforme->setChecked(1); - SetUniforme(); + if (_aFieldFile != QString("")) + { RBChamp->setChecked(1); + SetChamp(); + } + else + { RBUniforme->setChecked(1); + SetUniforme(); } SetFieldNo(); } @@ -93,6 +94,7 @@ void MonCreateHypothesis::InitConnect() connect( RBCNo, SIGNAL(clicked()), this, SLOT(SetCNo())); connect( RBL2, SIGNAL(clicked()), this, SLOT(SetUCL2())); connect( RBInf, SIGNAL(clicked()), this, SLOT(SetUCInf())); + connect( CBJump, SIGNAL(stateChanged(int)), this, SLOT(SetUseField())); connect( PBZoneNew, SIGNAL(pressed()), this, SLOT(PushZoneNew())); connect( PBZoneEdit, SIGNAL(pressed()), this, SLOT(PushZoneEdit()) ); connect( PBZoneDelete, SIGNAL(pressed()), this, SLOT(PushZoneDelete()) ); @@ -290,8 +292,9 @@ void MonCreateHypothesis::PushZoneDelete() // ------------------------------------------------------------------------ void MonCreateHypothesis::GetAllZones() // ------------------------------------------------------------------------ -// Recuperation de toutes les zones enregistrees dans l'arbre d'etude +// Recuperation de toutes les zones enregistrees dans l'arbre d'etude et affichage { + MESSAGE("GetAllZones") ; HOMARD::listeZones_var mesZones = _myHomardGen->GetAllZones(); int nbrow=TWZone->rowCount(); for ( int row=0; row< nbrow; row++) @@ -320,6 +323,7 @@ void MonCreateHypothesis::GetAllZones() void MonCreateHypothesis::addZone(QString newZone) // ------------------------------------------------------------------------ { + MESSAGE("addZone") ; int row = TWZone->rowCount() ; TWZone->setRowCount( row+1 ); TWZone->setItem( row, 0, new QTableWidgetItem( 0 ) ); @@ -555,6 +559,13 @@ void MonCreateHypothesis::SetUCInf() RBInf->setChecked(true); } // ------------------------------------------------------------------------ +void MonCreateHypothesis::SetUseField() +// ------------------------------------------------------------------------ +{ + if ( CBJump->isChecked() ) { _UsField = 1 ; } + else { _UsField = 0 ; } +} +// ------------------------------------------------------------------------ void MonCreateHypothesis::SetFiltrage() // ------------------------------------------------------------------------ { @@ -629,6 +640,7 @@ void MonCreateHypothesis::AssocieComposants() _aHypothesis->SetField(CORBA::string_dup(_aFieldName.toStdString().c_str()) ) ; _aHypothesis->SetRefinThr( _TypeThR, _ThreshR ) ; _aHypothesis->SetUnRefThr( _TypeThC, _ThreshC ) ; + _aHypothesis->SetUseField( _UsField ) ; _aHypothesis->SetUseComp( _UsCmpI ) ; _aListeComposant = GetListCompChecked() ; for ( int i=0 ; i< _aListeComposant.count() ; i++ ) diff --git a/src/HOMARDGUI/MonCreateHypothesis.h b/src/HOMARDGUI/MonCreateHypothesis.h index dd6abee3..d554f427 100644 --- a/src/HOMARDGUI/MonCreateHypothesis.h +++ b/src/HOMARDGUI/MonCreateHypothesis.h @@ -33,7 +33,7 @@ class MonCreateIteration; class MonCreateHypothesis : public QDialog, public Ui_CreateHypothesis -{ +{ Q_OBJECT public: @@ -64,6 +64,7 @@ protected : int _TypeThC; double _ThreshC; + int _UsField; int _UsCmpI; int _TypeFieldInterp; @@ -107,6 +108,7 @@ public slots: virtual void SetCNo(); virtual void SetUCL2(); virtual void SetUCInf(); + virtual void SetUseField(); virtual void PushZoneNew(); virtual void PushZoneEdit(); virtual void PushZoneDelete(); diff --git a/src/HOMARDGUI/MonCreateListGroup.cxx b/src/HOMARDGUI/MonCreateListGroup.cxx index 7f0c23bd..12db4782 100644 --- a/src/HOMARDGUI/MonCreateListGroup.cxx +++ b/src/HOMARDGUI/MonCreateListGroup.cxx @@ -24,7 +24,6 @@ using namespace std; #include "MonCreateBoundaryDi.h" #include -#include #include "SalomeApp_Tools.h" #include "HOMARDGUI_Utils.h" diff --git a/src/HOMARDGUI/MonCreateZone.cxx b/src/HOMARDGUI/MonCreateZone.cxx index da63ed1a..a8677430 100644 --- a/src/HOMARDGUI/MonCreateZone.cxx +++ b/src/HOMARDGUI/MonCreateZone.cxx @@ -49,33 +49,28 @@ MonCreateZone::MonCreateZone(MonCreateHypothesis* parent, bool modal, _parent(parent), _aZoneName (""), _aCaseName(caseName), + _Orient(0), _ZoneType(2), _Xcentre(0), _Ycentre(0), _Zcentre(0), _Rayon(0), _ZoneXcentre(0), _ZoneYcentre(0), _ZoneZcentre(0), _ZoneRayon(0), + _Xmin(0), _Xmax(0), _Xincr(0), _Ymin(0), _Ymax(0), _Yincr(0), _Zmin(0), _Zmax(0), _Zincr(0), _ZoneXmin(0), _ZoneXmax(0), _ZoneYmin(0), _ZoneYmax(0), _ZoneZmin(0), _ZoneZmax(0), - _Xmin(0), _Xmax(0), _Xincr(0), _Ymin(0), _Ymax(0), _Yincr(0), _Zmin(0), _Zmax(0), _Zincr(0), _DMax(0), + _Xaxis(0), _Yaxis(0), _Zaxis(0), _RayonInt(0), _Haut(0), + _ZoneXaxis(0), _ZoneYaxis(0), _ZoneZaxis(0), _ZoneRayonInt(0), _ZoneHaut(0), + _DMax(0), Chgt (false) { MESSAGE("Constructeur") ; - _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen); - setupUi(this); - setModal(modal); - - // Gestion des icones - SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); - QPixmap pix = resMgr->loadPixmap( "HOMARD", "spherepoint.png" ); - QIcon IS=QIcon(pix); - RBSphere->setIcon(IS); - QPixmap pix2 = resMgr->loadPixmap( "HOMARD", "boxdxyz.png" ); - QIcon IS2=QIcon(pix2); - RBBox->setIcon(IS2); - - InitConnect( ); + _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen) ; + setupUi(this) ; + setModal(modal) ; + InitConnect( ) ; SetNewZoneName() ; - InitValZone(); // Cherche les valeurs de la boite englobante le maillage - InitMinMax(); // Initialise les bornes des boutons - SetBox(); // Propose une boite en premier choix + InitValZone() ; // Cherche les valeurs de la boite englobante le maillage + InitMinMax() ; // Initialise les bornes des boutons + SetBox() ; // Propose une boite en premier choix + } // -------------------------------------------------------------------------------------------------------------- MonCreateZone::MonCreateZone(MonCreateHypothesis* parent, @@ -89,25 +84,23 @@ MonCreateZone::MonCreateZone(MonCreateHypothesis* parent, _parent(parent), _aZoneName (""), _aCaseName(caseName), + _Orient(0), _ZoneType(2), _Xcentre(0), _Ycentre(0), _Zcentre(0), _Rayon(0), _ZoneXcentre(0), _ZoneYcentre(0), _ZoneZcentre(0), _ZoneRayon(0), _ZoneXmin(0), _ZoneXmax(0), _ZoneYmin(0), _ZoneYmax(0), _ZoneZmin(0), _ZoneZmax(0), + _Xaxis(0), _Yaxis(0), _Zaxis(0), _RayonInt(0), _Haut(0), + _ZoneXaxis(0), _ZoneYaxis(0), _ZoneZaxis(0), _ZoneRayonInt(0), _ZoneHaut(0), // Pour affichage lors de l edition d une Zone sans nom de Cas - _Xmin(1), _Xmax(1), _Xincr(1), _Ymin(1), _Ymax(1), _Yincr(1), _Zmin(1), _Zmax(1), _Zincr(1), _DMax(1), + _Xmin(1), _Xmax(1), _Xincr(1), _Ymin(1), _Ymax(1), _Yincr(1), _Zmin(1), _Zmax(1), _Zincr(1), + _DMax(1), Chgt (false) { // MESSAGE("Debut de MonCreateZone") - setupUi(this); - SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); - QPixmap pix = resMgr->loadPixmap( "HOMARD", "spherepoint.png" ); - QIcon IS=QIcon(pix); - RBSphere->setIcon(IS); - QPixmap pix2 = resMgr->loadPixmap( "HOMARD", "boxdxyz.png" ); - QIcon IS2=QIcon(pix2); - RBBox->setIcon(IS2); - setModal(true); - InitConnect(); + setupUi(this) ; + + setModal(true) ; + InitConnect() ; } // ------------------------------------------------------------------------ @@ -122,10 +115,12 @@ void MonCreateZone::InitConnect() { connect( RBBox, SIGNAL(clicked()) , this, SLOT(SetBox()) ) ; connect( RBSphere, SIGNAL(clicked()) , this, SLOT(SetSphere()) ) ; - connect( buttonOk, SIGNAL( pressed() ), this, SLOT( PushOnOK() ) ); - connect( buttonApply, SIGNAL( pressed() ), this, SLOT( PushOnApply() ) ); - connect( buttonCancel, SIGNAL( pressed() ), this, SLOT( close() ) ); - connect( buttonHelp, SIGNAL( pressed() ), this, SLOT( PushOnHelp() ) ); + connect( RBCylinder, SIGNAL(clicked()) , this, SLOT(SetCylinder()) ) ; + connect( RBPipe, SIGNAL(clicked()) , this, SLOT(SetPipe()) ) ; + connect( buttonOk, SIGNAL( pressed() ), this, SLOT( PushOnOK() ) ) ; + connect( buttonApply, SIGNAL( pressed() ), this, SLOT( PushOnApply() ) ) ; + connect( buttonCancel, SIGNAL( pressed() ), this, SLOT( close() ) ) ; + connect( buttonHelp, SIGNAL( pressed() ), this, SLOT( PushOnHelp() ) ) ; } // ------------------------------------------------------------------------ void MonCreateZone::InitValZone() @@ -134,60 +129,96 @@ void MonCreateZone::InitValZone() // // 1. Les coordonnees extremes du maillage // - if (_aCaseName == QString("")) { return; } - - HOMARD::HOMARD_Cas_var aCas = _myHomardGen->GetCas(_aCaseName.toStdString().c_str()); - HOMARD::extrema_var MesExtremes = aCas->GetBoundingBox(); - int num = MesExtremes->length() ; - ASSERT(num == 10); - _Xmin=MesExtremes[0]; _Xmax=MesExtremes[1]; _Xincr=MesExtremes[2]; - _Ymin=MesExtremes[3]; _Ymax=MesExtremes[4]; _Yincr=MesExtremes[5]; - _Zmin=MesExtremes[6]; _Zmax=MesExtremes[7]; _Zincr=MesExtremes[8]; - _DMax=MesExtremes[9]; - MESSAGE ("_Xmin : " << _Xmin << " _Xmax : " << _Xmax << " _Xincr : " << _Xincr ) ; - MESSAGE ("_Ymin : " << _Ymin << " _Ymax : " << _Ymax << " _Yincr : " << _Yincr ) ; - MESSAGE ("_Zmin : " << _Zmin << " _Zmax : " << _Zmax << " _Zincr : " << _Zincr) ; - MESSAGE ("_DMax : " << _DMax); + if (_aCaseName == QString("")) { return; } + HOMARD::HOMARD_Cas_var aCas = _myHomardGen->GetCas(_aCaseName.toStdString().c_str()) ; + HOMARD::extrema_var MesExtremes = aCas->GetBoundingBox() ; + int num = MesExtremes->length() ; + ASSERT(num == 10) ; + _Xmin=MesExtremes[0]; _Xmax=MesExtremes[1]; _Xincr=MesExtremes[2]; + _Ymin=MesExtremes[3]; _Ymax=MesExtremes[4]; _Yincr=MesExtremes[5]; + _Zmin=MesExtremes[6]; _Zmax=MesExtremes[7]; _Zincr=MesExtremes[8]; + _DMax=MesExtremes[9]; + if ( _Xincr < 0 ) { _Orient = 2 ; } + else if ( _Yincr < 0 ) { _Orient = 3 ; } + else if ( _Zincr < 0 ) { _Orient = 1 ; } + MESSAGE ("_Xmin : " << _Xmin << " _Xmax : " << _Xmax << " _Xincr : " << _Xincr ) ; + MESSAGE ("_Ymin : " << _Ymin << " _Ymax : " << _Ymax << " _Yincr : " << _Yincr ) ; + MESSAGE ("_Zmin : " << _Zmin << " _Zmax : " << _Zmax << " _Zincr : " << _Zincr) ; + MESSAGE ("_DMax : " << _DMax) ; + MESSAGE ("_Orient : " << _Orient) ; // 2. Caracteristiques des zones // en X - if ( _Xincr < 0 ) - { - _ZoneXmin = _Xmin; - _ZoneXmax = _Xmax; - } - else - { - _ZoneXmin = _Xmin - _Xincr; - _ZoneXmax = _Xmax + _Xincr; - } - _Xcentre=(_Xmin + _Xmax)/2.; + if ( _Xincr < 0 ) + { + _ZoneXmin = _Xmin; + _ZoneXmax = _Xmax; + } + else + { + _ZoneXmin = _Xmin - _Xincr; + _ZoneXmax = _Xmax + _Xincr; + } + _Xcentre=(_Xmin + _Xmax)/2.; // en Y - if ( _Yincr < 0 ) - { - _ZoneYmin = _Ymin; - _ZoneYmax = _Ymax; - } - else - { - _ZoneYmin = _Ymin - _Yincr; - _ZoneYmax = _Ymax + _Yincr; - } - _Ycentre=(_Ymin + _Ymax)/2.; + if ( _Yincr < 0 ) + { + _ZoneYmin = _Ymin; + _ZoneYmax = _Ymax; + } + else + { + _ZoneYmin = _Ymin - _Yincr; + _ZoneYmax = _Ymax + _Yincr; + } + _Ycentre=(_Ymin + _Ymax)/2.; // en Z - if ( _Zincr < 0 ) - { - _ZoneZmin = _Zmin; - _ZoneZmax = _Zmax; - } - else - { - _ZoneZmin = _Zmin - _Zincr; - _ZoneZmax = _Zmax + _Zincr; - } - _Zcentre=(_Zmin + _Zmax)/2.; -// Rayon - _Rayon= _DMax/4.; + if ( _Zincr < 0 ) + { + _ZoneZmin = _Zmin; + _ZoneZmax = _Zmax; + } + else + { + _ZoneZmin = _Zmin - _Zincr; + _ZoneZmax = _Zmax + _Zincr; + } + _Zcentre=(_Zmin + _Zmax)/2.; +// Rayons + _Rayon= _DMax/4.; + _RayonInt= _DMax/8.; +// Axe et hauteur pour cylindre et tuyau + _Haut= _DMax/2.; +// 3. Gestion des icones + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr() ; + QPixmap pix = resMgr->loadPixmap( "HOMARD", "boxdxyz.png" ) ; + if ( _Orient == 0 ) { pix = resMgr->loadPixmap( "HOMARD", "boxdxyz.png" ) ; } + else { pix = resMgr->loadPixmap( "HOMARD", "boxdxy.png" ) ; } + QIcon IS=QIcon(pix) ; + RBBox->setIcon(IS) ; + + if ( _Orient == 0 ) { pix = resMgr->loadPixmap( "HOMARD", "cylinderpointvector.png" ) ; } + else { pix = resMgr->loadPixmap( "HOMARD", "disk.png" ) ; + RBCylinder->setText(QApplication::translate("CreateZone", "Disk", 0, QApplication::UnicodeUTF8)); + TLXbase->setText(QApplication::translate("CreateZone", "X centre", 0, QApplication::UnicodeUTF8)); + TLYbase->setText(QApplication::translate("CreateZone", "Y centre", 0, QApplication::UnicodeUTF8)); + TLZbase->setText(QApplication::translate("CreateZone", "Z centre", 0, QApplication::UnicodeUTF8)); } + IS=QIcon(pix) ; + RBCylinder->setIcon(IS) ; + + if ( _Orient == 0 ) { pix = resMgr->loadPixmap( "HOMARD", "pipe.png" ) ; } + else { pix = resMgr->loadPixmap( "HOMARD", "diskwithhole.png" ) ; + RBPipe->setText(QApplication::translate("CreateZone", "Disk with hole", 0, QApplication::UnicodeUTF8)); + TLXbase_p->setText(QApplication::translate("CreateZone", "X centre", 0, QApplication::UnicodeUTF8)); + TLYbase_p->setText(QApplication::translate("CreateZone", "Y centre", 0, QApplication::UnicodeUTF8)); + TLZbase_p->setText(QApplication::translate("CreateZone", "Z centre", 0, QApplication::UnicodeUTF8)); } + IS=QIcon(pix) ; + RBPipe->setIcon(IS) ; + + if ( _Orient == 0 ) { pix = resMgr->loadPixmap( "HOMARD", "spherepoint.png" ) ; + IS=QIcon(pix) ; + RBSphere->setIcon(IS) ; } + else { RBSphere->setVisible(0) ; } } // ------------------------------------------------------------------------ @@ -196,53 +227,99 @@ void MonCreateZone::InitMinMax() { // en X if ( _Xincr > 0) { - SpinBox_Xmini->setRange(_ZoneXmin,_ZoneXmax); - SpinBox_Xmaxi->setRange(_ZoneXmin,_ZoneXmax); - SpinBox_Xmini->setSingleStep(_Xincr); - SpinBox_Xmaxi->setSingleStep(_Xincr); - SpinBox_Xcentre->setSingleStep(_Xincr); + SpinBox_Xmini->setRange(_ZoneXmin,_ZoneXmax) ; + SpinBox_Xmaxi->setRange(_ZoneXmin,_ZoneXmax) ; + SpinBox_Xmini->setSingleStep(_Xincr) ; + SpinBox_Xmaxi->setSingleStep(_Xincr) ; + SpinBox_Xcentre->setSingleStep(_Xincr) ; } else { SpinBox_Xmini->setValue(_ZoneXmin) ; SpinBox_Xmaxi->setValue(_ZoneXmax) ; + SpinBox_Xcentre->setValue(_Xcentre) ; + SpinBox_Xbase->setValue(_Xcentre) ; + SpinBox_Xbase_p->setValue(_Xcentre) ; SpinBox_Xmini->setEnabled(false) ; SpinBox_Xmaxi->setEnabled(false) ; SpinBox_Xcentre->setEnabled(false) ; + SpinBox_Xbase->setEnabled(false) ; + SpinBox_Xbase_p->setEnabled(false) ; } // en Y if ( _Yincr > 0) { - SpinBox_Ymini->setRange(_ZoneYmin,_ZoneYmax); - SpinBox_Ymaxi->setRange(_ZoneYmin,_ZoneYmax); - SpinBox_Ymini->setSingleStep(_Yincr); - SpinBox_Ymaxi->setSingleStep(_Yincr); - SpinBox_Ycentre->setSingleStep(_Yincr); + SpinBox_Ymini->setRange(_ZoneYmin,_ZoneYmax) ; + SpinBox_Ymaxi->setRange(_ZoneYmin,_ZoneYmax) ; + SpinBox_Ymini->setSingleStep(_Yincr) ; + SpinBox_Ymaxi->setSingleStep(_Yincr) ; + SpinBox_Ycentre->setSingleStep(_Yincr) ; } else { SpinBox_Ymini->setValue(_ZoneYmin) ; SpinBox_Ymaxi->setValue(_ZoneYmax) ; - SpinBox_Ycentre->setValue(_Ycentre); + SpinBox_Ycentre->setValue(_Ycentre) ; + SpinBox_Ybase->setValue(_Ycentre) ; + SpinBox_Ybase_p->setValue(_Ycentre) ; SpinBox_Ymini->setEnabled(false) ; SpinBox_Ymaxi->setEnabled(false) ; SpinBox_Ycentre->setEnabled(false) ; + SpinBox_Ybase->setEnabled(false) ; + SpinBox_Ybase_p->setEnabled(false) ; } // en Z if ( _Zincr > 0) { - SpinBox_Zmini->setRange(_ZoneZmin,_ZoneZmax); - SpinBox_Zmaxi->setRange(_ZoneZmin,_ZoneZmax); - SpinBox_Zmini->setSingleStep(_Zincr); - SpinBox_Zmaxi->setSingleStep(_Zincr); - SpinBox_Zcentre->setSingleStep(_Zincr); + SpinBox_Zmini->setRange(_ZoneZmin,_ZoneZmax) ; + SpinBox_Zmaxi->setRange(_ZoneZmin,_ZoneZmax) ; + SpinBox_Zmini->setSingleStep(_Zincr) ; + SpinBox_Zmaxi->setSingleStep(_Zincr) ; + SpinBox_Zcentre->setSingleStep(_Zincr) ; } else { SpinBox_Zmini->setValue(_ZoneZmin) ; SpinBox_Zmaxi->setValue(_ZoneZmax) ; + SpinBox_Zcentre->setValue(_Zcentre) ; + SpinBox_Zbase->setValue(_Zcentre) ; + SpinBox_Zbase_p->setValue(_Zcentre) ; SpinBox_Zmini->setEnabled(false) ; SpinBox_Zmaxi->setEnabled(false) ; SpinBox_Zcentre->setEnabled(false) ; + SpinBox_Zbase->setEnabled(false) ; + SpinBox_Zbase_p->setEnabled(false) ; + } +// 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) { + SpinBox_Xaxis->setVisible(0) ; + SpinBox_Yaxis->setVisible(0) ; + SpinBox_Zaxis->setVisible(0) ; + SpinBox_Haut->setVisible(0) ; + TLXaxis->setVisible(0) ; + TLYaxis->setVisible(0) ; + TLZaxis->setVisible(0) ; + TLHaut->setVisible(0) ; + SpinBox_Xaxis_p->setVisible(0) ; + SpinBox_Yaxis_p->setVisible(0) ; + SpinBox_Zaxis_p->setVisible(0) ; + SpinBox_Haut_p->setVisible(0) ; + TLXaxis_p->setVisible(0) ; + TLYaxis_p->setVisible(0) ; + TLZaxis_p->setVisible(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.) ; } -// Rayon - SpinBox_Rayon->setSingleStep(_Rayon/10.); - SpinBox_Rayon->setMinimum(0.); } // ------------------------------------------------------------------------ bool MonCreateZone::PushOnApply() @@ -254,56 +331,152 @@ bool MonCreateZone::PushOnApply() if (LEZoneName->text().trimmed()=="") { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QObject::tr("HOM_ZONE_NAME") ); + QObject::tr("HOM_ZONE_NAME") ) ; return false; } switch (_ZoneType) { - case 2 : // il s agit d une boite + case 11 : // il s agit d un rectangle + { } + case 12 : // il s agit d un rectangle + { } + case 13 : // il s agit d un rectangle + { } + case 2 : // il s agit d un parallelipipede rectangle { - if ((_ZoneXmin != SpinBox_Xmini->value()) or (_ZoneXmax != SpinBox_Xmaxi->value()) or - (_ZoneYmin != SpinBox_Ymini->value()) or (_ZoneYmax != SpinBox_Ymaxi->value()) or - (_ZoneZmin != SpinBox_Zmini->value()) or (_ZoneZmax != SpinBox_Zmaxi->value()) ) - Chgt = true; - break; + if ( (_ZoneXmin != SpinBox_Xmini->value()) or + (_ZoneXmax != SpinBox_Xmaxi->value()) or + (_ZoneYmin != SpinBox_Ymini->value()) or + (_ZoneYmax != SpinBox_Ymaxi->value()) or + (_ZoneZmin != SpinBox_Zmini->value()) or + (_ZoneZmax != SpinBox_Zmaxi->value()) ) + { + Chgt = true; + _ZoneXmin= SpinBox_Xmini->value() ; _ZoneXmax= SpinBox_Xmaxi->value() ; + _ZoneYmin= SpinBox_Ymini->value() ; _ZoneYmax= SpinBox_Ymaxi->value() ; + _ZoneZmin= SpinBox_Zmini->value() ; _ZoneZmax= SpinBox_Zmaxi->value() ; + } + break ; } - case 4 : // il s agit d une sphere { - if ((_ZoneXcentre != SpinBox_Xcentre->value()) or (_ZoneYcentre != SpinBox_Ycentre->value()) - or (_ZoneZcentre != SpinBox_Zcentre->value()) or (_ZoneRayon != SpinBox_Rayon->value())) - Chgt = true; - break; + if ( (_ZoneXcentre != SpinBox_Xcentre->value()) or + (_ZoneYcentre != SpinBox_Ycentre->value()) or + (_ZoneZcentre != SpinBox_Zbase->value()) or + (_ZoneRayon != SpinBox_Rayon->value()) ) + { + Chgt = true; + _ZoneXcentre=SpinBox_Xcentre->value() ; + _ZoneYcentre=SpinBox_Ycentre->value() ; + _ZoneZcentre=SpinBox_Zcentre->value() ; + _ZoneRayon=SpinBox_Rayon->value() ; + } + break ; } + case 31 : // il s agit d un disque issu d'un cylindre + { } + case 32 : // il s agit d un disque issu d'un cylindre + { } + case 33 : // il s agit d un disque issu d'un cylindre + { } + case 5 : // il s agit d un cylindre + { + if ( (_ZoneXcentre != SpinBox_Xbase->value()) or + (_ZoneYcentre != SpinBox_Ybase->value()) or + (_ZoneZcentre != SpinBox_Zbase->value()) or + (_ZoneRayon != SpinBox_Radius->value()) or + (_ZoneHaut != SpinBox_Haut->value()) or + (_ZoneXaxis != SpinBox_Xaxis->value()) or + (_ZoneYaxis != SpinBox_Yaxis->value()) or + (_ZoneZaxis != SpinBox_Zaxis->value()) ) + { + Chgt = true; + _ZoneXcentre=SpinBox_Xbase->value() ; + _ZoneYcentre=SpinBox_Ybase->value() ; + _ZoneZcentre=SpinBox_Zbase->value() ; + _ZoneXaxis=SpinBox_Xaxis->value() ; + _ZoneYaxis=SpinBox_Yaxis->value() ; + _ZoneZaxis=SpinBox_Zaxis->value() ; + _ZoneRayon=SpinBox_Radius->value() ; + _ZoneHaut=SpinBox_Haut->value() ; + } + break ; + } + case 61 : // il s agit d un disque avec trou + { } + case 62 : // il s agit d un disque avec trou + { } + case 63 : // il s agit d un disque avec trou + { } + case 7 : // il s agit d un tuyau + { + if ( (_ZoneXcentre != SpinBox_Xbase_p->value()) or + (_ZoneYcentre != SpinBox_Ybase_p->value()) or + (_ZoneZcentre != SpinBox_Zbase_p->value()) or + (_ZoneRayonInt != SpinBox_Radius_int->value()) or + (_ZoneRayon != SpinBox_Radius_ext->value()) or + (_ZoneHaut != SpinBox_Haut_p->value()) or + (_ZoneXaxis != SpinBox_Xaxis_p->value()) or + (_ZoneYaxis != SpinBox_Yaxis_p->value()) or + (_ZoneZaxis != SpinBox_Zaxis_p->value()) ) + { + Chgt = true; + _ZoneXcentre=SpinBox_Xbase_p->value() ; + _ZoneYcentre=SpinBox_Ybase_p->value() ; + _ZoneZcentre=SpinBox_Zbase_p->value() ; + _ZoneXaxis=SpinBox_Xaxis_p->value() ; + _ZoneYaxis=SpinBox_Yaxis_p->value() ; + _ZoneZaxis=SpinBox_Zaxis_p->value() ; + _ZoneRayonInt=SpinBox_Radius_int->value() ; + _ZoneRayon=SpinBox_Radius_ext->value() ; + _ZoneHaut=SpinBox_Haut_p->value() ; + } + break ; + } } - _ZoneXmin= SpinBox_Xmini->value(); _ZoneXmax= SpinBox_Xmaxi->value(); - _ZoneYmin= SpinBox_Ymini->value(); _ZoneYmax= SpinBox_Ymaxi->value(); - _ZoneZmin= SpinBox_Zmini->value(); _ZoneZmax= SpinBox_Zmaxi->value(); - - _ZoneXcentre=SpinBox_Xcentre->value();_ZoneYcentre=SpinBox_Ycentre->value(); - _ZoneZcentre=SpinBox_Zcentre->value();_ZoneRayon=SpinBox_Rayon->value(); - - if( _ZoneType == 2 ) +// Controles +// Pour un rectangle ou un parallelepipede : + if ( ( _ZoneType >= 11 and _ZoneType <= 13 ) or _ZoneType == 2 ) { - if ((_ZoneXmin>= _ZoneXmax) and (_Xincr > 0)) { + if ((_ZoneXmin >= _ZoneXmax) and (_Xincr > 0)) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QObject::tr("HOM_ZONE_LIMIT").arg("X") ); + QObject::tr("HOM_ZONE_LIMIT").arg("X") ) ; return false; } - if ((_ZoneYmin>= _ZoneYmax) and (_Yincr > 0)) { + if ((_ZoneYmin >= _ZoneYmax) and (_Yincr > 0)) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QObject::tr("HOM_ZONE_LIMIT").arg("Y") ); + QObject::tr("HOM_ZONE_LIMIT").arg("Y") ) ; return false; } - if ((_ZoneZmin>= _ZoneZmax) and (_Zincr > 0)) { + if ((_ZoneZmin >= _ZoneZmax) and (_Zincr > 0)) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QObject::tr("HOM_ZONE_LIMIT").arg("Z") ); + QObject::tr("HOM_ZONE_LIMIT").arg("Z") ) ; return false; } } - - bool bOK = CreateOrUpdateZone(); +// L'axe pour un cylindre ou un tuyau : + if ( _ZoneType == 5 or _ZoneType == 7 ) + { + double daux = _ZoneXaxis*_ZoneXaxis + _ZoneYaxis*_ZoneYaxis + _ZoneZaxis*_ZoneZaxis ; + if ( daux < 0.0000001 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_AXE") ); + return false; + } + } +// Rayons pour disque avec trou ou un tuyau : + if ( ( _ZoneType >= 61 and _ZoneType <= 63 ) or _ZoneType == 7 ) + { + if ( _ZoneRayonInt >= _ZoneRayon ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ZONE_RAYON") ); + return false; + } + } + bool bOK = CreateOrUpdateZone() ; return bOK; } @@ -311,40 +484,92 @@ bool MonCreateZone::PushOnApply() bool MonCreateZone:: CreateOrUpdateZone() //---------------------------------------------------- // Creation de la zone -// Mise a jour des attributs de la Zone - { + MESSAGE("CreateOrUpdateZone _ZoneType ="<<_ZoneType); if (_aZoneName != LEZoneName->text().trimmed()) { - try - { - _aZoneName = LEZoneName->text().trimmed(); - aZone = _myHomardGen->CreateZone( \ - CORBA::string_dup(_aZoneName.toStdString().c_str()), \ - CORBA::Long(_ZoneType) ); - _parent->addZone(_aZoneName); - } - catch( SALOME::SALOME_Exception& S_ex ) + _aZoneName = LEZoneName->text().trimmed() ; + switch (_ZoneType) { - QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), - QString(CORBA::string_dup(S_ex.details.text)) ); - return false; + case 11 : // il s agit d un rectangle + { aZone = _myHomardGen->CreateZoneBox2D(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _Orient ); + break; + } + case 12 : // il s agit d un rectangle + { aZone = _myHomardGen->CreateZoneBox2D(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax, _Orient ); + break; + } + case 13 : // il s agit d un rectangle + { aZone = _myHomardGen->CreateZoneBox2D(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneZmin, _ZoneZmax, _ZoneXmin, _ZoneXmax, _Orient ); + break; + } + case 2 : // il s agit d un parallelepipede + { aZone = _myHomardGen->CreateZoneBox(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax ); + break; + } + case 4 : // il s agit d une sphere + { aZone = _myHomardGen->CreateZoneSphere(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneRayon ); + break; + } + case 31 : // il s agit d un disque issu d'un cylindre + { aZone = _myHomardGen->CreateZoneDisk(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXcentre, _ZoneYcentre, _ZoneRayon, _Orient ); + break; + } + case 32 : // il s agit d un disque issu d'un cylindre + { aZone = _myHomardGen->CreateZoneDisk(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneYcentre, _ZoneZcentre, _ZoneRayon, _Orient ); + break; + } + case 33 : // il s agit d un disque issu d'un cylindre + { aZone = _myHomardGen->CreateZoneDisk(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneZcentre, _ZoneXcentre, _ZoneRayon, _Orient ); + break; + } + case 5 : // il s agit d un cylindre + { aZone = _myHomardGen->CreateZoneCylinder(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneXaxis, _ZoneYaxis, _ZoneZaxis, _ZoneRayon, _ZoneHaut ); + break; + } + case 61 : // il s agit d un disque avec trou + { aZone = _myHomardGen->CreateZoneDiskWithHole(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXcentre, _ZoneYcentre, _ZoneRayon, _ZoneRayonInt, _Orient ); + break; + } + case 62 : // il s agit d un disque avec trou + { aZone = _myHomardGen->CreateZoneDiskWithHole(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneYcentre, _ZoneZcentre, _ZoneRayon, _ZoneRayonInt, _Orient ); + break; + } + case 63 : // il s agit d un disque avec trou + { aZone = _myHomardGen->CreateZoneDiskWithHole(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneZcentre, _ZoneXcentre, _ZoneRayon, _ZoneRayonInt, _Orient ); + break; + } + case 7 : // il s agit d un tuyau + { aZone = _myHomardGen->CreateZonePipe(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneXaxis, _ZoneYaxis, _ZoneZaxis, _ZoneRayon, _ZoneHaut, _ZoneRayonInt ); + break; + } } + _parent->addZone(_aZoneName) ; } // Mise en place des attributs - aZone->SetZoneType(_ZoneType); - aZone->SetBox(_ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax); - aZone->SetSphere(_ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneRayon); - aZone->SetLimit(_Xincr, _Yincr, _Zincr); + aZone->SetLimit(_Xincr, _Yincr, _Zincr) ; - HOMARD_UTILS::updateObjBrowser(); + HOMARD_UTILS::updateObjBrowser() ; return true; } // ------------------------------------------------------------------------ void MonCreateZone::PushOnOK() // ------------------------------------------------------------------------ { - if (PushOnApply()) this->close(); + if (PushOnApply()) this->close() ; } // ------------------------------------------------------------------------ void MonCreateZone::PushOnHelp() @@ -359,13 +584,13 @@ void MonCreateZone::SetNewZoneName() { // Recherche d'un nom par defaut qui n'existe pas encore - HOMARD::listeZones_var MyZones = _myHomardGen->GetAllZones(); + HOMARD::listeZones_var MyZones = _myHomardGen->GetAllZones() ; int num = 0; QString aZoneName=""; while (aZoneName=="" ) { aZoneName.setNum(num+1) ; aZoneName.insert(0, QString("Zone_")) ; - for ( int i=0; ilength(); i++) + for ( int i=0; ilength() ; i++) { if ( aZoneName == QString(MyZones[i])) { @@ -376,50 +601,95 @@ void MonCreateZone::SetNewZoneName() } } LEZoneName->clear() ; - LEZoneName->insert(aZoneName); + LEZoneName->insert(aZoneName) ; } // ------------------------------------------------------------------------ void MonCreateZone::SetBox() // ------------------------------------------------------------------------ { - gBBox->setVisible(1); - gBSphere->setVisible(0); - adjustSize(); + gBBox->setVisible(1) ; + gBSphere->setVisible(0) ; + gBCylindre->setVisible(0) ; + gBPipe->setVisible(0) ; + adjustSize() ; _ZoneType=2; // Sachant que l'increment est le 1/100eme de l'ecart (min/max), cela revient // a initialiser la boite sur une boite 'centrale' comprise entre 2/5 et 3/5 - if ( _Xincr > 0 ) { - SpinBox_Xmini->setValue(_Xcentre-10*_Xincr); - SpinBox_Xmaxi->setValue(_Xcentre+10*_Xincr); - } - if ( _Yincr > 0 ) { - SpinBox_Ymini->setValue(_Ycentre-10*_Yincr); - SpinBox_Ymaxi->setValue(_Ycentre+10*_Yincr); - } - if ( _Zincr > 0 ) { - SpinBox_Zmini->setValue(_Zcentre-10*_Zincr); - SpinBox_Zmaxi->setValue(_Zcentre+10*_Zincr); - } + if ( _Xincr > 0 ) { SpinBox_Xmini->setValue(_Xcentre-10*_Xincr) ; + SpinBox_Xmaxi->setValue(_Xcentre+10*_Xincr) ; } + else { _ZoneType=12 ; } + if ( _Yincr > 0 ) { SpinBox_Ymini->setValue(_Ycentre-10*_Yincr) ; + SpinBox_Ymaxi->setValue(_Ycentre+10*_Yincr) ; } + else { _ZoneType=13 ; } + if ( _Zincr > 0 ) { SpinBox_Zmini->setValue(_Zcentre-10*_Zincr) ; + SpinBox_Zmaxi->setValue(_Zcentre+10*_Zincr) ; } + else { _ZoneType=11 ; } } // ------------------------------------------------------------------------ void MonCreateZone::SetSphere() // ------------------------------------------------------------------------ { MESSAGE("Debut de SetSphere") - gBBox->setVisible(0); - gBSphere->setVisible(1); - adjustSize(); + gBBox->setVisible(0) ; + gBSphere->setVisible(1) ; + gBCylindre->setVisible(0) ; + gBPipe->setVisible(0) ; + adjustSize() ; _ZoneType=4; - if ( _Xincr > 0 ) { - SpinBox_Xcentre->setValue(_Xcentre); - } - if ( _Yincr > 0 ) { - SpinBox_Ycentre->setValue(_Ycentre); - } - if ( _Zincr > 0 ) { - SpinBox_Zcentre->setValue(_Zcentre); - } - SpinBox_Rayon->setValue(_Rayon); + SpinBox_Xcentre->setValue(_Xcentre) ; + SpinBox_Ycentre->setValue(_Ycentre) ; + SpinBox_Zcentre->setValue(_Zcentre) ; + SpinBox_Rayon->setValue(_Rayon) ; + MESSAGE("Fin de SetSphere") +} +// ------------------------------------------------------------------------ +void MonCreateZone::SetCylinder() +// ------------------------------------------------------------------------ +{ + MESSAGE("Debut de SetCylinder") + gBBox->setVisible(0) ; + gBSphere->setVisible(0) ; + gBCylindre->setVisible(1) ; + gBPipe->setVisible(0) ; + adjustSize() ; + _ZoneType=5; + if ( _Xincr > 0 ) { SpinBox_Xbase->setValue(_Xcentre) ; + SpinBox_Xaxis->setValue(0.) ; } + else { _ZoneType=32 ; } + if ( _Yincr > 0 ) { SpinBox_Ybase->setValue(_Ycentre) ; + SpinBox_Yaxis->setValue(0.) ; } + else { _ZoneType=33 ; } + if ( _Zincr > 0 ) { SpinBox_Zbase->setValue(_Zcentre) ; + SpinBox_Zaxis->setValue(1.) ; } + else { _ZoneType=31 ; } + SpinBox_Radius->setValue(_Rayon) ; + SpinBox_Haut->setValue(_Haut) ; + MESSAGE("Fin de SetCylinder") +} +// ------------------------------------------------------------------------ +void MonCreateZone::SetPipe() +// ------------------------------------------------------------------------ +{ + MESSAGE("Debut de SetPipe") + gBBox->setVisible(0) ; + gBSphere->setVisible(0) ; + gBCylindre->setVisible(0) ; + gBPipe->setVisible(1) ; + adjustSize() ; + _ZoneType=7; + if ( _Xincr > 0 ) { SpinBox_Xbase_p->setValue(_Xcentre) ; + SpinBox_Xaxis_p->setValue(0.) ; } + else { _ZoneType=62 ; } + if ( _Yincr > 0 ) { SpinBox_Ybase_p->setValue(_Ycentre) ; + SpinBox_Yaxis_p->setValue(0.) ; } + else { _ZoneType=63 ; } + if ( _Zincr > 0 ) { SpinBox_Zbase_p->setValue(_Zcentre) ; + SpinBox_Zaxis_p->setValue(1.) ; } + else { _ZoneType=61 ; } + SpinBox_Radius_int->setValue(_RayonInt) ; + SpinBox_Radius_ext->setValue(_Rayon) ; + SpinBox_Haut_p->setValue(_Haut) ; + MESSAGE("Fin de SetPipe") } diff --git a/src/HOMARDGUI/MonCreateZone.h b/src/HOMARDGUI/MonCreateZone.h index 8576f599..825a6ae1 100644 --- a/src/HOMARDGUI/MonCreateZone.h +++ b/src/HOMARDGUI/MonCreateZone.h @@ -51,11 +51,15 @@ protected : QString _aZoneName; QString _aCaseName; + int _Orient; int _ZoneType; double _Xcentre, _Ycentre, _Zcentre, _Rayon ; - double _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneRayon; - double _Xmin, _Xmax, _Xincr, _Ymin, _Ymax, _Yincr, _Zmin, _Zmax, _Zincr, _DMax ; - double _ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax; + double _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneRayon ; + double _Xmin, _Xmax, _Xincr, _Ymin, _Ymax, _Yincr, _Zmin, _Zmax, _Zincr ; + double _ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax ; + double _Xaxis, _Yaxis, _Zaxis, _RayonInt, _Haut ; + double _ZoneXaxis, _ZoneYaxis, _ZoneZaxis, _ZoneRayonInt, _ZoneHaut ; + double _DMax ; bool Chgt; @@ -72,6 +76,8 @@ protected : public slots: virtual void SetBox(); virtual void SetSphere(); + virtual void SetCylinder(); + virtual void SetPipe(); virtual void PushOnOK(); virtual bool PushOnApply(); virtual void PushOnHelp(); diff --git a/src/HOMARDGUI/MonEditBoundaryAn.cxx b/src/HOMARDGUI/MonEditBoundaryAn.cxx index dc4a67ab..5526fde6 100644 --- a/src/HOMARDGUI/MonEditBoundaryAn.cxx +++ b/src/HOMARDGUI/MonEditBoundaryAn.cxx @@ -52,64 +52,62 @@ MonEditBoundaryAn::~MonEditBoundaryAn() void MonEditBoundaryAn::InitValEdit() // ------------------------------------------------------------------------ { - LEBoundaryName->setText(_aBoundaryAnName); - LEBoundaryName->setReadOnly(true); - _BoundaryType = aBoundaryAn->GetBoundaryType(); - InitValBoundaryAnLimit(); - if (_aCaseName != QString("")) InitValBoundaryAn(); - switch (_BoundaryType) + LEBoundaryName->setText(_aBoundaryAnName); + LEBoundaryName->setReadOnly(true); + _BoundaryType = aBoundaryAn->GetBoundaryType(); + MESSAGE("_BoundaryType : "<<_BoundaryType); + InitValBoundaryAnLimit(); + if (_aCaseName != QString("")) InitValBoundaryAn(); + switch (_BoundaryType) + { + case 1 : // il s agit d un cylindre + { + InitValBoundaryAnCylindre(); + SetCylinder(); + break; + } + case 2: // il s agit d une sphere { - case 1 : // il s agit d une boite - { - InitValBoundaryAnCylindre(); - SetCylinder(); - break; - } - case 2: // il s agit d une sphere - { - InitValBoundaryAnSphere(); - SetSphere(); - break; - } - }; + InitValBoundaryAnSphere(); + SetSphere(); + break; + } + }; } // ------------------------------------------------------------------------ void MonEditBoundaryAn::InitValBoundaryAnLimit() // ------------------------------------------------------------------------ { - HOMARD::double_array_var mesCoordLimits = aBoundaryAn->GetLimit(); - ASSERT(mesCoordLimits->length() == 3 ); - _Xincr=mesCoordLimits[0]; - _Yincr=mesCoordLimits[1]; - _Zincr=mesCoordLimits[2]; - + HOMARD::double_array_var mesCoordLimits = aBoundaryAn->GetLimit(); + ASSERT(mesCoordLimits->length() == 3 ); + _Xincr=mesCoordLimits[0]; + _Yincr=mesCoordLimits[1]; + _Zincr=mesCoordLimits[2]; } // ------------------------------------------------------------------------ void MonEditBoundaryAn::InitValBoundaryAnCylindre() // ------------------------------------------------------------------------ { - HOMARD::double_array_var mesCoordBoundary = aBoundaryAn->GetCylinder(); - ASSERT(mesCoordBoundary->length() == 7 ); - _BoundaryAnXcentre=mesCoordBoundary[0]; - _BoundaryAnYcentre=mesCoordBoundary[1]; - _BoundaryAnZcentre=mesCoordBoundary[2]; - _BoundaryAnXaxis=mesCoordBoundary[3]; - _BoundaryAnYaxis=mesCoordBoundary[4]; - _BoundaryAnZaxis=mesCoordBoundary[5]; - _BoundaryAnRayon=mesCoordBoundary[6]; - + HOMARD::double_array_var mesCoordBoundary = aBoundaryAn->GetCoords(); + ASSERT(mesCoordBoundary->length() == 7 ); + _BoundaryAnXcentre=mesCoordBoundary[0]; + _BoundaryAnYcentre=mesCoordBoundary[1]; + _BoundaryAnZcentre=mesCoordBoundary[2]; + _BoundaryAnXaxis=mesCoordBoundary[3]; + _BoundaryAnYaxis=mesCoordBoundary[4]; + _BoundaryAnZaxis=mesCoordBoundary[5]; + _BoundaryAnRayon=mesCoordBoundary[6]; } // ------------------------------------------------------------------------ void MonEditBoundaryAn::InitValBoundaryAnSphere() // ------------------------------------------------------------------------ { - HOMARD::double_array_var mesCoordBoundary = aBoundaryAn->GetSphere(); - ASSERT(mesCoordBoundary->length() == 4 ); - _BoundaryAnXcentre=mesCoordBoundary[0]; - _BoundaryAnYcentre=mesCoordBoundary[1]; - _BoundaryAnZcentre=mesCoordBoundary[2]; - _BoundaryAnRayon=mesCoordBoundary[3]; - + HOMARD::double_array_var mesCoordBoundary = aBoundaryAn->GetCoords(); + ASSERT(mesCoordBoundary->length() == 4 ); + _BoundaryAnXcentre=mesCoordBoundary[0]; + _BoundaryAnYcentre=mesCoordBoundary[1]; + _BoundaryAnZcentre=mesCoordBoundary[2]; + _BoundaryAnRayon=mesCoordBoundary[3]; } // ------------------------------------------------------------------------ void MonEditBoundaryAn::SetCylinder() @@ -169,39 +167,26 @@ void MonEditBoundaryAn::SetSphere() SpinBox_Rayon->setMinimum(0.); SpinBox_Rayon->setValue(_BoundaryAnRayon); } - - // --------------------------------------------------- bool MonEditBoundaryAn::CreateOrUpdateBoundaryAn() //---------------------------------------------------- -// Pas de Creation de la zone // Mise a jour des attributs de la BoundaryAn - { - try + switch (_BoundaryType) { - aBoundaryAn->SetBoundaryType(_BoundaryType); - switch (_BoundaryType) + case 1 : // il s agit d un cylindre { - case 1 : // il s agit d un cylindre - { - aBoundaryAn->SetCylinder(_BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnXaxis, _BoundaryAnYaxis, _BoundaryAnZaxis, _BoundaryAnRayon ); - break; - } - - case 2 : // il s agit d une sphere - { - aBoundaryAn->SetSphere(_BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnRayon); - break; - } + aBoundaryAn->SetCylinder(_BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnXaxis, _BoundaryAnYaxis, _BoundaryAnZaxis, _BoundaryAnRayon ); + break; + } + case 2 : // il s agit d une sphere + { + aBoundaryAn->SetSphere(_BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnRayon); + break; } - if (Chgt) _myHomardGen->InvalideBoundary(_aBoundaryAnName.toStdString().c_str()); - HOMARD_UTILS::updateObjBrowser(); - } - catch( const SALOME::SALOME_Exception& S_ex ) { - SalomeApp_Tools::QtCatchCorbaException( S_ex ); - return false; } + if (Chgt) _myHomardGen->InvalideBoundary(_aBoundaryAnName.toStdString().c_str()); + HOMARD_UTILS::updateObjBrowser(); return true; } diff --git a/src/HOMARDGUI/MonEditCase.cxx b/src/HOMARDGUI/MonEditCase.cxx index 3d0672fc..1c2680fd 100644 --- a/src/HOMARDGUI/MonEditCase.cxx +++ b/src/HOMARDGUI/MonEditCase.cxx @@ -54,132 +54,146 @@ MonEditCase::~MonEditCase() void MonEditCase::InitValEdit() // ------------------------------ { - MESSAGE("Debut de MonEditCase::InitValEdit"); - LECaseName->setText(_aCaseName); - LECaseName->setReadOnly(true); - - QString aDirName = aCase->GetDirName(); - LEDirName->setText(aDirName); - LEDirName->setReadOnly(true); - PushDir->setVisible(0); - - QString _aitername=aCase->GetIter0Name(); - HOMARD::HOMARD_Iteration_var aIter = _myHomardGen->GetIteration(_aitername.toStdString().c_str()); - QString aFileName = aIter->GetMeshFile(); - LEFileName->setText(aFileName); - LEFileName->setReadOnly(true); - PushFichier->setVisible(0); - - int ConfType=aCase->GetConfType(); - if(ConfType==1) - { - GBTypeNoConf->setVisible(0); - RBConforme->setChecked(true); - } - else - { - RBNonConforme->setChecked(true); - GBTypeNoConf->setVisible(1); - RB1NpM->setEnabled(false); - RB1NpA->setEnabled(false); - RBQuelconque->setEnabled(false); - }; - - if (_ConfType==2) { RB1NpM->setChecked(true);}; - if (_ConfType==3) { RB1NpA->setChecked(true);}; - if (_ConfType==4) { RBQuelconque->setChecked(true);}; - - RBNonConforme->setEnabled(false); - RBConforme->setEnabled(false); + MESSAGE("Debut de MonEditCase::InitValEdit"); + LECaseName->setText(_aCaseName); + LECaseName->setReadOnly(true); + + QString aDirName = aCase->GetDirName(); + LEDirName->setText(aDirName); + LEDirName->setReadOnly(true); + PushDir->setVisible(0); + + QString _aitername=aCase->GetIter0Name(); + HOMARD::HOMARD_Iteration_var aIter = _myHomardGen->GetIteration(_aitername.toStdString().c_str()); + QString aFileName = aIter->GetMeshFile(); + LEFileName->setText(aFileName); + LEFileName->setReadOnly(true); + PushFichier->setVisible(0); + + int ConfType=aCase->GetConfType(); + if(ConfType==1) + { + GBTypeNoConf->setVisible(0); + RBConforme->setChecked(true); + } + else + { + RBNonConforme->setChecked(true); + GBTypeNoConf->setVisible(1); + RB1NpM->setEnabled(false); + RB1NpA->setEnabled(false); + RBQuelconque->setEnabled(false); + }; + + if (_ConfType==2) { RB1NpM->setChecked(true);}; + if (_ConfType==3) { RB1NpA->setChecked(true);}; + if (_ConfType==4) { RBQuelconque->setChecked(true);}; + + RBNonConforme->setEnabled(false); + RBConforme->setEnabled(false); // Non affichage du mode de suivi de frontiere - CBBoundaryA->setVisible(0); - GBBoundaryA->setVisible(0); - CBBoundaryD->setVisible(0); - GBBoundaryD->setVisible(0); + CBBoundaryA->setVisible(0); + GBBoundaryA->setVisible(0); + CBBoundaryD->setVisible(0); + GBBoundaryD->setVisible(0); // On passe en revue tous les couples (frontiere,groupe) du cas - HOMARD::ListBoundaryGroupType_var mesBoundarys = aCase->GetBoundaryGroup(); - if (mesBoundarys->length()>0) - { - QStringList ListeFron ; - QString NomFron ; - bool BounDi = false ; - bool BounAn = false ; - for (int i=0; ilength(); i++) - { + HOMARD::ListBoundaryGroupType_var mesBoundarys = aCase->GetBoundaryGroup(); + if (mesBoundarys->length()>0) + { + QStringList ListeFron ; + QString NomFron ; + bool BounDi = false ; + bool BounAn = false ; + for (int i=0; ilength(); i++) + { // Nom de la frontiere - NomFron = mesBoundarys[i++]; - MESSAGE("NomFron "<GetBoundary(NomFron.toStdString().c_str()); - int type_obj = myBoundary->GetBoundaryType() ; - + HOMARD::HOMARD_Boundary_var myBoundary = _myHomardGen->GetBoundary(NomFron.toStdString().c_str()); + int type_obj = myBoundary->GetBoundaryType() ; // C'est une frontiere discrete // Rermarque : on ne gere pas les groupes - if ( type_obj==0 ) - { - BounDi = true ; - CBBoundaryDi->addItem(NomFron); - } - + if ( type_obj==0 ) + { + BounDi = true ; + CBBoundaryDi->addItem(NomFron); + } // C'est une frontiere analytique - else - { - BounAn = true ; - int nbcol = TWBoundary->columnCount(); + else + { + BounAn = true ; + int nbcol = TWBoundary->columnCount(); // On ajoute une ligne pour le groupe - TWBoundary->insertRow(0); + TWBoundary->insertRow(0); // La colonne 0 comporte le nom du groupe - TWBoundary->setItem( 0, 0, new QTableWidgetItem(QString(mesBoundarys[i]).trimmed())); + TWBoundary->setItem( 0, 0, new QTableWidgetItem(QString(mesBoundarys[i]).trimmed())); // TWBoundary->item( 0, 0 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable ); // Chacune des colonnes suivantes est associé a une frontiere deja presente : on y met une // case non cochee - for ( int j = 1; j < nbcol; j++ ) - { - TWBoundary->setItem( 0, j, new QTableWidgetItem( QString ("") ) ); - TWBoundary->item( 0, j )->setFlags( 0 ); - TWBoundary->item( 0, j )->setFlags( Qt::ItemIsUserCheckable ); - TWBoundary->item( 0, j )->setCheckState( Qt::Unchecked ); - } + for ( int j = 1; j < nbcol; j++ ) + { + TWBoundary->setItem( 0, j, new QTableWidgetItem( QString ("") ) ); + TWBoundary->item( 0, j )->setFlags( 0 ); + TWBoundary->item( 0, j )->setFlags( Qt::ItemIsUserCheckable ); + TWBoundary->item( 0, j )->setCheckState( Qt::Unchecked ); + } // On cherche si la frontiere en cours d'examen a deja ete rencontree : // si oui, on stocke son numero de colonne - int ok = -1 ; - for ( int nufr = 0 ; nufritem( 0, ok )->setCheckState( Qt::Checked ); - } - } - MESSAGE("BounDi "<setVisible(1); -// on rend les cases inactives. On ne peut pas le faire pour le tableau sinon on perd l'ascenseur ! - int nbcol = TWBoundary->columnCount(); - int nbrow = TWBoundary->rowCount(); - for ( int i = 0; i < nbrow; i++ ) - { for ( int j = 0; j < nbcol; j++ ) TWBoundary->item( i, j )->setFlags( !Qt::ItemIsEnabled ); } -// on met un nom blanc au coin - QTableWidgetItem *__colItem = new QTableWidgetItem(); - __colItem->setText(QApplication::translate("CreateCase", "", 0, QApplication::UnicodeUTF8)); - TWBoundary->setHorizontalHeaderItem(0, __colItem); -// on cache le bouton New - PBBoundaryAnNew->setVisible(0); + if ( ok < 0 ) + { + ListeFron.append(NomFron); + ok = ListeFron.size() ; + addBoundaryAn(NomFron); } - if ( BounDi ) - { GBBoundaryD->setVisible(1); - CBBoundaryDi->setDisabled(true); - PBBoundaryDiNew->setVisible(0);} +// on coche la case correspondant au couple (frontiere,groupe) en cours d'examen + TWBoundary->item( 0, ok )->setCheckState( Qt::Checked ); } + } + MESSAGE("BounDi "<setVisible(1); +// On rend les cases non modifiables. +// On ne peut pas le faire pour tout le tableau sinon on perd l'ascenseur ! + int nbcol = TWBoundary->columnCount(); + int nbrow = TWBoundary->rowCount(); + for ( int i = 0; i < nbrow; i++ ) + { for ( int j = 0; j < nbcol; j++ ) TWBoundary->item( i, j )->setFlags( !Qt::ItemIsEnabled ); } +// on met un nom blanc au coin + QTableWidgetItem *__colItem = new QTableWidgetItem(); + __colItem->setText(QApplication::translate("CreateCase", "", 0, QApplication::UnicodeUTF8)); + TWBoundary->setHorizontalHeaderItem(0, __colItem); +// on cache les boutons inutiles + PBBoundaryAnNew->setVisible(0); + PBBoundaryAnHelp->setVisible(0); + } + if ( BounDi ) + { GBBoundaryD->setVisible(1); + CBBoundaryDi->setDisabled(true); + PBBoundaryDiNew->setVisible(0); + PBBoundaryDiHelp->setVisible(0); } + } +// Les options avancees (non modifiables) + CBAdvanced->setVisible(0) ; + int NivMax = aCase->GetNivMax(); + double DiamMin = aCase->GetDiamMin(); + if ( NivMax > 0 ) + { GBAdvancedOptions->setVisible(1); + spinBoxNivMax->setValue(NivMax); + spinBoxNivMax->setDisabled(true); + doubleSpinBoxDiamMin->setValue(DiamMin); + doubleSpinBoxDiamMin->setDisabled(true); + } + else + { GBAdvancedOptions->setVisible(0); } +// + adjustSize(); } // ------------------------------------- diff --git a/src/HOMARDGUI/MonEditHypothesis.cxx b/src/HOMARDGUI/MonEditHypothesis.cxx index e9521e97..bc2f9651 100644 --- a/src/HOMARDGUI/MonEditHypothesis.cxx +++ b/src/HOMARDGUI/MonEditHypothesis.cxx @@ -22,8 +22,6 @@ using namespace std; #include "MonEditHypothesis.h" #include "MonEditListGroup.h" -#include - #include "SalomeApp_Tools.h" #include "HOMARDGUI_Utils.h" #include "HomardQtCommun.h" @@ -201,6 +199,7 @@ void MonEditHypothesis::InitAdaptChamps() _ThreshR = aInfosHypo->ThreshR; _TypeThC = aInfosHypo->TypeThC; _ThreshC = aInfosHypo->ThreshC; + _UsField = aInfosHypo->UsField; _UsCmpI = aInfosHypo->UsCmpI; @@ -269,6 +268,12 @@ void MonEditHypothesis::InitAdaptChamps() { RBL2->setText(QObject::tr("HOM_HYPO_NORM_L2")); RBInf->setText(QObject::tr("HOM_HYPO_NORM_INF")); } + if ( _UsField == 0 ) { CBJump->hide(); } + else + { + CBJump->setChecked(true); + CBJump->setEnabled(false); + } if ( _UsCmpI == 0 ) { RBL2->setChecked(true); diff --git a/src/HOMARDGUI/MonEditIteration.cxx b/src/HOMARDGUI/MonEditIteration.cxx index 84786da9..bfa5e034 100644 --- a/src/HOMARDGUI/MonEditIteration.cxx +++ b/src/HOMARDGUI/MonEditIteration.cxx @@ -21,8 +21,6 @@ using namespace std; #include "MonEditIteration.h" -#include - #include "SalomeApp_Tools.h" #include "HOMARDGUI_Utils.h" #include "HomardQtCommun.h" diff --git a/src/HOMARDGUI/MonEditZone.cxx b/src/HOMARDGUI/MonEditZone.cxx index 01d3e98d..85b3b3ed 100644 --- a/src/HOMARDGUI/MonEditZone.cxx +++ b/src/HOMARDGUI/MonEditZone.cxx @@ -24,6 +24,11 @@ using namespace std; #include "SalomeApp_Tools.h" #include "HOMARDGUI_Utils.h" #include +#include +#include +#include +#include +#include // ------------------------------------------------------------------------ @@ -52,71 +57,146 @@ MonEditZone::~MonEditZone() void MonEditZone::InitValEdit() // ------------------------------------------------------------------------ { - LEZoneName->setText(_aZoneName); - LEZoneName->setReadOnly(true); - _ZoneType = aZone->GetZoneType(); - InitValZoneLimit(); - if (_aCaseName != QString("")) InitValZone(); - switch (_ZoneType) + MESSAGE("InitValEdit "); + LEZoneName->setText(_aZoneName); + LEZoneName->setReadOnly(true); + _ZoneType = aZone->GetZoneType(); + MESSAGE("InitValEdit _ZoneType ="<<_ZoneType); + InitValZoneLimit(); + if (_aCaseName != QString("")) InitValZone(); + switch (_ZoneType) + { + case 11 : // il s agit d un rectangle + { } + case 12 : // il s agit d un rectangle + { } + case 13 : // il s agit d un rectangle + { } + case 2 : // il s agit d une boite { - case 2 : // il s agit d une boite - { - InitValZoneBox(); - SetBox(); - break; - } - case 4 : // il s agit d une sphere - { - InitValZoneSphere(); - SetSphere(); - break; - } - }; + InitValZoneBox(); + SetBox(); + break; + } + case 4 : // il s agit d une sphere + { + InitValZoneSphere(); + SetSphere(); + break; + } + case 31 : // il s agit d un cercle issu d'un cylindre + { } + case 32 : // il s agit d un cercle issu d'un cylindre + { } + case 33 : // il s agit d un cercle issu d'un cylindre + { } + case 5 : // il s agit d un cylindre + { + InitValZoneCylinder(); + SetCylinder(); + break; + } + case 61 : // il s agit d un disque avec trou issu d'un tuyau + { } + case 62 : // il s agit d un disque avec trou issu d'un tuyau + { } + case 63 : // il s agit d un disque avec trou issu d'un tuyau + { } + case 7 : // il s agit d un tuyau + { + InitValZonePipe(); + SetPipe(); + break; + } + }; } // ------------------------------------------------------------------------ void MonEditZone::InitValZoneLimit() // ------------------------------------------------------------------------ { - HOMARD::double_array_var mesCoordLimits = aZone->GetLimit(); - ASSERT(mesCoordLimits->length() == 3 ); - _Xincr=mesCoordLimits[0]; - _Yincr=mesCoordLimits[1]; - _Zincr=mesCoordLimits[2]; - + HOMARD::double_array_var mesCoordLimits = aZone->GetLimit(); + ASSERT(mesCoordLimits->length() == 3 ); + _Xincr=mesCoordLimits[0]; + _Yincr=mesCoordLimits[1]; + _Zincr=mesCoordLimits[2]; } // ------------------------------------------------------------------------ void MonEditZone::InitValZoneBox() // ------------------------------------------------------------------------ { - HOMARD::double_array_var mesCoordZones = aZone->GetBox(); - ASSERT(mesCoordZones->length() == 6 ); - _ZoneXmin=mesCoordZones[0]; _ZoneXmax=mesCoordZones[1]; - _ZoneYmin=mesCoordZones[2]; _ZoneYmax=mesCoordZones[3]; - _ZoneZmin=mesCoordZones[4]; _ZoneZmax=mesCoordZones[5]; - + HOMARD::double_array_var mesCoordZones = aZone->GetCoords(); + ASSERT(mesCoordZones->length() == 6 ); + _ZoneXmin=mesCoordZones[0]; + _ZoneXmax=mesCoordZones[1]; + _ZoneYmin=mesCoordZones[2]; + _ZoneYmax=mesCoordZones[3]; + _ZoneZmin=mesCoordZones[4]; + _ZoneZmax=mesCoordZones[5]; } // ------------------------------------------------------------------------ void MonEditZone::InitValZoneSphere() // ------------------------------------------------------------------------ { - HOMARD::double_array_var mesCoordZones = aZone->GetSphere(); - ASSERT(mesCoordZones->length() == 4 ); - _ZoneXcentre=mesCoordZones[0]; - _ZoneYcentre=mesCoordZones[1]; - _ZoneZcentre=mesCoordZones[2]; - _ZoneRayon=mesCoordZones[3]; + HOMARD::double_array_var mesCoordZones = aZone->GetCoords(); + ASSERT(mesCoordZones->length() == 4 ); + _ZoneXcentre=mesCoordZones[0]; + _ZoneYcentre=mesCoordZones[1]; + _ZoneZcentre=mesCoordZones[2]; + _ZoneRayon=mesCoordZones[3]; } // ------------------------------------------------------------------------ +void MonEditZone::InitValZoneCylinder() +// ------------------------------------------------------------------------ +{ + HOMARD::double_array_var mesCoordZones = aZone->GetCoords(); + ASSERT(mesCoordZones->length() == 8 ); + _ZoneXcentre=mesCoordZones[0]; + _ZoneYcentre=mesCoordZones[1]; + _ZoneZcentre=mesCoordZones[2]; + _ZoneXaxis=mesCoordZones[3]; + _ZoneYaxis=mesCoordZones[4]; + _ZoneZaxis=mesCoordZones[5]; + _ZoneRayon=mesCoordZones[6]; + _ZoneHaut=mesCoordZones[7]; +} +// ------------------------------------------------------------------------ +void MonEditZone::InitValZonePipe() +// ------------------------------------------------------------------------ +{ + HOMARD::double_array_var mesCoordZones = aZone->GetCoords(); + ASSERT(mesCoordZones->length() == 9 ); + _ZoneXcentre=mesCoordZones[0]; + _ZoneYcentre=mesCoordZones[1]; + _ZoneZcentre=mesCoordZones[2]; + _ZoneXaxis=mesCoordZones[3]; + _ZoneYaxis=mesCoordZones[4]; + _ZoneZaxis=mesCoordZones[5]; + _ZoneRayon=mesCoordZones[6]; + _ZoneHaut=mesCoordZones[7]; + _ZoneRayonInt=mesCoordZones[8]; +} +// ------------------------------------------------------------------------ void MonEditZone::SetBox() // ------------------------------------------------------------------------ { + MESSAGE("SetBox "); gBBox->setVisible(1); gBSphere->setVisible(0); + gBCylindre->setVisible(0) ; + gBPipe->setVisible(0) ; RBBox->setChecked(1); adjustSize(); - _ZoneType=2; - RBSphere->setDisabled(true); + RBCylinder->setDisabled(true); + RBPipe->setDisabled(true); + if ( _ZoneType == 2 ) { RBSphere->setDisabled(true); } + else { RBSphere->setVisible(0); + RBPipe->setText(QApplication::translate("CreateZone", "Disk with hole", 0, QApplication::UnicodeUTF8)); + RBCylinder->setText(QApplication::translate("CreateZone", "Disk", 0, QApplication::UnicodeUTF8)); + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr() ; + QPixmap pix = resMgr->loadPixmap( "HOMARD", "boxdxy.png" ) ; + QIcon IS=QIcon(pix) ; + RBBox->setIcon(IS) ; } adjustSize(); SpinBox_Xmini->setValue(_ZoneXmin); @@ -139,6 +219,13 @@ void MonEditZone::SetBox() SpinBox_Zmini->setSingleStep(incr); SpinBox_Zmaxi->setSingleStep(incr); + if ( _ZoneType == 12 ) { SpinBox_Xmini->setDisabled(true) ; + SpinBox_Xmaxi->setDisabled(true) ; } + else if ( _ZoneType == 13 ) { SpinBox_Ymini->setDisabled(true) ; + SpinBox_Ymaxi->setDisabled(true) ; } + else if ( _ZoneType == 11 ) { SpinBox_Zmini->setDisabled(true) ; + SpinBox_Zmaxi->setDisabled(true) ; } + } // ------------------------------------------------------------------------ void MonEditZone::SetSphere() @@ -146,10 +233,13 @@ void MonEditZone::SetSphere() { gBBox->setVisible(0); gBSphere->setVisible(1); + gBCylindre->setVisible(0) ; + gBPipe->setVisible(0) ; RBSphere->setChecked(1); RBBox->setDisabled(true); + RBCylinder->setDisabled(true); + RBPipe->setDisabled(true); adjustSize(); - _ZoneType=4 ; SpinBox_Xcentre->setValue(_ZoneXcentre); if ( _Xincr > 0) { SpinBox_Xcentre->setSingleStep(_Xincr); } @@ -166,6 +256,128 @@ void MonEditZone::SetSphere() SpinBox_Rayon->setMinimum(0.); SpinBox_Rayon->setValue(_ZoneRayon); } +// ------------------------------------------------------------------------ +void MonEditZone::SetCylinder() +// ------------------------------------------------------------------------ +{ + MESSAGE("SetCylinder _Xincr ="<<_Xincr<< " _Yincr ="<<_Yincr<< " _Zincr ="<<_Zincr); + gBBox->setVisible(0); + gBSphere->setVisible(0); + gBCylindre->setVisible(1) ; + gBPipe->setVisible(0) ; + RBCylinder->setChecked(1); + RBBox->setDisabled(true); + RBPipe->setDisabled(true); + if ( _ZoneType == 5 ) { RBSphere->setDisabled(true); } + else { RBSphere->setVisible(0); + RBPipe->setText(QApplication::translate("CreateZone", "Disk with hole", 0, QApplication::UnicodeUTF8)); + RBCylinder->setText(QApplication::translate("CreateZone", "Disk", 0, QApplication::UnicodeUTF8)); + TLXbase->setText(QApplication::translate("CreateZone", "X centre", 0, QApplication::UnicodeUTF8)); + TLYbase->setText(QApplication::translate("CreateZone", "Y centre", 0, QApplication::UnicodeUTF8)); + TLZbase->setText(QApplication::translate("CreateZone", "Z centre", 0, QApplication::UnicodeUTF8)); + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr() ; + QPixmap pix = resMgr->loadPixmap( "HOMARD", "disk.png" ) ; + QIcon IS=QIcon(pix) ; + RBCylinder->setIcon(IS) ; } + adjustSize(); + + SpinBox_Xbase->setValue(_ZoneXcentre); + if ( _Xincr > 0) { SpinBox_Xbase->setSingleStep(_Xincr); } + else { SpinBox_Xbase->setSingleStep(1) ; } + + SpinBox_Ybase->setValue(_ZoneYcentre); + if ( _Yincr > 0) { SpinBox_Ybase->setSingleStep(_Yincr); } + else { SpinBox_Ybase->setSingleStep(1) ; } + + SpinBox_Zbase->setValue(_ZoneZcentre); + if ( _Zincr > 0) { SpinBox_Zbase->setSingleStep(_Zincr); } + else { SpinBox_Zbase->setSingleStep(1) ;} + + SpinBox_Radius->setMinimum(0.); + SpinBox_Radius->setValue(_ZoneRayon); + + if ( _ZoneType == 5 ) + { SpinBox_Xaxis->setValue(_ZoneXaxis) ; + SpinBox_Yaxis->setValue(_ZoneYaxis) ; + SpinBox_Zaxis->setValue(_ZoneZaxis) ; + SpinBox_Haut->setValue(_ZoneHaut) ; + } + else + { SpinBox_Xaxis->setVisible(0) ; + SpinBox_Yaxis->setVisible(0) ; + SpinBox_Zaxis->setVisible(0) ; + SpinBox_Haut->setVisible(0) ; + TLXaxis->setVisible(0) ; + TLYaxis->setVisible(0) ; + TLZaxis->setVisible(0) ; + TLHaut->setVisible(0) ; + if ( _ZoneType == 32 ) { SpinBox_Xbase->setDisabled(true) ; } + else if ( _ZoneType == 33 ) { SpinBox_Ybase->setDisabled(true) ; } + else if ( _ZoneType == 31 ) { SpinBox_Zbase->setDisabled(true) ; } + } +} +// ------------------------------------------------------------------------ +void MonEditZone::SetPipe() +// ------------------------------------------------------------------------ +{ + MESSAGE("SetPipe _Xincr ="<<_Xincr<< " _Yincr ="<<_Yincr<< " _Zincr ="<<_Zincr); + gBBox->setVisible(0); + gBSphere->setVisible(0); + gBCylindre->setVisible(0) ; + gBPipe->setVisible(1) ; + RBPipe->setChecked(1); + RBBox->setDisabled(true); + RBCylinder->setDisabled(true); + if ( _ZoneType == 7 ) { RBSphere->setDisabled(true); } + else { RBSphere->setVisible(0); + RBPipe->setText(QApplication::translate("CreateZone", "Disk with hole", 0, QApplication::UnicodeUTF8)); + RBCylinder->setText(QApplication::translate("CreateZone", "Disk", 0, QApplication::UnicodeUTF8)); + TLXbase_p->setText(QApplication::translate("CreateZone", "X centre", 0, QApplication::UnicodeUTF8)); + TLYbase_p->setText(QApplication::translate("CreateZone", "Y centre", 0, QApplication::UnicodeUTF8)); + TLZbase_p->setText(QApplication::translate("CreateZone", "Z centre", 0, QApplication::UnicodeUTF8)); + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr() ; + QPixmap pix = resMgr->loadPixmap( "HOMARD", "diskwithhole.png" ) ; + QIcon IS=QIcon(pix) ; + RBPipe->setIcon(IS) ; } + adjustSize(); + + SpinBox_Xbase_p->setValue(_ZoneXcentre); + if ( _Xincr > 0) { SpinBox_Xbase_p->setSingleStep(_Xincr); } + else { SpinBox_Xbase_p->setSingleStep(1) ; } + + SpinBox_Ybase_p->setValue(_ZoneYcentre); + if ( _Yincr > 0) { SpinBox_Ybase_p->setSingleStep(_Yincr); } + else { SpinBox_Ybase_p->setSingleStep(1) ; } + + SpinBox_Zbase_p->setValue(_ZoneZcentre); + 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 ( _ZoneType == 7 ) + { SpinBox_Xaxis_p->setValue(_ZoneXaxis) ; + SpinBox_Yaxis_p->setValue(_ZoneYaxis) ; + SpinBox_Zaxis_p->setValue(_ZoneZaxis) ; + SpinBox_Haut_p->setValue(_ZoneHaut) ; + } + else + { SpinBox_Xaxis_p->setVisible(0) ; + SpinBox_Yaxis_p->setVisible(0) ; + SpinBox_Zaxis_p->setVisible(0) ; + SpinBox_Haut_p->setVisible(0) ; + TLXaxis_p->setVisible(0) ; + TLYaxis_p->setVisible(0) ; + TLZaxis_p->setVisible(0) ; + TLHaut_p->setVisible(0) ; + if ( _ZoneType == 62 ) { SpinBox_Xbase_p->setDisabled(true) ; } + else if ( _ZoneType == 63 ) { SpinBox_Ybase_p->setDisabled(true) ; } + else if ( _ZoneType == 61 ) { SpinBox_Zbase_p->setDisabled(true) ; } + } +} // --------------------------------------------------- @@ -173,13 +385,46 @@ bool MonEditZone::CreateOrUpdateZone() //---------------------------------------------------- // Pas de Creation de la zone // Mise a jour des attributs de la Zone - { try { - aZone->SetZoneType(_ZoneType); - aZone->SetBox(_ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax); - aZone->SetSphere(_ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneRayon); + switch (_ZoneType) + { + case 11 : // il s agit d un rectangle + { } + case 12 : // il s agit d un rectangle + { } + case 13 : // il s agit d un rectangle + { } + case 2 : // il s agit d un parallelepipede + { aZone->SetBox( _ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax ); + break; + } + case 4 : // il s agit d une sphere + { aZone->SetSphere( _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneRayon ); + break; + } + case 31 : // il s agit d un disque issu d'un cylindre + { } + case 32 : // il s agit d un disque issu d'un cylindre + { } + case 33 : // il s agit d un disque issu d'un cylindre + { } + case 5 : // il s agit d un cylindre + { aZone->SetCylinder( _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneXaxis, _ZoneYaxis, _ZoneZaxis, _ZoneRayon, _ZoneHaut ); + break; + } + case 61 : // il s agit d un disque issu d'un cylindre + { } + case 62 : // il s agit d un disque issu d'un cylindre + { } + case 63 : // il s agit d un disque issu d'un cylindre + { } + case 7 : // il s agit d un tuyau + { aZone->SetPipe( _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneXaxis, _ZoneYaxis, _ZoneZaxis, _ZoneRayon, _ZoneHaut, _ZoneRayonInt ); + break; + } + } if (Chgt) _myHomardGen->InvalideZone(_aZoneName.toStdString().c_str()); HOMARD_UTILS::updateObjBrowser(); } diff --git a/src/HOMARDGUI/MonEditZone.h b/src/HOMARDGUI/MonEditZone.h index 9c0d138c..85be8106 100644 --- a/src/HOMARDGUI/MonEditZone.h +++ b/src/HOMARDGUI/MonEditZone.h @@ -40,11 +40,15 @@ public: protected : void SetBox(); void SetSphere(); + void SetCylinder(); + void SetPipe(); bool CreateOrUpdateZone(); void InitValEdit(); void InitValZoneLimit(); void InitValZoneBox(); void InitValZoneSphere(); + void InitValZoneCylinder(); + void InitValZonePipe(); public slots: diff --git a/src/HOMARD_I/HOMARD_Boundary_i.cxx b/src/HOMARD_I/HOMARD_Boundary_i.cxx index 764e3fba..6cb55875 100644 --- a/src/HOMARD_I/HOMARD_Boundary_i.cxx +++ b/src/HOMARD_I/HOMARD_Boundary_i.cxx @@ -133,21 +133,6 @@ void HOMARD_Boundary_i::SetCylinder( double X0, double X1, double X2, double X3, ASSERT( myHomardBoundary ); myHomardBoundary->SetCylinder( X0, X1, X2, X3, X4, X5, X6 ); } - -//============================================================================= -HOMARD::double_array* HOMARD_Boundary_i::GetCylinder() -{ - ASSERT( myHomardBoundary ); - HOMARD::double_array_var aResult = new HOMARD::double_array(); - std::vector mesCoor = myHomardBoundary->GetCylinder(); - aResult->length( mesCoor .size() ); - std::vector::const_iterator it; - int i = 0; - for ( it = mesCoor.begin(); it != mesCoor.end(); it++ ) - aResult[i++] = (*it); - return aResult._retn(); -} - //============================================================================= void HOMARD_Boundary_i::SetSphere( double Xcentre, double Ycentre, double ZCentre, double rayon ) { @@ -156,11 +141,11 @@ void HOMARD_Boundary_i::SetSphere( double Xcentre, double Ycentre, double ZCentr } //============================================================================= -HOMARD::double_array* HOMARD_Boundary_i::GetSphere() +HOMARD::double_array* HOMARD_Boundary_i::GetCoords() { ASSERT( myHomardBoundary ); HOMARD::double_array_var aResult = new HOMARD::double_array(); - std::vector mesCoor = myHomardBoundary->GetSphere(); + std::vector mesCoor = myHomardBoundary->GetCoords(); aResult->length( mesCoor .size() ); std::vector::const_iterator it; int i = 0; diff --git a/src/HOMARD_I/HOMARD_Boundary_i.hxx b/src/HOMARD_I/HOMARD_Boundary_i.hxx index 322c7c50..ac436486 100644 --- a/src/HOMARD_I/HOMARD_Boundary_i.hxx +++ b/src/HOMARD_I/HOMARD_Boundary_i.hxx @@ -30,19 +30,19 @@ class HOMARD_Boundary; class HOMARD_Boundary_i: public virtual POA_HOMARD::HOMARD_Boundary, public virtual PortableServer::ServantBase -{ +{ public: HOMARD_Boundary_i( CORBA::ORB_ptr orb, HOMARD::HOMARD_Gen_var gen_i ); HOMARD_Boundary_i(); - + virtual ~HOMARD_Boundary_i(); void SetName( const char* NomBoundary ); char* GetName(); char* GetDumpPython(); - + void SetBoundaryType( CORBA::Long BoundaryType ); - + CORBA::Long GetBoundaryType(); void SetMeshFile( const char* MeshFile ); @@ -50,20 +50,18 @@ public: void SetMeshName( const char* MeshName ); char* GetMeshName(); - - HOMARD::double_array* GetCylinder(); + void SetCylinder( double Xcentre, double Ycentre, double ZCentre, double Xaxe, double Yaxe, double Zaxe, double rayon ); - - HOMARD::double_array* GetSphere(); void SetSphere( double Xcentre, double Ycentre, double ZCentre, double rayon ); - + HOMARD::double_array* GetCoords(); + HOMARD::double_array* GetLimit(); void SetLimit( double Xincr, double Yincr, double Zincr); - - + + std::string Dump() const; bool Restore( const std::string& stream ); @@ -77,7 +75,7 @@ public: private: ::HOMARD_Boundary* myHomardBoundary; - + CORBA::ORB_ptr _orb; HOMARD::HOMARD_Gen_var _gen_i; }; diff --git a/src/HOMARD_I/HOMARD_Cas_i.cxx b/src/HOMARD_I/HOMARD_Cas_i.cxx index a2805240..281318e9 100755 --- a/src/HOMARD_I/HOMARD_Cas_i.cxx +++ b/src/HOMARD_I/HOMARD_Cas_i.cxx @@ -225,6 +225,30 @@ HOMARD::ListBoundaryGroupType* HOMARD_Cas_i::GetBoundaryGroup() } return aResult._retn(); } +//============================================================================= +void HOMARD_Cas_i::SetNivMax( CORBA::Long NivMax ) +{ + ASSERT( myHomardCas ); + myHomardCas->SetNivMax( NivMax ); +} +//============================================================================= +CORBA::Long HOMARD_Cas_i::GetNivMax() +{ + ASSERT( myHomardCas ); + return myHomardCas->GetNivMax(); +} +//============================================================================= +void HOMARD_Cas_i::SetDiamMin( CORBA::Double DiamMin ) +{ + ASSERT( myHomardCas ); + myHomardCas->SetDiamMin( DiamMin ); +} +//============================================================================= +CORBA::Double HOMARD_Cas_i::GetDiamMin() +{ + ASSERT( myHomardCas ); + return myHomardCas->GetDiamMin(); +} //============================================================================= std::string HOMARD_Cas_i::Dump() const diff --git a/src/HOMARD_I/HOMARD_Cas_i.hxx b/src/HOMARD_I/HOMARD_Cas_i.hxx index 2830ca1f..110690ef 100644 --- a/src/HOMARD_I/HOMARD_Cas_i.hxx +++ b/src/HOMARD_I/HOMARD_Cas_i.hxx @@ -46,6 +46,12 @@ public: void SetConfType( CORBA::Long ConfType ); CORBA::Long GetConfType(); + void SetNivMax( CORBA::Long NivMax ); + CORBA::Long GetNivMax(); + + void SetDiamMin( CORBA::Double DiamMin ); + CORBA::Double GetDiamMin(); + void AddIteration( const char* NomIteration ); char* GetIter0Name(); diff --git a/src/HOMARD_I/HOMARD_Gen_i.cxx b/src/HOMARD_I/HOMARD_Gen_i.cxx index a149d958..a5f00f7e 100755 --- a/src/HOMARD_I/HOMARD_Gen_i.cxx +++ b/src/HOMARD_I/HOMARD_Gen_i.cxx @@ -52,7 +52,7 @@ using namespace std; //======================================================================= //function : RemoveTabulation -//purpose : +//purpose : //======================================================================= std::string RemoveTabulation( std::string theScript ) { @@ -67,7 +67,7 @@ std::string RemoveTabulation( std::string theScript ) } return theScript; } - + //============================================================================= /*! * standard constructor @@ -106,7 +106,7 @@ HOMARD_Gen_i::~HOMARD_Gen_i() void HOMARD_Gen_i::addInStudy(SALOMEDS::Study_ptr theStudy) { ASSERT(!CORBA::is_nil(theStudy)); - MESSAGE("addInStudy: current study ID = " << GetCurrentStudyID()); + MESSAGE("addInStudy: ajout eventuel du composant HOMARD dans current study ID = " << GetCurrentStudyID()) ; SALOMEDS::StudyBuilder_var myBuilder = theStudy->NewBuilder(); // Create SComponent labelled 'homard' if it doesn't already exit @@ -173,14 +173,7 @@ int HOMARD_Gen_i::GetCurrentStudyID() void HOMARD_Gen_i::AssociateCaseIter(const char* nomCas, const char* nomIter, const char* labelIter) { MESSAGE( "AssociateCaseIter " << nomCas << " ," << nomIter << "," << labelIter ); - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return ; - }; + IsValidStudy () ; HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[nomCas]; if (CORBA::is_nil(myCase)) @@ -252,12 +245,14 @@ void HOMARD_Gen_i::SetEtatIter(const char* nomIter, const bool EtatCalcul) }; int number = myIteration->GetNumber() ; + const char* icone ; if ( number == 0 ) - PublishInStudyAttr(aStudyBuilder, aIterSO, NULL , NULL, "iter0.png", NULL) ; + icone = "iter0.png" ; else if (EtatCalcul) - PublishInStudyAttr(aStudyBuilder, aIterSO, NULL, NULL, "iter_calculee.png", NULL) ; + icone = "iter_calculee.png" ; else - PublishInStudyAttr(aStudyBuilder, aIterSO, NULL, NULL, "iter_non_calculee.png", NULL) ; + icone = "iter_non_calculee.png" ; + PublishInStudyAttr(aStudyBuilder, aIterSO, NULL , NULL, icone, NULL) ; aStudyBuilder->CommitCommand(); @@ -404,15 +399,7 @@ void HOMARD_Gen_i::InvalideIter(const char* nomIter) void HOMARD_Gen_i::AssociateHypoZone(const char* ZoneName, const char* nomHypothesis) { MESSAGE ( " AssociateHypoZone, ZoneName= " << ZoneName << ", nomHypo = " << nomHypothesis); - - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return ; - }; + IsValidStudy () ; HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypothesis]; ASSERT(!CORBA::is_nil(myHypo)); @@ -432,21 +419,14 @@ void HOMARD_Gen_i::AssociateHypoZone(const char* ZoneName, const char* nomHypoth myZone->AddHypo(nomHypothesis); myHypo->AddZone(ZoneName); + MESSAGE ( "Fin de AssociateHypoZone"); }; //===================================================================================== void HOMARD_Gen_i::DissociateHypoZone(const char* ZoneName, const char* nomHypothesis) { MESSAGE ( " DissociateHypoZone, ZoneName= " << ZoneName << ", nomHypo = " << nomHypothesis); - - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return ; - }; + IsValidStudy () ; HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypothesis]; ASSERT(!CORBA::is_nil(myHypo)); @@ -486,14 +466,7 @@ void HOMARD_Gen_i::DissociateHypoZone(const char* ZoneName, const char* nomHypot void HOMARD_Gen_i::AssociateIterIter(const char* nomIterParent, const char* nomIter) { MESSAGE ( "AssociateIterIter, nomIter = " << nomIter << " nomIterParent = " << nomIterParent); - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return ; - }; + IsValidStudy () ; HOMARD::HOMARD_Iteration_var myIterationParent = myContextMap[GetCurrentStudyID()]._mesIterations[nomIterParent]; ASSERT(!CORBA::is_nil(myIterationParent)); @@ -508,15 +481,7 @@ void HOMARD_Gen_i::AssociateIterIter(const char* nomIterParent, const char* nomI void HOMARD_Gen_i::AssociateIterHypo(const char* nomIter, const char* nomHypo) { MESSAGE("AssociateIterHypo, nomHypo = " << nomHypo << " nomIter = " << nomIter); - - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return ; - }; + IsValidStudy () ; HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypo]; ASSERT(!CORBA::is_nil(myHypo)); @@ -554,17 +519,10 @@ CORBA::Boolean HOMARD_Gen_i::VerifieDir(const char* nomDir) } //============================================================================= -HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char* MeshName, const char* FileName) +HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char* MeshName, const char* MeshFile) { MESSAGE ( "CreateCase, nomCas = " << nomCas << "MeshName = " << MeshName ); - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return 0; - }; + IsValidStudy () ; if ((myContextMap[GetCurrentStudyID()]._mesCas).find(nomCas)!=(myContextMap[GetCurrentStudyID()]._mesCas).end()) { @@ -582,7 +540,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char* myContextMap[GetCurrentStudyID()]._mesCas[nomCas] = myCase; - std::vector LesExtremes =GetBoundingBoxInMedFile(FileName); + std::vector LesExtremes =GetBoundingBoxInMedFile(MeshFile); HOMARD::extrema_var aSeq = new HOMARD::extrema(); if (LesExtremes.size()!=10) { return false; } aSeq->length(10); @@ -590,7 +548,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char* aSeq[i]=LesExtremes[i]; myCase->SetBoundingBox(aSeq); - std::set LesGroupes =GetListeGroupesInMedFile(FileName); + std::set LesGroupes =GetListeGroupesInMedFile(MeshFile); HOMARD::ListGroupType_var aSeqGroupe = new HOMARD::ListGroupType; aSeqGroupe->length(LesGroupes.size()); std::set::const_iterator it; @@ -618,14 +576,14 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char* anIter->SetDirName(DirName.str().c_str()); anIter->SetName(nomIter.c_str()); - anIter->SetMeshFile(FileName); + anIter->SetMeshFile(MeshFile); anIter->SetMeshName(MeshName); anIter->SetNumber(0); AssociateCaseIter (nomCas,nomIter.c_str(),"IterationHomard"); SetEtatIter(nomIter.c_str(),true); // - PublishResultInSmesh(FileName, 0); + PublishResultInSmesh(MeshFile, 0); return HOMARD::HOMARD_Cas::_duplicate(myCase); } @@ -633,14 +591,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char* //============================================================================= HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::GetCas(const char* nomCas) { - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return 0; - }; + IsValidStudy () ; HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[nomCas]; if (CORBA::is_nil(myCase)) { @@ -656,14 +607,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::GetCas(const char* nomCas) //============================================================================= HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::GetZone(const char* ZoneName) { - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return 0; - }; + IsValidStudy () ; HOMARD::HOMARD_Zone_var myZone = myContextMap[GetCurrentStudyID()]._mesZones[ZoneName]; ASSERT(!CORBA::is_nil(myZone)); return HOMARD::HOMARD_Zone::_duplicate(myZone); @@ -672,15 +616,7 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::GetZone(const char* ZoneName) //============================================================================= HOMARD::HOMARD_Hypothesis_ptr HOMARD_Gen_i::GetHypothesis(const char* nomHypothesis) { - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return 0; - }; - + IsValidStudy () ; HOMARD::HOMARD_Hypothesis_var myHypothesis = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypothesis]; ASSERT(!CORBA::is_nil(myHypothesis)); return HOMARD::HOMARD_Hypothesis::_duplicate(myHypothesis); @@ -689,14 +625,7 @@ HOMARD::HOMARD_Hypothesis_ptr HOMARD_Gen_i::GetHypothesis(const char* nomHypothe //============================================================================= HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::GetIteration(const char* nomIteration) { - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return 0; - }; + IsValidStudy () ; HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIteration]; ASSERT(!CORBA::is_nil(myIteration)); return HOMARD::HOMARD_Iteration::_duplicate(myIteration); @@ -704,14 +633,7 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::GetIteration(const char* nomIteratio //============================================================================= HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::GetBoundary(const char* nomBoundary) { - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return 0; - }; + IsValidStudy () ; HOMARD::HOMARD_Boundary_var myBoundary = myContextMap[GetCurrentStudyID()]._mesBoundarys[nomBoundary]; ASSERT(!CORBA::is_nil(myBoundary)); @@ -722,14 +644,7 @@ HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::GetBoundary(const char* nomBoundary) HOMARD::HOMARD_Hypothesis_ptr HOMARD_Gen_i::CreateHypothesis(const char* nomHypothesis) { MESSAGE ( "CreateHypothesis, nomHypothesis = " << nomHypothesis ); - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return 0; - }; + IsValidStudy () ; if ((myContextMap[GetCurrentStudyID()]._mesHypotheses).find(nomHypothesis) != (myContextMap[GetCurrentStudyID()]._mesHypotheses).end()) { @@ -754,14 +669,7 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* nomIterat //============================================================================================================ { MESSAGE ("CreateIteration, nomIteration = " << nomIteration << "nomIterParent = " << nomIterParent); - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return 0; - }; + IsValidStudy () ; HOMARD::HOMARD_Iteration_var myIterationParent = myContextMap[GetCurrentStudyID()]._mesIterations[nomIterParent]; if (CORBA::is_nil(myIterationParent)) @@ -825,10 +733,10 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* nomIterat // cas le plus frequent. // Si on a plusieurs branches, donc des iterations a meme niveau d'adaptation, utiliser // le nombre d'iterations du cas permet d'eviter les collisions. - std::stringstream FileName; + std::stringstream MeshFile; const char* nomDir = myCase->GetDirName(); - FileName << nomDir << "/maill." << iaux.str() << ".med"; - myIteration->SetMeshFile(FileName.str().c_str()); + MeshFile << nomDir << "/maill." << iaux.str() << ".med"; + myIteration->SetMeshFile(MeshFile.str().c_str()); // Association avec le cas et l'iteration precedente std::string label = "IterationHomard_" + std::string(nomIterParent); @@ -842,15 +750,8 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* nomIterat //============================================================================= HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundary(const char* BoundaryName, CORBA::Long BoundaryType) { - MESSAGE ("BoundaryName = " << BoundaryName << ", BoundaryType = " << BoundaryType); - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return 0; - }; + MESSAGE ("CreateBoundary, BoundaryName = " << BoundaryName << ", BoundaryType = " << BoundaryType); + IsValidStudy () ; if ((myContextMap[GetCurrentStudyID()]._mesBoundarys).find(BoundaryName)!=(myContextMap[GetCurrentStudyID()]._mesBoundarys).end()) { @@ -870,24 +771,48 @@ HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundary(const char* BoundaryNam SALOMEDS::SObject_var aSO; SALOMEDS::SObject_var aResultSO=PublishInStudy(myCurrentStudy, aSO, myBoundary, BoundaryName); -// Limites par defaut pour initialiser en cas de lancement par python + return HOMARD::HOMARD_Boundary::_duplicate(myBoundary); +} +//============================================================================= +HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundaryDi(const char* BoundaryName, const char* MeshName, const char* MeshFile) +{ + MESSAGE ("CreateBoundaryDi, BoundaryName = " << BoundaryName << "MeshName = " << MeshName ); + HOMARD::HOMARD_Boundary_var myBoundary = CreateBoundary(BoundaryName, 0); + myBoundary->SetMeshFile( MeshFile ) ; + myBoundary->SetMeshName( MeshName ) ; return HOMARD::HOMARD_Boundary::_duplicate(myBoundary); } +//============================================================================= +HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundaryCylinder(const char* BoundaryName, + double Xcentre, double Ycentre, double Zcentre, + double Xaxis, double Yaxis, double Zaxis, + double Rayon) +{ + MESSAGE ("CreateBoundaryCylinder, BoundaryName = " << BoundaryName ) ; + HOMARD::HOMARD_Boundary_var myBoundary = CreateBoundary(BoundaryName, 1) ; + myBoundary->SetCylinder( Xcentre, Ycentre, Zcentre, Xaxis, Yaxis, Zaxis, Rayon ) ; + + return HOMARD::HOMARD_Boundary::_duplicate(myBoundary) ; +} +//============================================================================= +HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundarySphere(const char* BoundaryName, + double Xcentre, double Ycentre, double Zcentre, + double Rayon) +{ + MESSAGE ("CreateBoundarySphere, BoundaryName = " << BoundaryName ) ; + HOMARD::HOMARD_Boundary_var myBoundary = CreateBoundary(BoundaryName, 2) ; + myBoundary->SetSphere( Xcentre, Ycentre, Zcentre, Rayon ) ; + + return HOMARD::HOMARD_Boundary::_duplicate(myBoundary) ; +} //============================================================================= HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZone(const char* ZoneName, CORBA::Long ZoneType) { - MESSAGE ("ZoneName = " << ZoneName << ", ZoneType = " << ZoneType); - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return 0; - }; + MESSAGE ("CreateZone, ZoneName = " << ZoneName << ", ZoneType = " << ZoneType); + IsValidStudy () ; if ((myContextMap[GetCurrentStudyID()]._mesZones).find(ZoneName)!=(myContextMap[GetCurrentStudyID()]._mesZones).end()) { @@ -909,19 +834,161 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZone(const char* ZoneName, CORBA::Lo return HOMARD::HOMARD_Zone::_duplicate(myZone); } +//============================================================================= +HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneBox(const char* ZoneName, + double Xmini, double Xmaxi, + double Ymini, double Ymaxi, + double Zmini, double Zmaxi) +{ + MESSAGE ("CreateZoneBox, ZoneName = " << ZoneName ) ; + HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 2) ; + myZone->SetBox ( Xmini, Xmaxi, Ymini, Ymaxi, Zmini, Zmaxi) ; + + return HOMARD::HOMARD_Zone::_duplicate(myZone) ; +} +//============================================================================= +HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneSphere(const char* ZoneName, + double Xcentre, double Ycentre, double Zcentre, double Rayon) +{ + MESSAGE ("CreateZoneSphere, ZoneName = " << ZoneName ) ; + HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 4) ; + myZone->SetSphere( Xcentre, Ycentre, Zcentre, Rayon ) ; + + return HOMARD::HOMARD_Zone::_duplicate(myZone) ; +} +//============================================================================= +HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneCylinder(const char* ZoneName, + double Xcentre, double Ycentre, double Zcentre, + double Xaxe, double Yaxe, double Zaxe, + double Rayon, double Haut) +{ + MESSAGE ("CreateZoneCylinder, ZoneName = " << ZoneName ) ; + HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 5) ; + myZone->SetCylinder( Xcentre, Ycentre, Zcentre, Xaxe, Yaxe, Zaxe, Rayon, Haut ) ; + + return HOMARD::HOMARD_Zone::_duplicate(myZone) ; +} +//============================================================================= +HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZonePipe(const char* ZoneName, + double Xcentre, double Ycentre, double Zcentre, + double Xaxe, double Yaxe, double Zaxe, + double Rayon, double Haut, double Rayonint) +{ + MESSAGE ("CreateZonePipe, ZoneName = " << ZoneName ) ; + HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 7) ; + myZone->SetPipe( Xcentre, Ycentre, Zcentre, Xaxe, Yaxe, Zaxe, Rayon, Haut, Rayonint ) ; + + return HOMARD::HOMARD_Zone::_duplicate(myZone) ; +} +//============================================================================= +HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneBox2D(const char* ZoneName, + double Umini, double Umaxi, + double Vmini, double Vmaxi, + CORBA::Long Orient) +{ + MESSAGE ("CreateZoneBox2D, ZoneName = " << ZoneName ) ; +// MESSAGE ("Umini = " << Umini << ", Umaxi =" << Umaxi ) ; +// MESSAGE ("Vmini = " << Vmini << ", Vmaxi =" << Vmaxi ) ; +// MESSAGE ("Orient = " << Orient ) ; + + double Xmini, Xmaxi ; + double Ymini, Ymaxi ; + double Zmini, Zmaxi ; + if ( Orient == 1 ) + { Xmini = Umini ; + Xmaxi = Umaxi ; + Ymini = Vmini ; + Ymaxi = Vmaxi ; + Zmini = 0. ; + Zmaxi = 0. ; } + else if ( Orient == 2 ) + { Xmini = 0. ; + Xmaxi = 0. ; + Ymini = Umini ; + Ymaxi = Umaxi ; + Zmini = Vmini ; + Zmaxi = Vmaxi ; } + else if ( Orient == 3 ) + { Xmini = Vmini ; + Xmaxi = Vmaxi ; + Ymini = 0. ; + Ymaxi = 0. ; + Zmini = Umini ; + Zmaxi = Umaxi ; } + else { ASSERT( Orient >= 1 and Orient <= 3 ) ; } + + HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 10+Orient) ; + myZone->SetBox ( Xmini, Xmaxi, Ymini, Ymaxi, Zmini, Zmaxi) ; + + return HOMARD::HOMARD_Zone::_duplicate(myZone) ; +} +//============================================================================= +HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneDisk(const char* ZoneName, + double Ucentre, double Vcentre, + double Rayon, + CORBA::Long Orient) +{ + MESSAGE ("CreateZoneDisk, ZoneName = " << ZoneName ) ; + double Xcentre ; + double Ycentre ; + double Zcentre ; + if ( Orient == 1 ) + { Xcentre = Ucentre ; + Ycentre = Vcentre ; + Zcentre = 0. ; } + else if ( Orient == 2 ) + { Xcentre = 0. ; + Ycentre = Ucentre ; + Zcentre = Vcentre ; } + else if ( Orient == 3 ) + { Xcentre = Vcentre ; + Ycentre = 0. ; + Zcentre = Ucentre ; } + else { ASSERT( Orient >= 1 and Orient <= 3 ) ; } + + HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 30+Orient) ; + myZone->SetCylinder( Xcentre, Ycentre, Zcentre, 0., 0., 1., Rayon, 1. ) ; + + return HOMARD::HOMARD_Zone::_duplicate(myZone) ; +} +//============================================================================= +HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneDiskWithHole(const char* ZoneName, + double Ucentre, double Vcentre, + double Rayon, double Rayonint, + CORBA::Long Orient) +{ + MESSAGE ("CreateZoneDiskWithHole, ZoneName = " << ZoneName ) ; + double Xcentre ; + double Ycentre ; + double Zcentre ; + if ( Orient == 1 ) + { Xcentre = Ucentre ; + Ycentre = Vcentre ; + Zcentre = 0. ; } + else if ( Orient == 2 ) + { Xcentre = 0. ; + Ycentre = Ucentre ; + Zcentre = Vcentre ; } + else if ( Orient == 3 ) + { Xcentre = Vcentre ; + Ycentre = 0. ; + Zcentre = Ucentre ; } + else { ASSERT( Orient >= 1 and Orient <= 3 ) ; } + + HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 60+Orient) ; + myZone->SetPipe( Xcentre, Ycentre, Zcentre, 0., 0., 1., Rayon, 1., Rayonint ) ; + + return HOMARD::HOMARD_Zone::_duplicate(myZone) ; +} + + + //============================================================================= CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatMenage) { MESSAGE ( "Compute, calcul de " << nomIteration ); - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return 0; - }; + IsValidStudy () ; HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIteration]; ASSERT(!CORBA::is_nil(myIteration)); @@ -943,7 +1010,6 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; es.text= "This iteration has no associated hypothese"; throw SALOME::SALOME_Exception(es); return 0; @@ -1163,16 +1229,24 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM int ZoneType = myZone->GetZoneType(); MESSAGE ( "... ZoneType = " << ZoneType); - if (ZoneType == 2) // Cas d un parallelepipede + HOMARD::double_array* zone = myZone->GetCoords(); + if ( ZoneType == 2 or ( ZoneType>=11 and ZoneType <=13 ) ) // Cas d un parallelepipede ou d'un rectangle { - HOMARD::double_array* zone = myZone->GetBox(); - myDriver->TexteZone(NumZone+1, ZoneType, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], (*zone)[4], (*zone)[5]); + myDriver->TexteZone(NumZone+1, ZoneType, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], (*zone)[4], (*zone)[5], 0., 0., 0.); } - else if (ZoneType == 4) // Cas d une sphere + else if ( ZoneType == 4 ) // Cas d une sphere { - HOMARD::double_array* zone = myZone->GetSphere(); - myDriver->TexteZone(NumZone+1, ZoneType, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], 0., 0.); + myDriver->TexteZone(NumZone+1, ZoneType, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], 0., 0., 0., 0., 0.); } + else if ( ZoneType == 5 or ( ZoneType>=31 and ZoneType <=33 ) ) // Cas d un cylindre ou d'un disque + { + myDriver->TexteZone(NumZone+1, ZoneType, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], (*zone)[4], (*zone)[5], (*zone)[6], (*zone)[7], 0.); + } + else if ( ZoneType == 7 or ( ZoneType>=61 and ZoneType <=63 ) ) // Cas d un tuyau ou disque perce + { + myDriver->TexteZone(NumZone+1, ZoneType, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], (*zone)[4], (*zone)[5], (*zone)[6], (*zone)[7], (*zone)[8]); + } + else { ASSERT("ZoneType est incorrect." == 0) ; } } } // E.3. Ajout des informations liees aux champs eventuels @@ -1201,11 +1275,14 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM double ThreshR = aInfosHypo->ThreshR; int TypeThC = aInfosHypo->TypeThC; double ThreshC = aInfosHypo->ThreshC; +// Saut entre mailles ou non ? + int UsField = aInfosHypo->UsField; + MESSAGE( ". UsField = " << UsField ); // L'usage des composantes int UsCmpI = aInfosHypo->UsCmpI; MESSAGE( ". UsCmpI = " << UsCmpI ); // - myDriver->TexteField(FieldName, FieldFile, TimeStep, Rank, TypeThR, ThreshR, TypeThC, ThreshC, UsCmpI); + myDriver->TexteField(FieldName, FieldFile, TimeStep, Rank, TypeThR, ThreshR, TypeThC, ThreshC, UsField, UsCmpI); // // Les composantes HOMARD::listeComposantsHypo* mescompo = myHypo->GetListComp(); @@ -1268,19 +1345,20 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM myDriver->TexteBoundaryDi( MeshName, MeshFile); BoundaryOption = BoundaryOption*2 ; } - else if (BoundaryType == 1) // Cas d un cylindre - { - NumBoundaryAnalytical++ ; - HOMARD::double_array* coor = myBoundary->GetCylinder(); - myDriver->TexteBoundaryAn(BoundaryName, NumBoundaryAnalytical, BoundaryType, (*coor)[0], (*coor)[1], (*coor)[2], (*coor)[3], (*coor)[4], (*coor)[5], (*coor)[6]); - BoundaryOption = BoundaryOption*3 ; - } - else if (BoundaryType == 2) // Cas d une sphere + else // Cas d une frontiere analytique { NumBoundaryAnalytical++ ; - HOMARD::double_array* coor = myBoundary->GetSphere(); - myDriver->TexteBoundaryAn(BoundaryName, NumBoundaryAnalytical, BoundaryType, (*coor)[0], (*coor)[1], (*coor)[2], (*coor)[3], 0., 0., 0.); - BoundaryOption = BoundaryOption*3 ; + HOMARD::double_array* coor = myBoundary->GetCoords(); + if (BoundaryType == 1) // Cas d un cylindre + { + myDriver->TexteBoundaryAn(BoundaryName, NumBoundaryAnalytical, BoundaryType, (*coor)[0], (*coor)[1], (*coor)[2], (*coor)[3], (*coor)[4], (*coor)[5], (*coor)[6]); + BoundaryOption = BoundaryOption*3 ; + } + else if (BoundaryType == 2) // Cas d une sphere + { + myDriver->TexteBoundaryAn(BoundaryName, NumBoundaryAnalytical, BoundaryType, (*coor)[0], (*coor)[1], (*coor)[2], (*coor)[3], 0., 0., 0.); + BoundaryOption = BoundaryOption*3 ; + } } // Memorisation du traitement ListeBoundaryTraitees.push_back( BoundaryName ); @@ -1308,39 +1386,6 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM myDriver->TexteBoundaryAnGr ( BoundaryName, NumBoundaryAnalytical, GroupName ) ; } } -/* for (int NumBoundary = 0; NumBoundary< numberOfitems; NumBoundary=NumBoundary+2) - { - std::string BoundaryName = std::string((*ListBoundaryGroupType)[NumBoundary]); - MESSAGE ( "... BoundaryName = " << BoundaryName); - HOMARD::HOMARD_Boundary_var myBoundary = myContextMap[GetCurrentStudyID()]._mesBoundarys[BoundaryName]; - ASSERT(!CORBA::is_nil(myBoundary)); - std::string GroupName = std::string((*ListBoundaryGroupType)[NumBoundary+1]); - MESSAGE ( "... GroupName = " << GroupName); - - int BoundaryType = myBoundary->GetBoundaryType(); - MESSAGE ( "... BoundaryType = " << BoundaryType ); - if (BoundaryType == 0) // Cas d une frontiere discrete - { - const char* MeshName = myBoundary->GetMeshName() ; - const char* MeshFile = myBoundary->GetMeshFile() ; - myDriver->TexteBoundaryDi( MeshName, MeshFile, GroupName); - BoundaryOption = BoundaryOption*2 ; - } - else if (BoundaryType == 1) // Cas d un cylindre - { - NumBoundaryAnalytical++ ; - HOMARD::double_array* coor = myBoundary->GetCylinder(); - myDriver->TexteBoundaryAn(NumBoundaryAnalytical, BoundaryType, GroupName, (*coor)[0], (*coor)[1], (*coor)[2], (*coor)[3], (*coor)[4], (*coor)[5], (*coor)[6]); - BoundaryOption = BoundaryOption*3 ; - } - else if (BoundaryType == 2) // Cas d une sphere - { - NumBoundaryAnalytical++ ; - HOMARD::double_array* coor = myBoundary->GetSphere(); - myDriver->TexteBoundaryAn(NumBoundaryAnalytical, BoundaryType, GroupName, (*coor)[0], (*coor)[1], (*coor)[2], (*coor)[3], 0., 0., 0.); - BoundaryOption = BoundaryOption*3 ; - } - }*/ myDriver->TexteBoundaryOption(BoundaryOption); // E.6. Ajout des informations liees a l'eventuelle interpolation des champs @@ -1377,6 +1422,15 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM } } } + // E.7. Ajout des options avancees + int NivMax = myCase->GetNivMax(); + MESSAGE ( ". NivMax = " << NivMax ); + if ( NivMax > 0 ) + { + double DiamMin = myCase->GetDiamMin(); + MESSAGE ( ". DiamMin = " << DiamMin ); + myDriver->TexteAdvanced(NivMax, DiamMin); + } // F. Ecriture du texte dans le fichier if (codret == 0) @@ -1484,27 +1538,27 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy, // Controle de la non publication d'un objet de meme nom if ((!aHypo->_is_nil()) or (!aZone->_is_nil()) or (!aBoundary->_is_nil())) { - SALOMEDS::Study::ListOfSObject_var listSO = theStudy->FindObjectByName(theName, ComponentDataType()); - if (listSO->length() >= 1) - { - MESSAGE("This name "<length()<<" time(s)"); - std::cerr <<"This name "<length()<<" time(s)" << std::endl; - aResultSO = listSO[0]; - return aResultSO._retn(); - } + SALOMEDS::Study::ListOfSObject_var listSO = theStudy->FindObjectByName(theName, ComponentDataType()); + if (listSO->length() >= 1) + { + MESSAGE("This name "<length()<<" time(s)"); + std::cerr <<"This name "<length()<<" time(s)" << std::endl; + aResultSO = listSO[0]; + return aResultSO._retn(); + } } // Caracteristiques de l'etude - SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder(); - aStudyBuilder->NewCommand(); - if(!aCase->_is_nil()) - aResultSO = PublishCaseInStudy(theStudy, aStudyBuilder, aCase, theName); - else if(!aHypo->_is_nil()) - aResultSO = PublishHypotheseInStudy(theStudy, aStudyBuilder, aHypo, theName); - else if(!aZone->_is_nil()) - aResultSO = PublishZoneInStudy(theStudy, aStudyBuilder, aZone, theName); - else if(!aBoundary->_is_nil()) - aResultSO = PublishBoundaryInStudy(theStudy, aStudyBuilder, aBoundary, theName); + SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder(); + aStudyBuilder->NewCommand(); + if(!aCase->_is_nil()) + aResultSO = PublishCaseInStudy(theStudy, aStudyBuilder, aCase, theName); + else if(!aHypo->_is_nil()) + aResultSO = PublishHypotheseInStudy(theStudy, aStudyBuilder, aHypo, theName); + else if(!aZone->_is_nil()) + aResultSO = PublishZoneInStudy(theStudy, aStudyBuilder, aZone, theName); + else if(!aBoundary->_is_nil()) + aResultSO = PublishBoundaryInStudy(theStudy, aStudyBuilder, aBoundary, theName); aStudyBuilder->CommitCommand(); return aResultSO._retn(); @@ -1574,24 +1628,59 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishZoneInStudy(SALOMEDS::Study_ptr theSt SALOMEDS::SObject_var aSOZone; if (!theFatherHomard->FindSubObject(100, aSOZone)) { + MESSAGE("Ajout de la categorie des zones"); aSOZone = aStudyBuilder->NewObjectToTag(theFatherHomard, 100); PublishInStudyAttr(aStudyBuilder, aSOZone, "Zones", "ZoneList", "zone_icone_2.png", NULL ) ; } + else { MESSAGE("La categorie des zones existe deja."); } aResultSO = aStudyBuilder->NewObject(aSOZone); + const char* icone ; switch (ZoneType) { + case 11 : + { } + case 12 : + { } + case 13 : + { icone = "boxdxy_2.png" ; + break ; + } case 2 : - { PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "ZoneHomard", - "boxdxyz_2.png", _orb->object_to_string(theObject) ) ; - break; + { icone = "boxdxyz_2.png" ; + break ; } + case 31 : + { } + case 32 : + { } + case 33 : + { icone = "disk_2.png" ; + break ; + } case 4 : - { PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "ZoneHomard", - "spherepoint_2.png", _orb->object_to_string(theObject) ) ; - break; + { icone = "spherepoint_2.png" ; + break ; + } + case 5 : + { icone = "cylinderpointvector_2.png" ; + break ; + } + case 61 : + { } + case 62 : + { } + case 63 : + { icone = "diskwithhole_2.png" ; + break ; + } + case 7 : + { icone = "pipe_2.png" ; + break ; } } + PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "ZoneHomard", icone, _orb->object_to_string(theObject) ) ; + return aResultSO._retn(); } //============================================================================= @@ -1618,30 +1707,36 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishBoundaryInStudy(SALOMEDS::Study_ptr t SALOMEDS::SObject_var aSOBoundary; if (!theFatherHomard->FindSubObject(101, aSOBoundary)) { + MESSAGE("Ajout de la categorie des boundarys"); aSOBoundary = aStudyBuilder->NewObjectToTag(theFatherHomard, 101); PublishInStudyAttr(aStudyBuilder, aSOBoundary, "Boundaries", "BoundList", "zone_icone_2.png", NULL ) ; } + else { MESSAGE("La categorie des boundarys existe deja."); } aResultSO = aStudyBuilder->NewObject(aSOBoundary); CORBA::Long BoundaryType = myBoundary->GetBoundaryType(); +// MESSAGE("BoundaryType : "<object_to_string(theObject)); + { value = "BoundaryDiHomard" ; + icone = "mesh_tree_mesh.png" ; break; } case 1 : - { PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "BoundaryAnHomard", "cylinderpointvector_2.png", - _orb->object_to_string(theObject)); + { value = "BoundaryAnHomard" ; + icone = "cylinderpointvector_2.png" ; break; } case 2 : - { PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "BoundaryAnHomard", "spherepoint_2.png", - _orb->object_to_string(theObject)); + { value = "BoundaryAnHomard" ; + icone = "spherepoint_2.png" ; break; } } + PublishInStudyAttr(aStudyBuilder, aResultSO, theName, value, icone, _orb->object_to_string(theObject)); return aResultSO._retn(); } @@ -1665,9 +1760,11 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishHypotheseInStudy(SALOMEDS::Study_ptr SALOMEDS::SObject_var aSOHypothese; if (!theFatherHomard->FindSubObject(0, aSOHypothese)) { + MESSAGE("Ajout de la categorie des hypotheses"); aSOHypothese = aStudyBuilder->NewObjectToTag(theFatherHomard, 0); PublishInStudyAttr(aStudyBuilder, aSOHypothese, "Hypothesis", "HypoList","hypotheses.png", NULL); } + else { MESSAGE("La categorie des hypotheses existe deja."); } // Creation du resultat dans l'etude aResultSO = aStudyBuilder->NewObject(aSOHypothese); @@ -1717,14 +1814,8 @@ void HOMARD_Gen_i::PublishInStudyAttr(SALOMEDS::StudyBuilder_var aStudyBuilder, //============================================================================= HOMARD::listeCases* HOMARD_Gen_i::GetAllCases() { - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return 0; - }; + MESSAGE("GetAllCases"); + IsValidStudy () ; HOMARD::listeCases_var ret = new HOMARD::listeCases; ret->length(myContextMap[GetCurrentStudyID()]._mesCas.size()); @@ -1742,14 +1833,8 @@ HOMARD::listeCases* HOMARD_Gen_i::GetAllCases() //============================================================================= HOMARD::listeHypotheses* HOMARD_Gen_i::GetAllHypotheses() { - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return 0; - }; + MESSAGE("GetAllHypotheses"); + IsValidStudy () ; HOMARD::listeHypotheses_var ret = new HOMARD::listeHypotheses; ret->length(myContextMap[GetCurrentStudyID()]._mesHypotheses.size()); @@ -1767,14 +1852,8 @@ HOMARD::listeHypotheses* HOMARD_Gen_i::GetAllHypotheses() //============================================================================= HOMARD::listeZones* HOMARD_Gen_i::GetAllZones() { - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return 0; - }; + MESSAGE("GetAllZones"); + IsValidStudy () ; HOMARD::listeZones_var ret = new HOMARD::listeZones; ret->length(myContextMap[GetCurrentStudyID()]._mesZones.size()); @@ -1792,14 +1871,8 @@ HOMARD::listeZones* HOMARD_Gen_i::GetAllZones() //============================================================================= HOMARD::listeIterations* HOMARD_Gen_i::GetAllIterations() { - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return 0; - }; + MESSAGE("GetAllIterations"); + IsValidStudy () ; HOMARD::listeIterations_var ret = new HOMARD::listeIterations; ret->length(myContextMap[GetCurrentStudyID()]._mesIterations.size()); @@ -1816,14 +1889,8 @@ HOMARD::listeIterations* HOMARD_Gen_i::GetAllIterations() //============================================================================= HOMARD::listeBoundarys* HOMARD_Gen_i::GetAllBoundarys() { - if (CORBA::is_nil(myCurrentStudy)) - { - SALOME::ExceptionStruct es; - es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - throw SALOME::SALOME_Exception(es); - return 0; - }; + MESSAGE("GetAllBoundarys"); + IsValidStudy () ; HOMARD::listeBoundarys_var ret = new HOMARD::listeBoundarys; ret->length(myContextMap[GetCurrentStudyID()]._mesBoundarys.size()); @@ -1906,7 +1973,7 @@ void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long IconeTy SMESH::mesh_array* mesMaillages=aSmeshEngine->CreateMeshesFromMED(NomFich, theStatus); for (int i = 0; i < mesMaillages->length(); i++) { - MESSAGE( ". Mise a jour des attributs"); + MESSAGE( ". Mise a jour des attributs du maillage"); SMESH::SMESH_Mesh_var monMaillage= (*mesMaillages)[i]; SALOMEDS::SObject_var aSO=SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(monMaillage))); SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder(); @@ -1917,10 +1984,10 @@ void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long IconeTy SALOMEDS::AttributePixMap_var anAttr2 = SALOMEDS::AttributePixMap::_narrow(aPixMap); // IconeType = 0 : fichier issu d'une importation // IconeType = 1 : fichier issu d'une execution HOMARD - if ( IconeType == 0 ) - { anAttr2->SetPixMap( "mesh_tree_importedmesh.png" ); } - else - { anAttr2->SetPixMap( "mesh_tree_mesh.png" ); } + const char* icone ; + if ( IconeType == 0 ) { icone = "mesh_tree_importedmesh.png" ; } + else { icone = "mesh_tree_mesh.png" ; } + anAttr2->SetPixMap( icone ); } } @@ -2021,6 +2088,20 @@ void HOMARD_Gen_i::PublishFileUnderIteration(const char* NomIter, const char* No aStudyBuilder->CommitCommand(); } +//===================================================================================== +void HOMARD_Gen_i::IsValidStudy( ) +//===================================================================================== +{ + MESSAGE( "IsValidStudy" ); + if (CORBA::is_nil(myCurrentStudy)) + { + SALOME::ExceptionStruct es; + es.type = SALOME::BAD_PARAM; + es.text = "Invalid Study Context"; + throw SALOME::SALOME_Exception(es); + }; + return ; +} //=========================================================================== // @@ -2030,8 +2111,8 @@ void HOMARD_Gen_i::PublishFileUnderIteration(const char* NomIter, const char* No //=========================================================================== SALOMEDS::TMPFile* HOMARD_Gen_i::Save(SALOMEDS::SComponent_ptr theComponent, - const char* theURL, - bool isMultiFile) + const char* theURL, + bool isMultiFile) { MESSAGE (" Save pour theURL = "<< theURL); SALOMEDS::TMPFile_var aStreamFile; @@ -2121,22 +2202,26 @@ SALOMEDS::TMPFile* HOMARD_Gen_i::Save(SALOMEDS::SComponent_ptr theComponent, } } // -> close file + MESSAGE ("close file"); f.close(); - // put temporary files to the stream + // put temporary files to the stream + MESSAGE ("put temporary files to the stream"); aStreamFile = SALOMEDS_Tool::PutFilesToStream(tmpDir.c_str(), aFileSeq.in(), isMultiFile); // remove temporary files + MESSAGE ("remove temporary files"); if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(tmpDir.c_str(), aFileSeq.in(), true); // return data stream + MESSAGE ("return data stream"); return aStreamFile._retn(); }; //=========================================================================== SALOMEDS::TMPFile* HOMARD_Gen_i::SaveASCII(SALOMEDS::SComponent_ptr theComponent, - const char* theURL, - bool isMultiFile) + const char* theURL, + bool isMultiFile) { // No specific ASCII persistence SALOMEDS::TMPFile_var aStreamFile = Save(theComponent, theURL, isMultiFile); @@ -2195,6 +2280,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, std::string bounSignature = HOMARD::GetSignature(HOMARD::Boundary); if (line.substr(0, caseSignature.size()) == caseSignature) { // re-create case + MESSAGE (" Recreation du cas" ); HOMARD::HOMARD_Cas_var aCase = newCase(); PortableServer::ServantBase_var aServant = GetServant(aCase); HOMARD_Cas_i* aCaseServant = dynamic_cast(aServant.in()); @@ -2204,6 +2290,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, } } else if (line.substr(0, zoneSignature.size()) == zoneSignature) { + MESSAGE (" Recreation de la zone" ); // re-create zone HOMARD::HOMARD_Zone_var aZone = newZone(); PortableServer::ServantBase_var aServant = GetServant(aZone); @@ -2215,6 +2302,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, } else if (line.substr(0, iterSignature.size()) == iterSignature) { // re-create iteration + MESSAGE (" Recreation de l iteration" ); HOMARD::HOMARD_Iteration_var aIter = newIteration(); PortableServer::ServantBase_var aServant = GetServant(aIter); HOMARD_Iteration_i* aIterServant = dynamic_cast(aServant.in()); @@ -2225,6 +2313,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, } else if (line.substr(0, hypoSignature.size()) == hypoSignature) { // re-create hypothesis + MESSAGE (" Recreation de l hypothese" ); HOMARD::HOMARD_Hypothesis_var aHypo = newHypothesis(); PortableServer::ServantBase_var aServant = GetServant(aHypo); HOMARD_Hypothesis_i* aHypoServant = dynamic_cast(aServant.in()); @@ -2235,6 +2324,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, } else if (line.substr(0, bounSignature.size()) == bounSignature) { // re-create boundary + MESSAGE (" Recreation de la frontiere" ); HOMARD::HOMARD_Boundary_var aBoundary = newBoundary(); PortableServer::ServantBase_var aServant = GetServant(aBoundary); HOMARD_Boundary_i* aBoundaryServant = dynamic_cast(aServant.in()); @@ -2573,14 +2663,14 @@ Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy, std::string dumpIter = dumpCorbaIter.in(); aScript+=dumpIter; } - + if( isMultiFile ) aScript += "\n\tpass"; aScript += "\n"; if( !isMultiFile ) // remove unnecessary tabulation aScript = RemoveTabulation( aScript ); - + const size_t aLen = strlen(aScript.c_str()); char* aBuffer = new char[aLen+1]; strcpy(aBuffer, aScript.c_str()); diff --git a/src/HOMARD_I/HOMARD_Gen_i.hxx b/src/HOMARD_I/HOMARD_Gen_i.hxx index 8aafa88c..84647cdc 100644 --- a/src/HOMARD_I/HOMARD_Gen_i.hxx +++ b/src/HOMARD_I/HOMARD_Gen_i.hxx @@ -60,8 +60,45 @@ public: const char* MeshName, const char* FileName); HOMARD::HOMARD_Hypothesis_ptr CreateHypothesis(const char* nomHypothesis); HOMARD::HOMARD_Iteration_ptr CreateIteration (const char* nomIter, const char* nomIterParent); - HOMARD::HOMARD_Zone_ptr CreateZone (const char* nomZone, CORBA::Long typeZone); - HOMARD::HOMARD_Boundary_ptr CreateBoundary (const char* nomBoundary, CORBA::Long typeBoundary); + + HOMARD::HOMARD_Zone_ptr CreateZone (const char* nomZone, CORBA::Long typeZone); + HOMARD::HOMARD_Zone_ptr CreateZoneBox (const char* nomZone, + double Xmini, double Xmaxi, + double Ymini, double Ymaxi, + double Zmini, double Zmaxi); + HOMARD::HOMARD_Zone_ptr CreateZoneSphere (const char* nomZone, + double Xcentre, double Ycentre, double Zcentre, double Rayon); + HOMARD::HOMARD_Zone_ptr CreateZoneCylinder (const char* nomZone, + double Xcentre, double Ycentre, double Zcentre, + double Xaxe, double Yaxe, double Zaxe, + double Rayon, double Haut); + HOMARD::HOMARD_Zone_ptr CreateZonePipe (const char* nomZone, + double Xcentre, double Ycentre, double Zcentre, + double Xaxe, double Yaxe, double Zaxe, + double Rayon, double Haut, double Rayonint); + HOMARD::HOMARD_Zone_ptr CreateZoneBox2D (const char* nomZone, + double Umini, double Umaxi, + double Vmini, double Vmaxi, + CORBA::Long Orient); + HOMARD::HOMARD_Zone_ptr CreateZoneDisk (const char* nomZone, + double Ucentre, double Vcentre, + double Rayon, + CORBA::Long Orient); + HOMARD::HOMARD_Zone_ptr CreateZoneDiskWithHole (const char* nomZone, + double Ucentre, double Vcentre, + double Rayon, double Rayonint, + CORBA::Long Orient); + + HOMARD::HOMARD_Boundary_ptr CreateBoundary (const char* nomBoundary, CORBA::Long typeBoundary); + HOMARD::HOMARD_Boundary_ptr CreateBoundaryDi (const char* nomBoundary, + const char* MeshName, const char* FileName); + HOMARD::HOMARD_Boundary_ptr CreateBoundaryCylinder (const char* nomBoundary, + double Xcentre, double Ycentre, double Zcentre, + double Xaxis, double Yaxis, double Zaxis, + double Rayon); + HOMARD::HOMARD_Boundary_ptr CreateBoundarySphere (const char* nomBoundary, + double Xcentre, double Ycentre, double Zcentre, + double Rayon); HOMARD::HOMARD_Cas_ptr GetCas (const char* nomCas); HOMARD::HOMARD_Zone_ptr GetZone (const char* nomZone); @@ -99,6 +136,8 @@ public: void PublishFileUnderIteration(const char* NomIter, const char* NomFich, const char* Commentaire); + void IsValidStudy(); + // --------------------------------------------------------------- // next functions are inherited from SALOMEDS::Driver interface // --------------------------------------------------------------- diff --git a/src/HOMARD_I/HOMARD_Hypothesis_i.cxx b/src/HOMARD_I/HOMARD_Hypothesis_i.cxx index dd4bcfc9..0b743de6 100644 --- a/src/HOMARD_I/HOMARD_Hypothesis_i.cxx +++ b/src/HOMARD_I/HOMARD_Hypothesis_i.cxx @@ -178,6 +178,7 @@ HOMARD::InfosHypo* HOMARD_Hypothesis_i::GetField() aInfosHypo->ThreshR = CORBA::Double( myHomardHypothesis->GetThreshR() ); aInfosHypo->TypeThC = CORBA::Long( myHomardHypothesis->GetUnRefThrType() ); aInfosHypo->ThreshC = CORBA::Double( myHomardHypothesis->GetThreshC() ); + aInfosHypo->UsField = CORBA::Long( myHomardHypothesis->GetUseField() ); aInfosHypo->UsCmpI = CORBA::Long( myHomardHypothesis->GetUseCompI() ); return aInfosHypo; } @@ -263,7 +264,7 @@ void HOMARD_Hypothesis_i::AddComp( const char* NomComposant ) //============================================================================= void HOMARD_Hypothesis_i::SupprComp() { - ASSERT( myHomardHypothesis ); + ASSERT( myHomardHypothesis ); myHomardHypothesis->SupprComp(); } diff --git a/src/HOMARD_I/HOMARD_Hypothesis_i.hxx b/src/HOMARD_I/HOMARD_Hypothesis_i.hxx index 412b2d85..91795574 100644 --- a/src/HOMARD_I/HOMARD_Hypothesis_i.hxx +++ b/src/HOMARD_I/HOMARD_Hypothesis_i.hxx @@ -30,7 +30,7 @@ class HOMARD_Hypothesis; class HOMARD_Hypothesis_i: public virtual POA_HOMARD::HOMARD_Hypothesis, public virtual PortableServer::ServantBase -{ +{ public: HOMARD_Hypothesis_i( CORBA::ORB_ptr orb, HOMARD::HOMARD_Gen_var gen_i ); HOMARD_Hypothesis_i(); diff --git a/src/HOMARD_I/HOMARD_Zone_i.cxx b/src/HOMARD_I/HOMARD_Zone_i.cxx index bca9ccad..0181a65a 100644 --- a/src/HOMARD_I/HOMARD_Zone_i.cxx +++ b/src/HOMARD_I/HOMARD_Zone_i.cxx @@ -106,11 +106,11 @@ void HOMARD_Zone_i::SetBox( double X0, double X1, double X2, double X3, double X } //============================================================================= -HOMARD::double_array* HOMARD_Zone_i::GetBox() +HOMARD::double_array* HOMARD_Zone_i::GetCoords() { ASSERT( myHomardZone ); HOMARD::double_array_var aResult = new HOMARD::double_array(); - std::vector mesCoor = myHomardZone->GetBox(); + std::vector mesCoor = myHomardZone->GetCoords(); aResult->length( mesCoor .size() ); std::vector::const_iterator it; int i = 0; @@ -120,24 +120,27 @@ HOMARD::double_array* HOMARD_Zone_i::GetBox() } //============================================================================= -void HOMARD_Zone_i::SetSphere( double Xcentre, double Ycentre, double ZCentre, double rayon ) +void HOMARD_Zone_i::SetSphere( double Xcentre, double Ycentre, double Zcentre, double Rayon ) { ASSERT( myHomardZone ); - myHomardZone->SetSphere( Xcentre, Ycentre, ZCentre, rayon ); + myHomardZone->SetSphere( Xcentre, Ycentre, Zcentre, Rayon ); } //============================================================================= -HOMARD::double_array* HOMARD_Zone_i::GetSphere() +void HOMARD_Zone_i::SetCylinder( double Xcentre, double Ycentre, double Zcentre, + double Xaxis, double Yaxis, double Zaxis, + double Rayon, double Haut ) { ASSERT( myHomardZone ); - HOMARD::double_array_var aResult = new HOMARD::double_array(); - std::vector mesCoor = myHomardZone->GetSphere(); - aResult->length( mesCoor .size() ); - std::vector::const_iterator it; - int i = 0; - for ( it = mesCoor.begin(); it != mesCoor.end(); it++ ) - aResult[i++] = (*it); - return aResult._retn(); + myHomardZone->SetCylinder( Xcentre, Ycentre, Zcentre, Xaxis, Yaxis, Zaxis, Rayon, Haut ); +} +//============================================================================= +void HOMARD_Zone_i::SetPipe( double Xcentre, double Ycentre, double Zcentre, + double Xaxis, double Yaxis, double Zaxis, + double Rayon, double Haut, double Rayonint ) +{ + ASSERT( myHomardZone ); + myHomardZone->SetPipe( Xcentre, Ycentre, Zcentre, Xaxis, Yaxis, Zaxis, Rayon, Haut, Rayonint ); } //============================================================================= @@ -165,8 +168,10 @@ HOMARD::double_array* HOMARD_Zone_i::GetLimit() //============================================================================= void HOMARD_Zone_i::AddHypo( const char* NomHypo ) { + MESSAGE ( " AddHypo, NomHypo= " << NomHypo); ASSERT( myHomardZone ); myHomardZone->AddHypo( NomHypo ); + MESSAGE ( " FIn de AddHypo"); } //============================================================================= diff --git a/src/HOMARD_I/HOMARD_Zone_i.hxx b/src/HOMARD_I/HOMARD_Zone_i.hxx index 5175c8b9..2434c633 100644 --- a/src/HOMARD_I/HOMARD_Zone_i.hxx +++ b/src/HOMARD_I/HOMARD_Zone_i.hxx @@ -30,43 +30,49 @@ class HOMARD_Zone; class HOMARD_Zone_i: public virtual POA_HOMARD::HOMARD_Zone, public virtual PortableServer::ServantBase -{ +{ public: HOMARD_Zone_i( CORBA::ORB_ptr orb, HOMARD::HOMARD_Gen_var gen_i ); HOMARD_Zone_i(); - + virtual ~HOMARD_Zone_i(); void SetName( const char* NomZone ); char* GetName(); char* GetDumpPython(); - + void SetZoneType( CORBA::Long ZoneType ); - + CORBA::Long GetZoneType(); - - HOMARD::double_array* GetBox(); - void SetBox( double Xmini, double Xmaxi, - double Ymini, double Ymaxi, - double Zmini, double Zmaxi ); - - HOMARD::double_array* GetSphere(); + + HOMARD::double_array* GetCoords(); + void SetBox( double Xmini, double Xmaxi, + double Ymini, double Ymaxi, + double Zmini, double Zmaxi ); + void SetSphere( double Xcentre, double Ycentre, double ZCentre, - double rayon ); - + double Rayon ); + + void SetCylinder( double Xcentre, double Ycentre, double ZCentre, + double Xaxis, double Yaxis, double Zaxis, + double Rayon, double Haut ); + void SetPipe( double Xcentre, double Ycentre, double ZCentre, + double Xaxis, double Yaxis, double Zaxis, + double Rayon, double Haut, double Rayonint ); + HOMARD::double_array* GetLimit(); void SetLimit( double Xincr, double Yincr, double Zincr); - + void AddHypo( const char *NomHypo ); void SupprHypo( const char *NomHypo ); HOMARD::listeHypo* GetHypo(); - + std::string Dump() const; bool Restore( const std::string& stream ); private: ::HOMARD_Zone* myHomardZone; - + CORBA::ORB_ptr _orb; HOMARD::HOMARD_Gen_var _gen_i; };