Salome HOME
53068: Create Mesh dialog box is frozen
authoreap <eap@opencascade.com>
Thu, 11 Feb 2016 15:11:47 +0000 (18:11 +0300)
committereap <eap@opencascade.com>
Thu, 11 Feb 2016 15:11:47 +0000 (18:11 +0300)
doc/salome/gui/SMESH/input/selection_filter_library.doc
src/SMESHGUI/SMESHGUI_Hypotheses.cxx
src/StdMeshers/StdMeshers_NumberOfLayers.cxx
src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx

index 7189ccc437a066e9038cedaa523cbeecccdbf3a3..c87d928e8ae4ad9fb508e790885d61e288534b4e 100644 (file)
@@ -5,8 +5,8 @@
 \n Selection filter library allows creating and storing in files
 the filters that can be later reused for operations on meshes. You can
 access it from the Main Menu via <b>Tools / Selection filter library</b>.
 \n Selection filter library allows creating and storing in files
 the filters that can be later reused for operations on meshes. You can
 access it from the Main Menu via <b>Tools / Selection filter library</b>.
-It is also possible to save any filter by invoking the filter library
-from \a Filter dialog launched from any mesh operation.
+It is also possible to save/load a filter by invoking the filter library
+from \ref filtering_elements "Filter dialog" launched from any mesh operation.
 
 \image html selectionfilterlibrary.png
 
 
 \image html selectionfilterlibrary.png
 
@@ -19,6 +19,7 @@ the current study. You can \b Add or \b Delete filters.
 filter. By default it is prefixed with the corresponding entity type.
 
 \anchor filtering_elements
 filter. By default it is prefixed with the corresponding entity type.
 
 \anchor filtering_elements
+<h2>Filter Dialog</h2>
 
 When we use filters during group creation or another operation (by 
 clicking <b>Set Filter</b> button in the corresponding dialog), the
 
 When we use filters during group creation or another operation (by 
 clicking <b>Set Filter</b> button in the corresponding dialog), the
@@ -66,15 +67,22 @@ created. You have to select the mesh and the button will be enabled.
 Some criteria are applicable to all <b>Entity types</b>:
 <ul><li>
 <b>Belong to Geom</b> selects entities whose all nodes lie on the
 Some criteria are applicable to all <b>Entity types</b>:
 <ul><li>
 <b>Belong to Geom</b> selects entities whose all nodes lie on the
-shape defined by <b>Threshold Value</b>. If the threshold shape is a
-sub-shape of the main shape of the mesh the algorithm works faster, if
-this is any other shape the algorithm works slower.
+shape defined by <b>Threshold Value</b>. 
+If the threshold shape is a sub-shape of the main shape of the mesh,
+the filtering algorithm works faster because node-to-shape association
+is used instead of measuring distance between nodes and the shape, and
+\b Tolerance is not used. If the threshold shape is any other shape,
+the algorithm works slower because distance between nodes and the
+shape is measured and is compared with \b Tolerance.
 </li><li>
 <b>Lying on Geom</b> selects entities whose at least one node
 lies on the shape defined by the <b>Threshold Value</b>.
 </li><li>
 <b>Lying on Geom</b> selects entities whose at least one node
 lies on the shape defined by the <b>Threshold Value</b>.
-If the threshold shape is a sub-shape of the main shape of the mesh the
-algorithm works faster, if this is any other
-shape, the algorithm works slower.
+If the threshold shape is a sub-shape of the main shape of the mesh,
+the filtering algorithm works faster because node-to-shape association
+is used instead of measuring distance between nodes and the shape, and
+\b Tolerance is not used. If the threshold shape is any other shape,
+the algorithm works slower because distance between nodes and the
+shape is measured and is compared with \b Tolerance.
 </li><li>
 <b>Belong to Mesh Group</b> selects entities included into the mesh group
 defined by the <b>Threshold Value</b>.
 </li><li>
 <b>Belong to Mesh Group</b> selects entities included into the mesh group
 defined by the <b>Threshold Value</b>.
@@ -97,7 +105,7 @@ other parts. <b>Threshold Value</b> locating any element of the domain can be ei
 </li>
 </ul>
 
 </li>
 </ul>
 
-Some criteria are applicable to all <b>Entity types</b> of dimension
+Some criteria are applicable to entities of dimension
 more than zero, i.e. to \b Edges, \b Faces and \b Volumes:
 <ul><li>
 <b>Linear</b> allows selection of Linear or Quadratic elements (if Unary is set to "Not")
 more than zero, i.e. to \b Edges, \b Faces and \b Volumes:
 <ul><li>
 <b>Linear</b> allows selection of Linear or Quadratic elements (if Unary is set to "Not")
@@ -111,8 +119,8 @@ as a combination of geometry type and the number of nodes.
 </li>
 </ul>
 
 </li>
 </ul>
 
-The following criteria are applicable to all <b>Entity types</b>
-except for <b>Volumes</b>:
+The following criteria are applicable to Entities of \b all types
+except for \a Volumes:
 <ul><li>
 <b>Belong to Plane</b> selects entities whose all nodes belong to a
 specified plane within a given <b>Tolerance</b>.
 <ul><li>
 <b>Belong to Plane</b> selects entities whose all nodes belong to a
 specified plane within a given <b>Tolerance</b>.
@@ -222,7 +230,7 @@ diagonals with a value of length, which is more, less or equal
 </li>
 </ul>
 
 </li>
 </ul>
 
-The following criteria allow selecting  mesh <b>Volumes</b>:
+The following criteria allow selecting mesh <b>Volumes</b>:
 <ul><li>
 <b>Aspect ratio 3D</b> selects 3D mesh elements with an aspect ratio (see also an
 \ref aspect_ratio_3d_page "Aspect Ratio 3D quality control"), which is more, less or equal
 <ul><li>
 <b>Aspect ratio 3D</b> selects 3D mesh elements with an aspect ratio (see also an
 \ref aspect_ratio_3d_page "Aspect Ratio 3D quality control"), which is more, less or equal
index 7d1495845630e6fbd9f600b6915d085253a04773..504607da543b8e70bdf7004f2e04a889f38568c1 100644 (file)
@@ -41,6 +41,7 @@
 #include <SUIT_ResourceMgr.h>
 #include <SUIT_Session.h>
 #include <SalomeApp_IntSpinBox.h>
 #include <SUIT_ResourceMgr.h>
 #include <SUIT_Session.h>
 #include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_Tools.h>
 
 // Qt includes
 #include <QFrame>
 
 // Qt includes
 #include <QFrame>
@@ -273,13 +274,20 @@ void SMESHGUI_GenericHypothesisCreator::onDialogFinished( int result )
   bool res = result==QDialog::Accepted;
   if( res )
   {
   bool res = result==QDialog::Accepted;
   if( res )
   {
-    SUIT_OverrideCursor wc;
-      /*QString paramValues = */storeParams();
+    try
+    {
+      SUIT_OverrideCursor wc;
+      storeParams();
       // No longer needed since NoteBook appears and "Value" OB field shows names of variable
       // No longer needed since NoteBook appears and "Value" OB field shows names of variable
-//       if ( !paramValues.isEmpty() ) {
-//         if ( _PTR(SObject) SHyp = SMESH::FindSObject( myHypo ))
-//           SMESH::SetValue( SHyp, paramValues );
-//       }
+      // QString paramValues = storeParams();
+      // if ( !paramValues.isEmpty() ) {
+      //   if ( _PTR(SObject) SHyp = SMESH::FindSObject( myHypo ))
+      //     SMESH::SetValue( SHyp, paramValues );
+      // }
+    }
+    catch ( const SALOME::SALOME_Exception& S_ex ) {
+      SalomeApp_Tools::QtCatchCorbaException( S_ex );
+    }
   }
 
   changeWidgets().clear();
   }
 
   changeWidgets().clear();
index f3fa3104ca933e98e1ec5b204ce37f9cf0af2b26..0e245845d08d4ce14a1640f37d2d7e0d3b8d44fe 100644 (file)
@@ -77,7 +77,7 @@ void StdMeshers_NumberOfLayers::SetNumberOfLayers(int numberOfLayers)
 {
   if ( _nbLayers != numberOfLayers ) {
     if ( numberOfLayers <= 0 )
 {
   if ( _nbLayers != numberOfLayers ) {
     if ( numberOfLayers <= 0 )
-      throw SALOME_Exception(LOCALIZED("numberOfLayers must be positive"));
+      throw SALOME_Exception(LOCALIZED("numberOfLayers must be more than zero"));
     _nbLayers = numberOfLayers;
 
     NotifySubMeshesHypothesisModification();
     _nbLayers = numberOfLayers;
 
     NotifySubMeshesHypothesisModification();
index ea722142c8ebfff0881eb20bb03730226c3b14f9..a9b7782829e37291b4565813acdbd9469c1a5891 100644 (file)
@@ -30,7 +30,6 @@
 #include <SMESHGUI_HypothesesUtils.h>
 #include <SMESHGUI_Utils.h>
 #include <SMESHGUI_GEOMGenUtils.h>
 #include <SMESHGUI_HypothesesUtils.h>
 #include <SMESHGUI_Utils.h>
 #include <SMESHGUI_GEOMGenUtils.h>
-
 #include <SMESH_TypeFilter.hxx>
 #include <SMESH_NumberFilter.hxx>
 
 #include <SMESH_TypeFilter.hxx>
 #include <SMESH_NumberFilter.hxx>
 
@@ -47,8 +46,9 @@
 #include <GEOM_wrap.hxx>
 
 // SALOME GUI includes
 #include <GEOM_wrap.hxx>
 
 // SALOME GUI includes
-#include <SUIT_ResourceMgr.h>
 #include <SUIT_MessageBox.h>
 #include <SUIT_MessageBox.h>
+#include <SUIT_ResourceMgr.h>
+#include <SalomeApp_IntSpinBox.h>
 
 // IDL includes
 #include <SALOMEconfig.h>
 
 // IDL includes
 #include <SALOMEconfig.h>
@@ -1383,6 +1383,14 @@ void StdMeshersGUI_StdHypothesisCreator::attuneStdWidget (QWidget* w, const int)
       sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
     }
   }
       sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
     }
   }
+  else if ( SalomeApp_IntSpinBox* sb = qobject_cast< SalomeApp_IntSpinBox* >( w ))
+  {
+    if ( hypType().startsWith( "NumberOfLayers" ) ||
+         hypType().startsWith( "ViscousLayers" ))
+    {
+      sb->setMinimum( 1 );
+    }
+  }
 }
 
 //================================================================================
 }
 
 //================================================================================