From: Christophe Bourcier Date: Tue, 29 Aug 2017 09:44:20 +0000 (+0200) Subject: Add full-quadrangles support, available since MeshGems v2.5 X-Git-Tag: V8_4_0a2~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dfbdf1950475c847558f7b6c65d0c3e10a16d86b;p=plugins%2Fblsurfplugin.git Add full-quadrangles support, available since MeshGems v2.5 --- diff --git a/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters.png b/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters.png index 8b743fa..884b411 100644 Binary files a/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters.png and b/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters.png differ diff --git a/doc/salome/gui/BLSURFPLUGIN/input/blsurf_hypo.doc b/doc/salome/gui/BLSURFPLUGIN/input/blsurf_hypo.doc index ec7d33c..ee4a878 100644 --- a/doc/salome/gui/BLSURFPLUGIN/input/blsurf_hypo.doc +++ b/doc/salome/gui/BLSURFPLUGIN/input/blsurf_hypo.doc @@ -57,7 +57,13 @@ The smaller this distance is, the closer the mesh is to the exact surface (only - Mesh optimisation - if checked, the mesh will be optimized in order to get better shaped elements. -- Allow Quadrangles - if checked, allows the creation of quadrilateral elements. +- Elements type - Type of the elements to generate the mesh with: + + - Triangles: generate a mesh with only triangles. + + - Quadrangle dominant: generate a mesh with a majority of quadrangles and a few triangles. + + - Quadrangles: generate a mesh with only quadrangles. - Anisotropic - if checked, this parameter defines the maximum anisotropic ratio of the metric governing the anisotropic meshing process. The default value (0) means that the metric (and thus the generated elements) can be arbitrarily stretched. diff --git a/idl/BLSURFPlugin_Algorithm.idl b/idl/BLSURFPlugin_Algorithm.idl index 671fd60..e02d105 100644 --- a/idl/BLSURFPlugin_Algorithm.idl +++ b/idl/BLSURFPlugin_Algorithm.idl @@ -199,7 +199,8 @@ module BLSURFPlugin * Sets to create quadrilateral elements or not */ void SetQuadAllowed(in boolean allowed); - boolean GetQuadAllowed(); + void SetElementType(in long elementType); + long GetElementType(); /*! * Sets angular deflection (in degrees) of a mesh face and edge from CAD surface diff --git a/src/BLSURFPlugin/BLSURFPluginBuilder.py b/src/BLSURFPlugin/BLSURFPluginBuilder.py index 4548fa3..53e2d8e 100644 --- a/src/BLSURFPlugin/BLSURFPluginBuilder.py +++ b/src/BLSURFPlugin/BLSURFPluginBuilder.py @@ -26,6 +26,9 @@ import GEOM LIBRARY = "libBLSURFEngine.so" +# ElementType enum +Triangles, QuadrangleDominant, Quadrangles = 0, 1, 2 + # Topology treatment way of MG-CADSurf FromCAD, PreProcess, PreProcessPlus, PreCAD = 0,1,2,3 @@ -652,12 +655,19 @@ class BLSURF_Algorithm(Mesh_Algorithm): self.Parameters().ClearSizeMaps() pass - ## Sets QuadAllowed flag. + ## Sets QuadAllowed flag (DEPRECATED: use SetElementType) # @param toAllow "allow quadrangles" flag value + # TODO: to remove in Salome 9 def SetQuadAllowed(self, toAllow=True): self.Parameters().SetQuadAllowed(toAllow) pass + ## Sets elements type + # @param theElementType: 0 (Triangles), 1 (QuadrangleDominant), 2 (Quadrangles) + def SetElementType(self, theElementType=Triangles): + self.Parameters().SetElementType(theElementType) + pass + ## Defines hypothesis having several parameters # @return hypothesis object def Parameters(self): diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index 509972d..ea2ecf6 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -875,7 +875,7 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, double _gradation = BLSURFPlugin_Hypothesis::GetDefaultGradation(); double _use_volume_gradation = BLSURFPlugin_Hypothesis::GetDefaultUseVolumeGradation(); double _volume_gradation = BLSURFPlugin_Hypothesis::GetDefaultVolumeGradation(); - bool _quadAllowed = BLSURFPlugin_Hypothesis::GetDefaultQuadAllowed(); + BLSURFPlugin_Hypothesis::ElementType _elementType = BLSURFPlugin_Hypothesis::GetDefaultElementType(); double _angleMesh = BLSURFPlugin_Hypothesis::GetDefaultAngleMesh(); double _chordalError = BLSURFPlugin_Hypothesis::GetDefaultChordalError(diagonal); bool _anisotropic = BLSURFPlugin_Hypothesis::GetDefaultAnisotropic(); @@ -925,7 +925,7 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, _use_volume_gradation = hyp->GetUseVolumeGradation(); if (hyp->GetVolumeGradation() > 0 && _use_volume_gradation ) _volume_gradation = hyp->GetVolumeGradation(); - _quadAllowed = hyp->GetQuadAllowed(); + _elementType = hyp->GetElementType(); if (hyp->GetAngleMesh() > 0) _angleMesh = hyp->GetAngleMesh(); if (hyp->GetChordalError() > 0) @@ -1055,13 +1055,29 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, set_param(css, "max_size", _maxSizeRel ? val_to_string_rel(_maxSize).c_str() : val_to_string(_maxSize).c_str()); } // anisotropic and quadrangle mesh requires disabling gradation - if ( _anisotropic && _quadAllowed ) + if ( _anisotropic && _elementType != BLSURFPlugin_Hypothesis::Triangles ) useGradation = false; // limitation of V1.3 if ( useGradation && _use_gradation ) set_param(css, "gradation", val_to_string(_gradation).c_str()); if ( useGradation && _use_volume_gradation ) set_param(css, "volume_gradation", val_to_string(_volume_gradation).c_str()); - set_param(css, "element_generation", _quadAllowed ? "quad_dominant" : "triangle"); + + // New since MeshGems 2.5: add full_quad + const char * element_generation = ""; + switch ( _elementType ) + { + case BLSURFPlugin_Hypothesis::Triangles: + element_generation = "triangle"; + break; + case BLSURFPlugin_Hypothesis::QuadrangleDominant: + element_generation = "quad_dominant"; + break; + case BLSURFPlugin_Hypothesis::Quadrangles: + element_generation = "full_quad"; + break; + default: ; + } + set_param(css, "element_generation", element_generation); set_param(css, "metric", _anisotropic ? "anisotropic" : "isotropic"); @@ -3378,7 +3394,7 @@ bool BLSURFPlugin_BLSURF::Evaluate(SMESH_Mesh& aMesh, bool _phySizeRel = BLSURFPlugin_Hypothesis::GetDefaultPhySizeRel(); //int _geometricMesh = BLSURFPlugin_Hypothesis::GetDefaultGeometricMesh(); double _angleMesh = BLSURFPlugin_Hypothesis::GetDefaultAngleMesh(); - bool _quadAllowed = BLSURFPlugin_Hypothesis::GetDefaultQuadAllowed(); + BLSURFPlugin_Hypothesis::ElementType _elementType = BLSURFPlugin_Hypothesis::GetDefaultElementType(); if(_hypothesis) { _physicalMesh = (int) _hypothesis->GetPhysicalMesh(); _phySizeRel = _hypothesis->IsPhySizeRel(); @@ -3387,7 +3403,7 @@ bool BLSURFPlugin_BLSURF::Evaluate(SMESH_Mesh& aMesh, //_geometricMesh = (int) hyp->GetGeometricMesh(); if (_hypothesis->GetAngleMesh() > 0) _angleMesh = _hypothesis->GetAngleMesh(); - _quadAllowed = _hypothesis->GetQuadAllowed(); + _elementType = _hypothesis->GetElementType(); } else { //0020968: EDF1545 SMESH: Problem in the creation of a mesh group on geometry // GetDefaultPhySize() sometimes leads to computation failure @@ -3467,7 +3483,7 @@ bool BLSURFPlugin_BLSURF::Evaluate(SMESH_Mesh& aMesh, int nbQuad = 0; int nbTria = (int) ( anArea/( ELen*ELen*sqrt(3.) / 4 ) ); int nbNodes = (int) ( ( nbTria*3 - (nb1d-1)*2 ) / 6 + 1 ); - if ( _quadAllowed ) + if ( _elementType != BLSURFPlugin_Hypothesis::Quadrangles ) { if ( nb1dVec.size() == 4 ) // quadrangle geom face { diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx index d567f50..4eed187 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx @@ -63,7 +63,7 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, int studyId, SMESH_G _gradation(GetDefaultGradation()), _useVolumeGradation(GetDefaultUseVolumeGradation()), _volumeGradation(GetDefaultVolumeGradation()), - _quadAllowed(GetDefaultQuadAllowed()), + _elementType(GetDefaultElementType()), _angleMesh(GetDefaultAngleMesh()), _chordalError(GetDefaultChordalError()), _anisotropic(GetDefaultAnisotropic()), @@ -360,9 +360,9 @@ void BLSURFPlugin_Hypothesis::SetVolumeGradation(double theVal) { } //============================================================================= -void BLSURFPlugin_Hypothesis::SetQuadAllowed(bool theVal) { - if (theVal != _quadAllowed) { - _quadAllowed = theVal; +void BLSURFPlugin_Hypothesis::SetElementType(ElementType theElementType) { + if (theElementType != _elementType) { + _elementType = theElementType; NotifySubMeshesHypothesisModification(); } } @@ -1930,7 +1930,7 @@ std::ostream & BLSURFPlugin_Hypothesis::SaveTo(std::ostream & save) } save << " " << (int) _topology << " " << (int) _physicalMesh << " " << (int) _geometricMesh << " " << _phySize << " " - << _angleMesh << " " << _gradation << " " << (int) _quadAllowed << " " << _decimesh; + << _angleMesh << " " << _gradation << " " << (int) _elementType << " " << _decimesh; save << " " << _minSize << " " << _maxSize << " " << _angleMesh << " " << _minSize << " " << _maxSize << " " << _verb; save << " " << (int) _preCADMergeEdges << " " << _preCADRemoveNanoEdges << " " << (int) _preCADDiscardInput << " " << _preCADEpsNano ; save << " " << (int) _enforcedInternalVerticesAllFaces; @@ -2257,7 +2257,7 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) isOK = static_cast(load >> i); if (isOK) - _quadAllowed = (bool) i; + _elementType = (ElementType) i; else load.clear(std::ios::badbit | load.rdstate()); diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx index 1531872..f445105 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx @@ -64,6 +64,12 @@ public: GeometricalLocalSize }; + enum ElementType { + Triangles, + QuadrangleDominant, + Quadrangles + }; + static const char* GetHypType(bool hasgeom) { return hasgeom ? "MG-CADSurf Parameters" : "MG-CADSurf Parameters_NOGEOM"; } @@ -97,8 +103,8 @@ public: void SetVolumeGradation(double theGradation); double GetVolumeGradation() const { return _volumeGradation; } - void SetQuadAllowed(bool theVal); - bool GetQuadAllowed() const { return _quadAllowed; } + void SetElementType(ElementType theElementType); + ElementType GetElementType() const { return _elementType; } void SetAngleMesh(double theAngle); double GetAngleMesh() const { return _angleMesh; } @@ -425,7 +431,7 @@ public: static double GetDefaultGradation() { return 1.3; } static bool GetDefaultUseVolumeGradation() { return false; } static double GetDefaultVolumeGradation() { return 2; } - static bool GetDefaultQuadAllowed() { return false; } + static ElementType GetDefaultElementType() { return Triangles; } static double GetDefaultAngleMesh() { return 8.0; } static double GetDefaultChordalError(double diagonal); @@ -567,7 +573,7 @@ private: double _gradation; bool _useVolumeGradation; double _volumeGradation; - bool _quadAllowed; + ElementType _elementType; double _angleMesh; double _chordalError; bool _anisotropic; diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx index 3eef21b..0de4975 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx @@ -362,25 +362,42 @@ CORBA::Double BLSURFPlugin_Hypothesis_i::GetVolumeGradation() * BLSURFPlugin_Hypothesis_i::SetQuadAllowed * * Set true or false + * + * DEPRACATED, kept for python script compatibility + * + * TO be removed in Salome 9 */ //============================================================================= void BLSURFPlugin_Hypothesis_i::SetQuadAllowed(CORBA::Boolean theValue) { - this->GetImpl()->SetQuadAllowed(theValue); - std::string theValueStr = theValue ? "True" : "False"; - SMESH::TPythonDump() << _this() << ".SetQuadAllowed( " << theValueStr.c_str() << " )"; + ::BLSURFPlugin_Hypothesis::ElementType theElementType = theValue ? + ::BLSURFPlugin_Hypothesis::QuadrangleDominant : ::BLSURFPlugin_Hypothesis::Triangles; + this->GetImpl()->SetElementType(theElementType); + SMESH::TPythonDump() << _this() << ".SetElementType( " << theElementType << " )"; } //============================================================================= /*! - * BLSURFPlugin_Hypothesis_i::GetQuadAllowed + * BLSURFPlugin_Hypothesis_i::SetElementType * - * Get true or false + * Set ElementType + */ +//============================================================================= +void BLSURFPlugin_Hypothesis_i::SetElementType(CORBA::Long theValue) +{ + this->GetImpl()->SetElementType((::BLSURFPlugin_Hypothesis::ElementType) theValue); + SMESH::TPythonDump() << _this() << ".SetElementType( " << theValue << " )"; +} +//============================================================================= +/*! + * BLSURFPlugin_Hypothesis_i::GetElementType + * + * Get ElementType */ //============================================================================= -CORBA::Boolean BLSURFPlugin_Hypothesis_i::GetQuadAllowed() +CORBA::Long BLSURFPlugin_Hypothesis_i::GetElementType() { - return this->GetImpl()->GetQuadAllowed(); + return this->GetImpl()->GetElementType(); } //============================================================================= diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx index aceec48..e5517d9 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx @@ -82,7 +82,9 @@ public: CORBA::Double GetVolumeGradation(); void SetQuadAllowed(CORBA::Boolean theValue); - CORBA::Boolean GetQuadAllowed(); + + void SetElementType(CORBA::Long theValue); + CORBA::Long GetElementType(); void SetAngleMesh(CORBA::Double theValue); CORBA::Double GetAngleMesh(); diff --git a/src/GUI/BLSURFPluginGUI_Dlg.h b/src/GUI/BLSURFPluginGUI_Dlg.h index 7c24426..e82beca 100644 --- a/src/GUI/BLSURFPluginGUI_Dlg.h +++ b/src/GUI/BLSURFPluginGUI_Dlg.h @@ -37,6 +37,12 @@ enum GeometricMesh GeometricalLocalSize }; +enum ElementType { + Triangles, + QuadrangleDominant, + Quadrangles +}; + enum Topology { FromCAD = 0, Process, diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx index 94ba8e7..48cf60c 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx @@ -1168,7 +1168,6 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() myTabWidget->setCurrentIndex( STD_TAB ); connect( myAdvWidget->addBtn, SIGNAL( clicked() ), this, SLOT( onAddOption() ) ); - connect( myStdWidget->myAllowQuadrangles, SIGNAL( stateChanged( int ) ), this, SLOT( onStateChange() )); // Size Maps connect( addMapButton, SIGNAL( clicked()), this, SLOT( onAddMap() ) ); @@ -1802,8 +1801,14 @@ void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const myStdWidget->myVolumeGradation->setText(""); else myStdWidget->myVolumeGradation->SetValue( data.myVolumeGradation ); - myStdWidget->myAllowQuadrangles->setChecked( data.myAllowQuadrangles ); + foreach (QAbstractButton* button, myStdWidget->myButtonGroupElementType->buttons()) { + if (myStdWidget->myButtonGroupElementType->id(button) == data.myElementType) { + button->setChecked(true); + break; + } + } + if (data.myAngleMesh < 0) myStdWidget->myAngleMesh->setText(""); else @@ -2002,7 +2007,7 @@ bool BLSURFPluginGUI_HypothesisCreator::readParamsFromHypo( BlsurfHypothesisData h_data.myGradation = h->GetGradation(); h_data.myUseVolumeGradation = h->GetUseVolumeGradation(); h_data.myVolumeGradation = h->GetVolumeGradation(); - h_data.myAllowQuadrangles = h->GetQuadAllowed(); + h_data.myElementType = h->GetElementType(); double angle = h->GetAngleMesh(); h_data.myAngleMesh = angle > 0 ? angle : -1.0; double chordalError = h->GetChordalError(); @@ -2261,8 +2266,8 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi if ( h->GetVolumeGradation() != h_data.myVolumeGradation ) h->SetVolumeGradation( h_data.myVolumeGradation <= 0 ? -1 : h_data.myVolumeGradation ); - if ( h->GetQuadAllowed() != h_data.myAllowQuadrangles ) - h->SetQuadAllowed( h_data.myAllowQuadrangles ); + if ( h->GetElementType() != h_data.myElementType ) + h->SetElementType( h_data.myElementType ); if ( (int) h_data.myGeometricMesh != DefaultGeom ) { if ( h->GetAngleMesh() != h_data.myAngleMesh ) @@ -2493,7 +2498,7 @@ QString BLSURFPluginGUI_HypothesisCreator::readParamsFromWidgets( BlsurfHypothes h_data.myGradation = h_data.myUseGradation ? myStdWidget->myGradation->GetValue() : -1.0; h_data.myUseVolumeGradation = myStdWidget->myUseVolumeGradation->isChecked() && !myStdWidget->myVolumeGradation->text().isEmpty(); h_data.myVolumeGradation = h_data.myUseVolumeGradation ? myStdWidget->myVolumeGradation->GetValue() : -1. ; - h_data.myAllowQuadrangles = myStdWidget->myAllowQuadrangles->isChecked(); + h_data.myElementType = myStdWidget->myButtonGroupElementType->checkedId(); h_data.myAngleMesh = myStdWidget->myAngleMesh->text().isEmpty() ? -1.0 : myStdWidget->myAngleMesh->GetValue(); h_data.myChordalError = myStdWidget->myChordalError->text().isEmpty() ? -1.0 : myStdWidget->myChordalError->GetValue(); h_data.myAnisotropic = myStdWidget->myAnisotropic->isChecked(); @@ -2524,7 +2529,7 @@ QString BLSURFPluginGUI_HypothesisCreator::readParamsFromWidgets( BlsurfHypothes guiHyp += tr("BLSURF_MAXSIZE") + " = "+ QString::number( h_data.myMaxSize ) + "; "; guiHyp += tr("BLSURF_MAXSIZE") + " " + tr("BLSURF_SIZE_REL") + " = " + QString(h_data.myMaxSizeRel ? "yes" : "no") + "; "; guiHyp += tr("BLSURF_GRADATION") + " = " + QString::number( h_data.myGradation ) + "; "; - guiHyp += tr("BLSURF_ALLOW_QUADRANGLES") + " = " + QString(h_data.myAllowQuadrangles ? "yes" : "no") + "; "; + guiHyp += tr("BLSURF_ELEMENT_TYPE") + " = " + QString::number(h_data.myElementType) + "; "; guiHyp += tr("BLSURF_ANGLE_MESH") + " = " + QString::number( h_data.myAngleMesh ) + "; "; guiHyp += tr("BLSURF_CHORDAL_ERROR") + " = " + QString::number( h_data.myChordalError ) + "; "; guiHyp += tr("BLSURF_ANISOTROPIC") + " = " + QString(h_data.myAnisotropic ? "yes" : "no") + "; "; diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.h b/src/GUI/BLSURFPluginGUI_HypothesisCreator.h index 4c5a952..edf0098 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.h +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.h @@ -169,7 +169,8 @@ typedef struct bool myAnisotropic, myOptimiseTinyEdges, myRemoveTinyEdges, myForceBadElementRemoval, myCorrectSurfaceIntersection; double myAnisotropicRatio, myTinyEdgeLength, myTinyEdgeOptimisLength, myBadElementAspectRatio, myCorrectSurfaceIntersectionMaxCost; bool myOptimizeMesh, myQuadraticMesh; - bool myAllowQuadrangles, mySmpsurface,mySmpedge,mySmppoint,myEnforcedVertex,myInternalEnforcedVerticesAllFaces; + bool mySmpsurface,mySmpedge,mySmppoint,myEnforcedVertex,myInternalEnforcedVerticesAllFaces; + long myElementType; // bool myPreCADMergeEdges, myPreCADProcess3DTopology, myPreCADDiscardInput; // bool myGMFFileMode; std::string myGMFFileName, myInternalEnforcedVerticesAllFacesGroup; diff --git a/src/GUI/BLSURFPluginGUI_StdWidget.cxx b/src/GUI/BLSURFPluginGUI_StdWidget.cxx index 35a60c4..830ce66 100644 --- a/src/GUI/BLSURFPluginGUI_StdWidget.cxx +++ b/src/GUI/BLSURFPluginGUI_StdWidget.cxx @@ -61,6 +61,9 @@ BLSURFPluginGUI_StdWidget::BLSURFPluginGUI_StdWidget( QWidget* parent, Qt::Windo myTinyEdgeOptimisLength->setText(""); myCorrectSurfaceIntersectionMaxCost->setText(""); myBadElementAspectRatio->setText(""); + myButtonGroupElementType->setId(myRadioButtonTriangles, Triangles); + myButtonGroupElementType->setId(myRadioButtonQuadrangleDominant, QuadrangleDominant); + myButtonGroupElementType->setId(myRadioButtonQuadrangles, Quadrangles); } BLSURFPluginGUI_StdWidget::~BLSURFPluginGUI_StdWidget() diff --git a/src/GUI/BLSURFPluginGUI_StdWidget_QTD.ui b/src/GUI/BLSURFPluginGUI_StdWidget_QTD.ui index 53b0517..608fe0d 100644 --- a/src/GUI/BLSURFPluginGUI_StdWidget_QTD.ui +++ b/src/GUI/BLSURFPluginGUI_StdWidget_QTD.ui @@ -7,23 +7,11 @@ 0 0 - 667 - 342 + 723 + 399 - - 0 - - - 0 - - - 0 - - - 0 - @@ -167,7 +155,7 @@ BLSURF_GEOM_MESH_TOOLTIP - GLOBAL_SIZE + BLSURF_DEFAULT_USER @@ -249,37 +237,17 @@ BLSURF_MAIN_PARAMETERS - - - - BLSURF_OPTIMISATION_TOOLTIP - - - BLSURF_OPTIMISATION - - - true - - - - - + + - BLSURF_ELEMENT_ORDER_TOOLTIP + BLSURF_GRADATION_TOOLTIP - BLSURF_ELEMENT_ORDER - - - - - - - false + BLSURF_GRADATION - + Qt::Vertical @@ -292,30 +260,40 @@ - - + + - BLSURF_GRADATION_TOOLTIP + BLSURF_ELEMENT_ORDER_TOOLTIP - BLSURF_GRADATION + BLSURF_ELEMENT_ORDER - - + + + + false + + + + + - BLSURF_ALLOW_QUADRANGLES_TOOLTIP + BLSURF_OPTIMISATION_TOOLTIP - BLSURF_ALLOW_QUADRANGLES + BLSURF_OPTIMISATION + + + true - + BLSURF_OTHER_PARAMETERS @@ -439,6 +417,70 @@ + + + + BLSURF_ELEMENT_TYPE + + + + + + BLSURF_TRIANGLES_TOOLTIP + + + BLSURF_TRIANGLES + + + true + + + myButtonGroupElementType + + + + + + + BLSURF_ALLOW_QUADRANGLES_TOOLTIP + + + BLSURF_QUADRANGLE_DOMINANT + + + myButtonGroupElementType + + + + + + + BLSURF_QUADRANGLES_TOOLTIP + + + BLSURF_QUADRANGLES + + + myButtonGroupElementType + + + + + + + Qt::Vertical + + + + 20 + 3 + + + + + + + @@ -463,7 +505,6 @@ myUseGradation myGradation myOptimizeMesh - myAllowQuadrangles myAnisotropic myAnisotropicRatio myOptimiseTinyEdges @@ -757,4 +798,7 @@ onPhysicalMeshChanged() onEditingFinished() + + + diff --git a/src/GUI/BLSURFPlugin_msg_en.ts b/src/GUI/BLSURFPlugin_msg_en.ts index 6162398..8117f43 100644 --- a/src/GUI/BLSURFPlugin_msg_en.ts +++ b/src/GUI/BLSURFPlugin_msg_en.ts @@ -100,13 +100,33 @@ The default computed value is <em>diag</em>/5. Maximum ratio between the lengths of two adjacent edges in 3D mesh. - BLSURF_ALLOW_QUADRANGLES - Allow Quadrangles + BLSURF_ELEMENT_TYPE + Elements type + + + BLSURF_TRIANGLES + Triangles + + + BLSURF_QUADRANGLE_DOMINANT + Quadrangle dominant + + + BLSURF_QUADRANGLES + Quadrangles BLSURF_ALLOW_QUADRANGLES_TOOLTIP To generate quadrangle dominant mesh + + BLSURF_TRIANGLES_TOOLTIP + To generate triangles-only mesh + + + BLSURF_QUADRANGLES_TOOLTIP + To generate quadrangles-only mesh + BLSURF_GEOMETRICAL_SIZE Geometrical size diff --git a/src/GUI/BLSURFPlugin_msg_fr.ts b/src/GUI/BLSURFPlugin_msg_fr.ts index 56d7efd..bd56b83 100755 --- a/src/GUI/BLSURFPlugin_msg_fr.ts +++ b/src/GUI/BLSURFPlugin_msg_fr.ts @@ -104,13 +104,33 @@ La valeur par défaut est calculée par <em>diag</em>/5.Ratio maximum entre les longueurs de deux segments adjacents. - BLSURF_ALLOW_QUADRANGLES - Autoriser les quadrangles + BLSURF_ELEMENT_TYPE + Type d'éléments + + + BLSURF_TRIANGLES + Triangles + + + BLSURF_QUADRANGLE_DOMINANT + Quadrangles en majorité + + + BLSURF_QUADRANGLES + Quadrangles BLSURF_ALLOW_QUADRANGLES_TOOLTIP Générer un maillage à majorité de quadrangles + + BLSURF_TRIANGLES_TOOLTIP + Générer un maillage en triangles uniquement + + + BLSURF_QUADRANGLES_TOOLTIP + Générer un maillage en quadrangles uniquement + BLSURF_GEOMETRICAL_SIZE Taille géométrique diff --git a/src/GUI/BLSURFPlugin_msg_ja.ts b/src/GUI/BLSURFPlugin_msg_ja.ts index 1e0eb84..d5085f3 100644 --- a/src/GUI/BLSURFPlugin_msg_ja.ts +++ b/src/GUI/BLSURFPlugin_msg_ja.ts @@ -96,8 +96,32 @@ 四角形を許可 - BLSURF_ALLOW_QUADRANGLES_TOOLTIP - ドミナント四角形要素の生成 + BLSURF_ELEMENT_TYPE + Element type + + + BLSURF_TRIANGLES + Triangles + + + BLSURF_QUADRANGLE_DOMINANT + Quadrangle dominant + + + BLSURF_QUADRANGLES + Quadrangles + + + BLSURF_ALLOW_QUADRANGLES_TOOLTIP + ドミナント四角形要素の生成 + + + BLSURF_TRIANGLES_TOOLTIP + To generate triangles-only mesh + + + BLSURF_QUADRANGLES_TOOLTIP + To generate quadrangles-only mesh BLSURF_GEOMETRICAL_SIZE diff --git a/tests/test_quadrangles_gradation.py b/tests/test_quadrangles_gradation.py index 9a8f108..264fd8f 100644 --- a/tests/test_quadrangles_gradation.py +++ b/tests/test_quadrangles_gradation.py @@ -87,7 +87,7 @@ params.SetGeometricMesh( 1 ) params.SetAngleMesh( 4 ) params.SetPhySize( 8 ) algo2d.SetGradation(1.05) -params.SetQuadAllowed( True ) +params.SetElementType( True ) ok = Mesh_1.Compute() @@ -124,7 +124,7 @@ params.SetGeometricMesh( 1 ) params.SetAngleMesh( 4 ) params.SetPhySize( 8 ) algo2d.SetGradation(1.05) -params.SetQuadAllowed( True ) +params.SetElementType( 1 ) params.SetAnisotropic(True) ok = Mesh_2.Compute() diff --git a/tests/test_remove_tiny_edges.py b/tests/test_remove_tiny_edges.py index 1e863ee..0b61607 100644 --- a/tests/test_remove_tiny_edges.py +++ b/tests/test_remove_tiny_edges.py @@ -76,7 +76,6 @@ params.SetGeometricMesh( 1 ) params.SetAngleMesh( 4 ) params.SetPhySize( 8 ) #algo2d.SetGradation(1.05) -#params.SetQuadAllowed( True ) params.SetQuadraticMesh( True ) params.SetRemoveTinyEdges( True ) params.SetTinyEdgeLength( tiny_edge_length )