From d05e8d51119b29c2e259a4543d28752f0abc4a39 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=A9rald=20NICOLAS?= Date: Mon, 25 May 2020 16:01:16 +0200 Subject: [PATCH] =?utf8?q?pr=C3=A9f=C3=A9rences?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/ADAPTGUI/ADAPT_msg_en.ts | 44 ------------------------------------ src/ADAPTGUI/ADAPT_msg_fr.ts | 44 ------------------------------------ src/SMESHGUI/CMakeLists.txt | 1 + src/SMESHGUI/SMESHGUI.cxx | 42 +++++++++++++++++++++++++++------- src/SMESHGUI/SMESH_msg_en.ts | 40 ++++++++++++++++++++++++++++++++ src/SMESHGUI/SMESH_msg_fr.ts | 40 ++++++++++++++++++++++++++++++++ 6 files changed, 115 insertions(+), 96 deletions(-) diff --git a/src/ADAPTGUI/ADAPT_msg_en.ts b/src/ADAPTGUI/ADAPT_msg_en.ts index 4d40ad891..1567033d6 100644 --- a/src/ADAPTGUI/ADAPT_msg_en.ts +++ b/src/ADAPTGUI/ADAPT_msg_en.ts @@ -411,49 +411,5 @@ HOM_YACS_EDIT_WINDOW_TITLE Edition of a schema YACS - - PREF_TAB_GENERAL - General - - - PREF_PUBLICATION - Publication - - - PREF_PUBLICATION_MAILLAGE_IN - IN meshes - - - PREF_PUBLICATION_MAILLAGE_OUT - OUT meshes - - - PREF_YACS - YACS - - - PREF_YACS_MAX - Maximum numbers - - - PREF_YACS_MAX_ITER - Iterations - - - PREF_YACS_MAX_NODE - Nodes - - - PREF_YACS_MAX_ELEM - Elements - - - PREF_YACS_CONVERGENCE - Convergence - - - PREF_YACS_TYPE_TEST - Test type - diff --git a/src/ADAPTGUI/ADAPT_msg_fr.ts b/src/ADAPTGUI/ADAPT_msg_fr.ts index 3306a69e7..f36da7b24 100644 --- a/src/ADAPTGUI/ADAPT_msg_fr.ts +++ b/src/ADAPTGUI/ADAPT_msg_fr.ts @@ -1123,49 +1123,5 @@ HOM_YACS_EDIT_WINDOW_TITLE Edition d'un schéma YACS - - PREF_TAB_GENERAL - Général - - - PREF_PUBLICATION - Publication - - - PREF_PUBLICATION_MAILLAGE_IN - Les maillages d'entrée - - - PREF_PUBLICATION_MAILLAGE_OUT - Les maillages de sortie - - - PREF_YACS - YACS - - - PREF_YACS_MAX - Nombres maximum - - - PREF_YACS_MAX_ITER - Itérations - - - PREF_YACS_MAX_NODE - Noeuds - - - PREF_YACS_MAX_ELEM - Eléments - - - PREF_YACS_CONVERGENCE - Convergence - - - PREF_YACS_TYPE_TEST - Type de test - diff --git a/src/SMESHGUI/CMakeLists.txt b/src/SMESHGUI/CMakeLists.txt index 5bd61d945..c0252dca4 100644 --- a/src/SMESHGUI/CMakeLists.txt +++ b/src/SMESHGUI/CMakeLists.txt @@ -42,6 +42,7 @@ INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src/Controls ${PROJECT_SOURCE_DIR}/src/SMESHClient ${PROJECT_SOURCE_DIR}/src/MEDWrapper + ${PROJECT_SOURCE_DIR}/src/ADAPTGUI ${PROJECT_BINARY_DIR} ${PROJECT_BINARY_DIR}/idl ) diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 5704acc4d..18ce3d638 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -94,6 +94,7 @@ #include "SMESHGUI_TransparencyDlg.h" #include "SMESHGUI_Utils.h" #include "SMESHGUI_VTKUtils.h" +#include "ADAPTGUI.h" #include "SMESH_version.h" @@ -5713,6 +5714,38 @@ void SMESHGUI::createPreferences() setPreferenceProperty( coloringType, "indexes", indices ); addPreference( tr( "SMESH_DISTRIBUTION_COLOR" ), distributionGr, LightApp_Preferences::Color, "SMESH", "distribution_color" ); + // Adaptation tab ------------------------------------------------------------------------ + int adaptTab = addPreference( tr( "ADAPT_PREF_TAB_GENERAL" ) ); + int bloc, pref ; + // Refinement with HOMARD + bloc = addPreference( tr( "ADAPT_PREF_PUBLICATION" ), adaptTab ); + setPreferenceProperty( bloc, "columns", 1 ); + pref = addPreference( tr( "ADAPT_PREF_PUBLICATION_MAILLAGE_IN" ), bloc, LightApp_Preferences::Bool, "HOMARD", "publish_mesh_in" ); + pref = addPreference( tr( "ADAPT_PREF_PUBLICATION_MAILLAGE_OUT" ), bloc, LightApp_Preferences::Bool, "HOMARD", "publish_mesh_out" ); + + bloc = addPreference( tr( "ADAPT_PREF_YACS_MAX" ), adaptTab ); + setPreferenceProperty( bloc, "columns", 1 ); + pref = addPreference( tr( "ADAPT_PREF_YACS_MAX_ITER" ), bloc, LightApp_Preferences::IntSpin, "HOMARD", "yacs_max_iter" ); + setPreferenceProperty( pref, "min", 0 ); + setPreferenceProperty( pref, "max", 100000000 ); + setPreferenceProperty( pref, "step", 1 ); + pref = addPreference( tr( "ADAPT_PREF_YACS_MAX_NODE" ), bloc, LightApp_Preferences::IntSpin, "HOMARD", "yacs_max_node" ); + setPreferenceProperty( pref, "min", 0 ); + setPreferenceProperty( pref, "max", 100000000 ); + setPreferenceProperty( pref, "step", 1000 ); + pref = addPreference( tr( "ADAPT_PREF_YACS_MAX_ELEM" ), bloc, LightApp_Preferences::IntSpin, "HOMARD", "yacs_max_elem" ); + setPreferenceProperty( pref, "min", 0 ); + setPreferenceProperty( pref, "max", 100000000 ); + setPreferenceProperty( pref, "step", 1000 ); + bloc = addPreference( tr( "ADAPT_PREF_YACS_CONVERGENCE" ), adaptTab ); + setPreferenceProperty( bloc, "columns", 1 ); + pref = addPreference( tr( "ADAPT_PREF_YACS_TYPE_TEST" ), bloc, LightApp_Preferences::Selector, "HOMARD", "yacs_type_test" ); + QStringList aListOfTypeTest; + aListOfTypeTest << "None"; + aListOfTypeTest << "VTest > VRef"; + aListOfTypeTest << "VTest < VRef"; + setPreferenceProperty( pref, "strings", aListOfTypeTest ); + } void SMESHGUI::preferencesChanged( const QString& sect, const QString& name ) @@ -5879,22 +5912,15 @@ LightApp_Operation* SMESHGUI::createOperation( const int id ) const op = new SMESHGUI_SplitBiQuadOp(); break; case SMESHOp::OpUniformRefinement: - break; case SMESHOp::OpHONewCase: - break; case SMESHOp::OpHOCaseFollow: - break; case SMESHOp::OpHONewIter: - break; case SMESHOp::OpHOIterCompute: - break; case SMESHOp::OpHOIterComputePublish: - break; case SMESHOp::OpHOEdit: - break; case SMESHOp::OpHODelete: - break; case SMESHOp::OpMGAdapt: +// op = new ADAPTGUI( id ); break; case SMESHOp::OpConvertMeshToQuadratic: op = new SMESHGUI_ConvToQuadOp(); diff --git a/src/SMESHGUI/SMESH_msg_en.ts b/src/SMESHGUI/SMESH_msg_en.ts index 559c7e297..dcb378274 100644 --- a/src/SMESHGUI/SMESH_msg_en.ts +++ b/src/SMESHGUI/SMESH_msg_en.ts @@ -2929,6 +2929,46 @@ Check algorithm documentation for supported geometry SMESH_MULTICOLOR Multicolor + + ADAPT_PREF_TAB_GENERAL + Adaptation + + + ADAPT_PREF_PUBLICATION + Publication + + + ADAPT_PREF_PUBLICATION_MAILLAGE_IN + IN meshes + + + ADAPT_PREF_PUBLICATION_MAILLAGE_OUT + OUT meshes + + + ADAPT_PREF_YACS_MAX + Maximum numbers + + + ADAPT_PREF_YACS_MAX_ITER + Iterations + + + ADAPT_PREF_YACS_MAX_NODE + Nodes + + + ADAPT_PREF_YACS_MAX_ELEM + Elements + + + ADAPT_PREF_YACS_CONVERGENCE + Convergence + + + ADAPT_PREF_YACS_TYPE_TEST + Test type + SMESH_VISU_PROBLEM Mesh visualization failed diff --git a/src/SMESHGUI/SMESH_msg_fr.ts b/src/SMESHGUI/SMESH_msg_fr.ts index 18f64d3d3..809f898d9 100644 --- a/src/SMESHGUI/SMESH_msg_fr.ts +++ b/src/SMESHGUI/SMESH_msg_fr.ts @@ -2899,6 +2899,46 @@ Référez-vous à la documentation sur l'algorithme et la géométrie suppo SMESH_MULTICOLOR Multicouleur + + ADAPT_PREF_TAB_GENERAL + Adaptation + + + ADAPT_PREF_PUBLICATION + Publication + + + ADAPT_PREF_PUBLICATION_MAILLAGE_IN + Les maillages d'entrée + + + ADAPT_PREF_PUBLICATION_MAILLAGE_OUT + Les maillages de sortie + + + ADAPT_PREF_YACS_MAX + Nombres maximaux + + + ADAPT_PREF_YACS_MAX_ITER + Itérations + + + ADAPT_PREF_YACS_MAX_NODE + Noeuds + + + ADAPT_PREF_YACS_MAX_ELEM + Eléments + + + ADAPT_PREF_YACS_CONVERGENCE + Convergence + + + ADAPT_PREF_YACS_TYPE_TEST + Type de test + SMESH_VISU_PROBLEM Impossible de visualiser le maillage, probablement à cause d'un manque de mémoire -- 2.39.2