From: eap Date: Tue, 22 Oct 2019 14:24:35 +0000 (+0300) Subject: #17845 [EDF] Modifications of Automatic meshing X-Git-Tag: V9_5_0a1~28 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5dcb2f2b467e63a0e5d37e234b2ba8f8e624f987;p=modules%2Fsmesh.git #17845 [EDF] Modifications of Automatic meshing --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 10fb7d492..3515fa48d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,10 +76,11 @@ OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON) OPTION(SALOME_BUILD_DOC "Generate SALOME SMESH documentation" ON) # Advanced options: -OPTION(SALOME_BUILD_GUI "Enable GUI" ON) -OPTION(SALOME_SMESH_USE_CGNS "Enable import/export to CGNS format" OFF) -OPTION(SALOME_SMESH_USE_TBB "Enable parallel computation" OFF) -OPTION(SALOME_SMESH_DYNLOAD_LOCAL "Load plug-ins' symbols locally (Linux only)" ON) +OPTION(SALOME_BUILD_GUI "Enable GUI" ON) +OPTION(SALOME_SMESH_USE_CGNS "Enable import/export to CGNS format" OFF) +OPTION(SALOME_SMESH_USE_TBB "Enable parallel computation" OFF) +OPTION(SALOME_SMESH_DYNLOAD_LOCAL "Load plug-ins' symbols locally (Linux only)" ON) +OPTION(SMESH_USE_MESHGEMS_HYPOSET "Prefer MeshGems algorithms in sets of hypotheses" OFF) CMAKE_DEPENDENT_OPTION(SALOME_SMESH_BUILD_FRENCH_DOC "Generate SALOME SMESH French documentation" OFF "SALOME_BUILD_DOC" OFF) @@ -87,6 +88,12 @@ IF(SALOME_SMESH_DYNLOAD_LOCAL) ADD_DEFINITIONS(-DDYNLOAD_LOCAL) ENDIF(SALOME_SMESH_DYNLOAD_LOCAL) +IF(SMESH_USE_MESHGEMS_HYPOSET) + SET(SMESH_USE_MESHGEMS_HYPOSET_VAR "true") +ELSE(SMESH_USE_MESHGEMS_HYPOSET) + SET(SMESH_USE_MESHGEMS_HYPOSET_VAR "false") +ENDIF(SMESH_USE_MESHGEMS_HYPOSET) + #On Linux use Fortran to compile MEFISTO2D IF(NOT WIN32) ENABLE_LANGUAGE(Fortran) @@ -94,7 +101,7 @@ IF(NOT WIN32) ADD_DEFINITIONS(-DENABLE_MEFISTO) ENDIF(NOT WIN32) -MARK_AS_ADVANCED(SALOME_BUILD_GUI SALOME_SMESH_USE_CGNS SALOME_SMESH_USE_TBB SALOME_SMESH_DYNLOAD_LOCAL) +MARK_AS_ADVANCED(SALOME_BUILD_GUI SALOME_SMESH_USE_CGNS SALOME_SMESH_USE_TBB SALOME_SMESH_DYNLOAD_LOCAL SMESH_USE_MESHGEMS_HYPOSET) # Prerequisites # ============= diff --git a/doc/salome/gui/SMESH/images/hypo_sets.png b/doc/salome/gui/SMESH/images/hypo_sets.png index 2a9859d23..14af9af48 100644 Binary files a/doc/salome/gui/SMESH/images/hypo_sets.png and b/doc/salome/gui/SMESH/images/hypo_sets.png differ diff --git a/doc/salome/gui/SMESH/images/pref21.png b/doc/salome/gui/SMESH/images/pref21.png index 1f5d63cf9..b0d756fd7 100644 Binary files a/doc/salome/gui/SMESH/images/pref21.png and b/doc/salome/gui/SMESH/images/pref21.png differ diff --git a/doc/salome/gui/SMESH/input/constructing_meshes.rst b/doc/salome/gui/SMESH/input/constructing_meshes.rst index f5aca4457..05c4c0d39 100644 --- a/doc/salome/gui/SMESH/input/constructing_meshes.rst +++ b/doc/salome/gui/SMESH/input/constructing_meshes.rst @@ -160,7 +160,6 @@ To construct a mesh: List of sets of hypotheses. Tag *[custom]* is automatically added to the sets defined by the user. .. note:: - * *"Automatic"* in the names of predefined sets of hypotheses does not actually mean that they are suitable for meshing any geometry. * The list of sets of hypotheses can be shorter than in the above image depending on the geometry dimension. diff --git a/doc/salome/gui/SMESH/input/mesh_preferences.rst b/doc/salome/gui/SMESH/input/mesh_preferences.rst index 734011f1b..027518e91 100644 --- a/doc/salome/gui/SMESH/input/mesh_preferences.rst +++ b/doc/salome/gui/SMESH/input/mesh_preferences.rst @@ -101,6 +101,10 @@ General Preferences * **Default Number of Segments** - defines the default number of segments in :ref:`Number of Segments ` hypothesis. +.. _use_meshgems_pref: + + * **Use MeshGems meshers when assigning set of hypotheses** - if activated, commercial meshers of MeshGems suite are used instead of a free mesher NETGEN when assigning a set of hypotheses in Create Mesh/Sub-mesh dialog. + * **Mesh loading** * **No mesh loading from study file at hypothesis modification** - if activated, the mesh data will not be loaded from the study file when a hypothesis is modified. This allows saving time by omitting loading data of a large mesh that is planned to be recomputed with other parameters. diff --git a/idl/SMESH_Gen.idl b/idl/SMESH_Gen.idl index cdb800e87..4dbeb2ef0 100644 --- a/idl/SMESH_Gen.idl +++ b/idl/SMESH_Gen.idl @@ -116,6 +116,15 @@ module SMESH }; typedef sequence compute_error_array; + /*! + * Way to initialize hypothesis + */ + struct HypInitParams + { + short way; // 0 - by mesh, 1 - by geometry size + prefered parameters, 2 - by averageLength + double averageLength; + boolean quadDominated; + }; interface SMESH_Gen : Engines::EngineComponent, SALOMEDS::Driver { @@ -175,7 +184,7 @@ module SMESH in string theLibName, in SMESH_Mesh theMesh, in GEOM::GEOM_Object theGeom, - in boolean byMesh) + in HypInitParams theWay) raises ( SALOME::SALOME_Exception ); /*! diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt index 7b880a703..d0d99adcb 100644 --- a/resources/CMakeLists.txt +++ b/resources/CMakeLists.txt @@ -21,7 +21,18 @@ # SET(SMESH_RESOURCES_FILES + ModuleMesh.png + advanced_mesh_info.png + bare_border_face.png + bare_border_volume.png + copy_mesh.png + copy_mesh_with_geom.png delete.png + mesh.png + mesh_0D_elem.png + mesh_0D_on_all_nodes.png + mesh_2d_from_3d.png + mesh_add.png mesh_add_sub.png mesh_algo_hexa.png mesh_algo_mefisto.png @@ -29,211 +40,203 @@ SET(SMESH_RESOURCES_FILES mesh_algo_regular.png mesh_algo_tetra.png mesh_angle.png + mesh_angle_measure.png mesh_area.png mesh_aspect.png mesh_aspect_3d.png + mesh_ball.png mesh_biquad_quadrangle.png mesh_biquad_triangle.png + mesh_bounding_box.png + mesh_build_compound.png mesh_choose.png mesh_choose_all.png mesh_clear.png mesh_compute.png - mesh_evaluate.png - mesh_order.png + mesh_conv_to_quad.png + mesh_cutGroups.png + mesh_cutquad.png + mesh_deflection.png + mesh_deleteGroups.png mesh_diagonal.png + mesh_duplicate_elem_only.png + mesh_duplicate_group_boundary.png + mesh_duplicate_nodes.png + mesh_duplicate_nodes_with_elem.png mesh_edit.png - mesh_hexa.png - mesh_hypo_area.png - mesh_hypo_length.png - mesh_hypo_segment.png - mesh_hypo_volume.png - mesh_hypo_edit.png - mesh_plus.png - mesh_minus.png - mesh_info.png - advanced_mesh_info.png - standard_mesh_info.png + mesh_edit_group.png mesh_elem_info.png mesh_equal_edge.png mesh_equal_face.png mesh_equal_node.png mesh_equal_volume.png - mesh_whatis.png - mesh_init.png - mesh_length.png - mesh_length_2d.png + mesh_evaluate.png + mesh_extmeth_face_offset.png + mesh_extmeth_node_offset.png + mesh_extmeth_surf_offset_smooth.png + mesh_extractGroup.png + mesh_extrusion.png + mesh_extrusionpath.png + mesh_face_groups_by_edges.png mesh_find_elem_by_point.png mesh_free_edges.png mesh_free_edges_2d.png + mesh_free_faces.png mesh_free_nodes.png + mesh_group.png + mesh_groups_from_gemetry.png + mesh_hexa.png + mesh_hide.png + mesh_hypo_area.png + mesh_hypo_edit.png + mesh_hypo_layer_distribution.png + mesh_hypo_length.png + mesh_hypo_segment.png + mesh_hypo_source_3d.png + mesh_hypo_source_edge.png + mesh_hypo_source_face.png + mesh_hypo_viscous_layers.png + mesh_hypo_volume.png + mesh_info.png + mesh_init.png + mesh_intersectGroups.png + mesh_length.png + mesh_length_2d.png + mesh_line.png + mesh_line_n.png + mesh_make_group.png mesh_max_element_length_2d.png mesh_max_element_length_3d.png - mesh_multi_edges.png - mesh_multi_edges_2d.png - mesh_line_n.png - mesh_line.png + mesh_measure_area.png + mesh_measure_basic_props.png + mesh_measure_length.png + mesh_measure_volume.png + mesh_merge_elements.png + mesh_merge_nodes.png + mesh_min_dist.png + mesh_minus.png mesh_move_node.png mesh_move_without_node.png + mesh_multi_edges.png + mesh_multi_edges_2d.png + mesh_node_to_point.png mesh_octahedron.png + mesh_offset.png + mesh_order.png mesh_orientation.png - mesh.png + mesh_pattern.png + mesh_pentahedron.png mesh_plugins_meshcut.png + mesh_plus.png + mesh_points.png mesh_polygon.png mesh_polyhedron.png - mesh_pyramid_n.png + mesh_precompute.png mesh_pyramid.png - mesh_quad_n.png + mesh_pyramid_n.png mesh_quad.png + mesh_quad_edge.png + mesh_quad_hexahedron.png + mesh_quad_n.png + mesh_quad_pentahedron.png + mesh_quad_polygon.png + mesh_quad_pyramid.png + mesh_quad_quadrangle.png + mesh_quad_tetrahedron.png + mesh_quad_triangle.png mesh_quadrangle_quadpref.png mesh_quadrangle_quadpref_reversed.png mesh_quadrangle_reduced.png mesh_quadrangle_standard.png mesh_quadrangle_triapref.png + mesh_quality.png mesh_rem_element.png mesh_rem_node.png mesh_rem_orphan_nodes.png + mesh_remove.png + mesh_renumbering_elements.png + mesh_renumbering_nodes.png + mesh_revolution.png + mesh_rotation.png + mesh_sew_bordertoside.png + mesh_sew_conform_freeborders.png + mesh_sew_freeborders.png + mesh_sew_sideelements.png mesh_shading.png + mesh_show.png mesh_shrink.png mesh_skew.png + mesh_smoothing.png + mesh_symmetry_axis.png + mesh_symmetry_plane.png + mesh_symmetry_point.png mesh_taper.png mesh_tetra.png + mesh_translation_points.png + mesh_translation_vector.png + mesh_tree_algo.png + mesh_tree_algo_0D.png + mesh_tree_algo_existing_2D.png mesh_tree_algo_hexa.png mesh_tree_algo_mefisto.png mesh_tree_algo_polygon.png - mesh_tree_algo.png - mesh_tree_algo_0D.png + mesh_tree_algo_prism.png + mesh_tree_algo_projection_2d.png mesh_tree_algo_quad.png + mesh_tree_algo_radial_prism.png + mesh_tree_algo_radial_quadrangle_1D2D.png mesh_tree_algo_regular.png mesh_tree_algo_tetra.png + mesh_tree_group.png + mesh_tree_group_on_filter.png + mesh_tree_hypo.png mesh_tree_hypo_area.png + mesh_tree_hypo_cartesian.png + mesh_tree_hypo_import_source_1d.png + mesh_tree_hypo_import_source_2d.png + mesh_tree_hypo_layers_distribution.png + mesh_tree_hypo_layers_distribution_2d.png mesh_tree_hypo_length.png - mesh_tree_hypo.png + mesh_tree_hypo_projection_2d.png + mesh_tree_hypo_projection_3d.png + mesh_tree_hypo_quadratic.png mesh_tree_hypo_segment.png + mesh_tree_hypo_source_3d_shape.png + mesh_tree_hypo_source_edge.png + mesh_tree_hypo_source_face.png + mesh_tree_hypo_viscous_layers.png mesh_tree_hypo_volume.png - mesh_tree_hypo_cartesian.png - mesh_tree_mesh.png mesh_tree_importedmesh.png + mesh_tree_mesh.png + mesh_tree_mesh_partial.png mesh_tree_mesh_warn.png + mesh_triangle.png mesh_triangle_n.png mesh_triquad_hexahedron.png - mesh_triangle.png + mesh_union2tri.png + mesh_unionGroups.png + mesh_uniontri.png mesh_update.png - mesh_vertex_n.png mesh_vertex.png - mesh_0D_elem.png - mesh_0D_on_all_nodes.png + mesh_vertex_n.png mesh_volume_3d.png - bare_border_volume.png - bare_border_face.png - over_constrained_volume.png - over_constrained_face.png + mesh_whatis.png mesh_wireframe.png - mesh_points.png mesh_wrap.png - mesh_group.png - mesh_tree_group.png - mesh_tree_group_on_filter.png - mesh_edit_group.png - mesh_make_group.png - mesh_groups_from_gemetry.png - mesh_union2tri.png - mesh_uniontri.png - mesh_cutquad.png - mesh_smoothing.png - mesh_renumbering_nodes.png - mesh_renumbering_elements.png - mesh_extrusion.png - mesh_extrusionpath.png - mesh_revolution.png - ModuleMesh.png - mesh_unionGroups.png - mesh_intersectGroups.png - mesh_cutGroups.png - mesh_deleteGroups.png - mesh_translation_vector.png - mesh_translation_points.png - mesh_rotation.png - mesh_symmetry_point.png - mesh_symmetry_axis.png - mesh_symmetry_plane.png - mesh_sew_freeborders.png - mesh_sew_conform_freeborders.png - mesh_sew_bordertoside.png - mesh_sew_sideelements.png - mesh_merge_nodes.png - mesh_merge_elements.png - select1.png open.png - mesh_pattern.png - mesh_pentahedron.png + over_constrained_face.png + over_constrained_volume.png pattern_sample_2d.png pattern_sample_3D.png - mesh_add.png - mesh_remove.png - mesh_quad_edge.png - mesh_quad_triangle.png - mesh_quad_quadrangle.png - mesh_quad_polygon.png - mesh_quad_tetrahedron.png - mesh_quad_pyramid.png - mesh_quad_pentahedron.png - mesh_quad_hexahedron.png - mesh_conv_to_quad.png - mesh_tree_hypo_layers_distribution.png - mesh_tree_algo_radial_prism.png - mesh_tree_algo_radial_quadrangle_1D2D.png - mesh_tree_algo_existing_2D.png - mesh_tree_algo_prism.png - mesh_tree_algo_projection_2d.png - mesh_hypo_source_edge.png - mesh_hypo_source_3d.png - mesh_hypo_layer_distribution.png - mesh_hypo_source_face.png - mesh_tree_hypo_source_face.png - mesh_tree_hypo_source_edge.png - mesh_tree_hypo_source_3d_shape.png - mesh_tree_hypo_projection_3d.png - mesh_tree_hypo_projection_2d.png - mesh_tree_hypo_quadratic.png - mesh_build_compound.png - copy_mesh.png - copy_mesh_with_geom.png - mesh_node_to_point.png - mesh_tree_mesh_partial.png - mesh_extractGroup.png - mesh_precompute.png - mesh_2d_from_3d.png - mesh_free_faces.png + reorient_faces_face.png + reorient_faces_point.png + reorient_faces_volume.png scale.png scale_along_axes.png - split_into_tetra.png + select1.png split_biquad.png - mesh_duplicate_nodes.png - mesh_duplicate_nodes_with_elem.png - mesh_duplicate_elem_only.png - mesh_duplicate_group_boundary.png - mesh_bounding_box.png - mesh_hypo_viscous_layers.png - mesh_tree_hypo_viscous_layers.png - mesh_min_dist.png - reorient_faces_point.png - reorient_faces_face.png - reorient_faces_volume.png - mesh_ball.png - mesh_measure_basic_props.png - mesh_measure_length.png - mesh_measure_area.png - mesh_measure_volume.png - mesh_extmeth_node_offset.png - mesh_extmeth_surf_offset_smooth.png - mesh_extmeth_face_offset.png - mesh_quality.png - mesh_show.png - mesh_hide.png - mesh_deflection.png - mesh_offset.png - mesh_face_groups_by_edges.png - mesh_angle_measure.png + split_into_tetra.png + standard_mesh_info.png ) INSTALL(FILES ${SMESH_RESOURCES_FILES} DESTINATION ${SALOME_SMESH_INSTALL_RES_DATA}) diff --git a/resources/SalomeApp.xml.in b/resources/SalomeApp.xml.in index b78f7a903..4af56219a 100644 --- a/resources/SalomeApp.xml.in +++ b/resources/SalomeApp.xml.in @@ -76,6 +76,7 @@ + diff --git a/resources/StdMeshers.xml.in b/resources/StdMeshers.xml.in index 14ed93a0c..bf2204b86 100644 --- a/resources/StdMeshers.xml.in +++ b/resources/StdMeshers.xml.in @@ -590,22 +590,45 @@ - - - + + - - - + + + + + + diff --git a/resources/mesh_tree_hypo_import_source_1d.png b/resources/mesh_tree_hypo_import_source_1d.png new file mode 100644 index 000000000..8db626043 Binary files /dev/null and b/resources/mesh_tree_hypo_import_source_1d.png differ diff --git a/resources/mesh_tree_hypo_import_source_2d.png b/resources/mesh_tree_hypo_import_source_2d.png new file mode 100644 index 000000000..3d4e1e245 Binary files /dev/null and b/resources/mesh_tree_hypo_import_source_2d.png differ diff --git a/resources/mesh_tree_hypo_layers_distribution_2d.png b/resources/mesh_tree_hypo_layers_distribution_2d.png new file mode 100644 index 000000000..fb5082f52 Binary files /dev/null and b/resources/mesh_tree_hypo_layers_distribution_2d.png differ diff --git a/src/SMESH/SMESH_Hypothesis.hxx b/src/SMESH/SMESH_Hypothesis.hxx index d1301c452..520e72477 100644 --- a/src/SMESH/SMESH_Hypothesis.hxx +++ b/src/SMESH/SMESH_Hypothesis.hxx @@ -95,11 +95,18 @@ public: */ virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape)=0; + enum InitWay { BY_MESH, BY_GEOM, BY_AVERAGE_LENGTH }; struct TDefaults { + InitWay _way; double _elemLength; int _nbSegments; + bool _quadDominated; + double _diagonal; TopoDS_Shape* _shape; // future shape of the mesh being created + + TDefaults(): + _way(BY_GEOM), _elemLength(0),_nbSegments(0),_quadDominated(false),_diagonal(0),_shape(0) {} }; /*! * \brief Initialize my parameter values by default parameters. diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 82d159350..deb3711c9 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -5211,6 +5211,7 @@ void SMESHGUI::createPreferences() "SMESH", "nb_segments_per_edge" ); setPreferenceProperty( nbSeg, "min", 1 ); setPreferenceProperty( nbSeg, "max", 10000000 ); + addPreference( tr( "PREF_USE_MESHGEMS_HYPOSET" ), segGroup, LightApp_Preferences::Bool, "SMESH", "use-meshgems-hypo-sets" ); int loadGroup = addPreference( tr( "SMESH_PREF_MESH_LOADING" ), genTab ); addPreference( tr( "PREF_FORGET_MESH_AT_HYP_MODIF" ), loadGroup, LightApp_Preferences::Bool, diff --git a/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx index 6a0f17d33..9a939559b 100644 --- a/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx @@ -206,7 +206,7 @@ LightApp_Dialog* SMESHGUI_GroupOnShapeOp::dlg() const */ //================================================================================ -static SMESH::ElementType elementType(GEOM::GEOM_Object_var geom) +SMESH::ElementType SMESHGUI_GroupOnShapeOp::ElementType(GEOM::GEOM_Object_var geom) { if ( !geom->_is_nil() ) { switch ( geom->GetShapeType() ) { @@ -232,7 +232,7 @@ static SMESH::ElementType elementType(GEOM::GEOM_Object_var geom) GEOM::ListOfLong_var ids = aGroupOp->GetObjects( geom ); if ( ids->length() && !mainShape->_is_nil() && !aShapeOp->_is_nil() ) { GEOM::GEOM_Object_wrap member = aShapeOp->GetSubShape( mainShape, ids[0] ); - return elementType( member ); + return ElementType( member ); } } } @@ -240,7 +240,7 @@ static SMESH::ElementType elementType(GEOM::GEOM_Object_var geom) GEOM::ListOfLong_var ids = aShapeOp->SubShapeAllIDs( geom, GEOM::SHAPE, false ); if ( ids->length() ) { GEOM::GEOM_Object_wrap member = aShapeOp->GetSubShape( geom, ids[0] ); - return elementType( member ); + return ElementType( member ); } } } @@ -335,7 +335,7 @@ bool SMESHGUI_GroupOnShapeOp::onApply() if ( geom->_is_nil() ) continue; // group type - SMESH::ElementType elemType = isNode ? SMESH::NODE : elementType( geom ); + SMESH::ElementType elemType = isNode ? SMESH::NODE : ElementType( geom ); if ( elemType == SMESH::ALL ) continue; diff --git a/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.h b/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.h index 63d946b7a..f88e9bef5 100644 --- a/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.h +++ b/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.h @@ -49,6 +49,7 @@ public: virtual LightApp_Dialog* dlg() const; static QString GetDefaultName(const QString& theOperation); + static SMESH::ElementType ElementType(GEOM::GEOM_Object_var geom); public slots: diff --git a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx index 5522e3144..2c22e5a54 100644 --- a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx +++ b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx @@ -27,10 +27,11 @@ #include "SMESHGUI.h" #include "SMESHGUI_HypothesesUtils.h" -#include "SMESHGUI_Utils.h" #include "SMESHGUI_SpinBox.h" +#include "SMESHGUI_Utils.h" #include "SMESHGUI_VTKUtils.h" #include "SMESH_Actor.h" +#include "SMESH_TypeDefs.hxx" // SALOME KERNEL includes #include @@ -147,10 +148,14 @@ void SMESHGUI_GenericHypothesisCreator::editHypothesis( SMESH::SMESH_Hypothesis_ Dlg->setWindowTitle( caption() ); Dlg->setObjectName( theHypName ); Dlg->setHIcon( icon() ); - Dlg->setType( type() ); + if ( theHypName == HypothesesSet::getCommonHypoSetHypoType() ) + Dlg->setType( tr( HypothesesSet::getCommonHypoSetHypoType()) ); + else + Dlg->setType( type() ); retrieveParams(); - Dlg->show(); + Dlg->show(); // w/o this Dlg blocks selection Dlg->resize( Dlg->minimumSizeHint() ); + Dlg->exec(); // w/o this we cant wait until edition ends when applying a hypo-set } else { emit finished( QDialog::Accepted ); @@ -671,6 +676,14 @@ SMESHGUI_HypothesisDlg::~SMESHGUI_HypothesisDlg() delete myCreator; } +void SMESHGUI_HypothesisDlg::showEvent(QShowEvent *event) +{ + // resize( minimumSizeHint() ); + // adjustSize(); + + QtxDialog::showEvent( event ); +} + void SMESHGUI_HypothesisDlg::setCustomFrame( QFrame* f ) { if( f ) @@ -779,32 +792,44 @@ HypothesisData::HypothesisData( const QString& theTypeName, { } -HypothesesSet::HypothesesSet( const QString& theSetName ) - : myHypoSetName( theSetName ), - myIsAlgo( false ), - myIsCustom( false ) -{ -} - -HypothesesSet::HypothesesSet( const QString& theSetName, - const QStringList& theHypoList, - const QStringList& theAlgoList ) - : myHypoSetName( theSetName ), - myHypoList( theHypoList ), - myAlgoList( theAlgoList ), +// HypothesesSet::HypothesesSet( const QString& theSetName ) +// : myHypoSetName( theSetName ), +// myIsAlgo( false ), +// myIsCustom( false ) +// { +// } + +HypothesesSet::HypothesesSet( const QString& theSetName, + bool useCommonSize, bool isQuadDominated, + const QStringList& mainHypos, const QStringList& mainAlgos, + const QStringList& altHypos, const QStringList& altAlgos, + const QStringList& intHypos, const QStringList& intAlgos ) + : myUseCommonSize( useCommonSize ), + myQuadDominated( isQuadDominated ), + myHypoSetName( theSetName ), + myHypoList({ mainHypos, altHypos, intHypos }), + myAlgoList({ mainAlgos, altAlgos, intAlgos }), myIsAlgo( false ), - myIsCustom( false ) + myIsCustom( false ), + myIndex( 0 ) { + for ( myHypType = MAIN; myHypType < NB_HYP_TYPES; SMESHUtils::Increment( myHypType )) + for ( int isAlgo = myIsAlgo = 0; isAlgo < 2; myIsAlgo = ++isAlgo ) + { + QStringList& hyps = *list(); + for ( int i = 0; i < hyps.count(); ++i ) + hyps[ i ] = hyps[ i ].trimmed(); + } } -QStringList* HypothesesSet::list(bool is_algo) const +QStringList* HypothesesSet::list( bool is_algo, SetType setType) const { - return const_cast( &( is_algo ? myAlgoList : myHypoList ) ); + return const_cast( &( is_algo ? myAlgoList[setType] : myHypoList[setType] )); } QStringList* HypothesesSet::list() const { - return list( myIsAlgo ); + return list( myIsAlgo, myHypType ); } QString HypothesesSet::name() const @@ -812,23 +837,24 @@ QString HypothesesSet::name() const return myHypoSetName; } -void HypothesesSet::set( bool isAlgo, const QStringList& lst ) -{ - *list(isAlgo) = lst; -} +// void HypothesesSet::set( bool isAlgo, const QStringList& lst ) +// { +// *list(isAlgo) = lst; +// } -int HypothesesSet::count( bool isAlgo ) const -{ - return list(isAlgo)->count(); -} +// int HypothesesSet::count( bool isAlgo, SetType setType ) const +// { +// return list(isAlgo,setType)->count(); +// } -bool HypothesesSet::isAlgo() const -{ - return myIsAlgo; -} +// bool HypothesesSet::isAlgo() const +// { +// return myIsAlgo; +// } -void HypothesesSet::init( bool isAlgo ) +void HypothesesSet::init( bool isAlgo, SetType setType ) { + myHypType = setType; myIsAlgo = isAlgo; myIndex = 0; } @@ -858,16 +884,43 @@ bool HypothesesSet::getIsCustom() const return myIsCustom; } +void HypothesesSet::setAlgoAvailable( SetType type, bool isAvailable ) +{ + if ( MAIN <= type && type < NB_HYP_TYPES ) + myIsAlgoAvailable[ type ] = isAvailable; +} + +bool HypothesesSet::getAlgoAvailable( SetType type ) +{ + bool isAva = false; + if ( MAIN <= type && type < NB_HYP_TYPES ) + isAva = myIsAlgoAvailable[ type ]; + return isAva; +} + +HypothesesSet::SetType HypothesesSet::getPreferredHypType() +{ + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); + int useAltHypos = !resMgr->booleanValue( "SMESH", "use-meshgems-hypo-sets", false ); + return ( HypothesesSet::SetType ) useAltHypos; +} + int HypothesesSet::maxDim() const { HypothesesSet * thisSet = (HypothesesSet*) this; int dim = -1; - for ( int isAlgo = 0; isAlgo < 2; ++isAlgo ) - { - for ( thisSet->init( isAlgo ); thisSet->more(); thisSet->next() ) - if ( HypothesisData* hypData = SMESH::GetHypothesisData( thisSet->current() )) - for ( int i = 0; i < hypData->Dim.count(); ++i ) - dim = qMax( dim, hypData->Dim[i] ); - } + for ( int setType = 0; setType < 2; ++setType ) + for ( int isAlgo = 0; isAlgo < 2; ++isAlgo ) + { + for ( thisSet->init( isAlgo, SetType( setType )); thisSet->more(); thisSet->next() ) + if ( HypothesisData* hypData = SMESH::GetHypothesisData( thisSet->current() )) + for ( int i = 0; i < hypData->Dim.count(); ++i ) + dim = qMax( dim, hypData->Dim[i] ); + } return dim; } + +const char* HypothesesSet::getCommonHypoSetHypoType() +{ + return "AverageLengthForHypoSet"; +} diff --git a/src/SMESHGUI/SMESHGUI_Hypotheses.h b/src/SMESHGUI/SMESHGUI_Hypotheses.h index e75b82262..1543af914 100644 --- a/src/SMESHGUI/SMESHGUI_Hypotheses.h +++ b/src/SMESHGUI/SMESHGUI_Hypotheses.h @@ -158,6 +158,7 @@ public: void setHIcon( const QPixmap& ); void setCustomFrame( QFrame* ); void setType( const QString& ); + void showEvent(QShowEvent *event); protected slots: virtual void accept(); @@ -215,32 +216,53 @@ struct HypothesisData class HypothesesSet { public: - HypothesesSet( const QString& ); - HypothesesSet( const QString&, const QStringList&, const QStringList& ); + + enum SetType { MAIN, ALT, INTERN, NB_HYP_TYPES }; //!< hypos/algos type: main, alternative, internal-edges + + //HypothesesSet( const QString& ); + HypothesesSet( const QString& name, + bool useCommonSize, bool isQuadDominated, + const QStringList& mainHypos, const QStringList& mainAlgos, + const QStringList& altHypos, const QStringList& altAlgos, + const QStringList& intHypos, const QStringList& intAlgos ); QString name() const; - void set( bool, const QStringList& ); - int count( bool ) const; + bool toUseCommonSize() const { return myUseCommonSize; } + bool isQuadDominated() const { return myQuadDominated; } + //int count( bool, SetType ) const; + + int maxDim() const; void setIsCustom( bool ); bool getIsCustom() const; - int maxDim() const; - bool isAlgo() const; + void setAlgoAvailable( SetType type, bool isAvailable ); + bool getAlgoAvailable( SetType type ); + + static SetType getPreferredHypType(); + static const char* getCommonHypoSetHypoType(); + + //bool isAlgo() const; // CASCADE-like iteration - void init( bool ); + void init( bool, SetType ); bool more() const; void next(); QString current() const; private: - QStringList* list(bool) const; + QStringList* list(bool,SetType) const; QStringList* list() const; private: + bool myUseCommonSize; // Average size is asked only and used to create default hypotheses + bool myQuadDominated; QString myHypoSetName; - QStringList myHypoList, myAlgoList; + QStringList myHypoList[3], myAlgoList[3]; // per SetType + bool myIsAlgoAvailable[3]; // current state depending on geometry etc + + // iteration + SetType myHypType; bool myIsAlgo, myIsCustom; int myIndex; }; diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index eaaad911c..d752566db 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -329,8 +329,7 @@ namespace SMESH hypoSet != myListOfHypothesesSets.end(); ++hypoSet ) { HypothesesSet* aSet = *hypoSet; - if ( aSet && ( aSet->count( true ) || aSet->count( false )) && - aSet->maxDim() <= maxDim) + if ( aSet && 0 <= aSet->maxDim() && aSet->maxDim() <= maxDim ) { aSetNameList.append( mangledHypoSetName( aSet )); } diff --git a/src/SMESHGUI/SMESHGUI_MeshDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshDlg.cxx index a1ee4ec9f..159343161 100644 --- a/src/SMESHGUI/SMESHGUI_MeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshDlg.cxx @@ -34,6 +34,7 @@ #include // Qt includes +#include #include #include #include @@ -572,9 +573,12 @@ SMESHGUI_MeshDlg::SMESHGUI_MeshDlg( const bool theToCreate, const bool theIsMesh // mesh type QLabel* anMeshTypeLbl = new QLabel( tr( "MESH_TYPE" ), this ); myMeshType = new QComboBox( this ); - + // groups + myCreateGroupsCheck = new QCheckBox( tr( "CREATE_ALL_GROUPS" ), this ); + myCreateGroupsCheck->setChecked( true ); + // Create tab widget - + myTabWg = new QTabWidget( mainFrame() ); myTabs[ Dim0D ] = new SMESHGUI_MeshTab( myTabWg ); myTabs[ Dim1D ] = new SMESHGUI_MeshTab( myTabWg ); @@ -608,9 +612,10 @@ SMESHGUI_MeshDlg::SMESHGUI_MeshDlg( const bool theToCreate, const bool theIsMesh aLay->addWidget( objectWg( Geom, Control ), 2, 2 ); aLay->addWidget( anMeshTypeLbl, 3, 0 ); aLay->addWidget( myMeshType, 3, 2 ); - aLay->addWidget( myTabWg, 5, 0, 1, 3 ); - aLay->addWidget( myHypoSetButton, 6, 0, 1, 3 ); - aLay->setRowMinimumHeight( 3, 20 ); + aLay->addWidget( myCreateGroupsCheck, 4, 0, 1, 3 ); + aLay->addWidget( myTabWg, 6, 0, 1, 3 ); + aLay->addWidget( myHypoSetButton, 7, 0, 1, 3 ); + aLay->setRowMinimumHeight( 4, 20 ); myMeshType->clear(); @@ -658,7 +663,7 @@ void SMESHGUI_MeshDlg::setTitile( const bool theToCreate, const bool theIsMesh ) { setWindowTitle( tr( theIsMesh ? "EDIT_MESH" : "EDIT_SUBMESH") ); } - + myCreateGroupsCheck-> setVisible( theToCreate && theIsMesh ); } //================================================================================ @@ -916,3 +921,14 @@ void SMESHGUI_MeshDlg::setCurrentMeshType( const int theIndex ) else myMeshType->setCurrentIndex( 0 ); } + +//================================================================================ +/*! + * \brief Return state of "Create all Groups on Geometry" check-box + */ +//================================================================================ + +bool SMESHGUI_MeshDlg::toCreateAllGroups() +{ + return myCreateGroupsCheck->isChecked(); +} diff --git a/src/SMESHGUI/SMESHGUI_MeshDlg.h b/src/SMESHGUI/SMESHGUI_MeshDlg.h index 3dd5b0697..1cfb8762f 100644 --- a/src/SMESHGUI/SMESHGUI_MeshDlg.h +++ b/src/SMESHGUI/SMESHGUI_MeshDlg.h @@ -37,14 +37,15 @@ #include #include -class SMESHGUI_MeshTab; class QAction; +class QCheckBox; class QComboBox; class QListWidget; class QMenu; class QTabWidget; class QToolButton; class QtxToolButton; +class SMESHGUI_MeshTab; /*! * \brief Dialog for mech creation or editing @@ -84,6 +85,8 @@ public: void setCurrentMeshType( const int ); int currentMeshType(); + bool toCreateAllGroups(); + signals: void hypoSet( const QString& ); void geomSelectionByMesh( bool ); @@ -101,6 +104,7 @@ private slots: QToolButton* myHypoSetButton; QMenu* myGeomPopup; QComboBox* myMeshType; + QCheckBox* myCreateGroupsCheck; }; /*! diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index 443a8a86f..e232e408f 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -27,6 +27,7 @@ #include "SMESHGUI.h" #include "SMESHGUI_GEOMGenUtils.h" +#include "SMESHGUI_GroupOnShapeDlg.h" #include "SMESHGUI_Hypotheses.h" #include "SMESHGUI_HypothesesUtils.h" #include "SMESHGUI_MeshDlg.h" @@ -34,26 +35,30 @@ #include "SMESHGUI_ShapeByMeshDlg.h" #include "SMESHGUI_Utils.h" #include "SMESH_NumberFilter.hxx" +#include "SMESH_TypeDefs.hxx" #include "SMESH_TypeFilter.hxx" +#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis) + // SALOME GEOM includes -#include #include -#include -#include #include +#include +#include +#include // SALOME GUI includes -#include -#include #include #include #include +#include +#include #include #include +#include #include -#include -#include +#include +#include // SALOME KERNEL includes #include @@ -62,16 +67,16 @@ #include // Qt includes -#include -#include #include +#include +#include // OCCT includes -#include -#include -#include -#include #include +#include +#include +#include +#include //================================================================================ /*! @@ -183,6 +188,8 @@ bool SMESHGUI_MeshOp::onApply() SUIT_MessageBox::warning( myDlg, tr( "SMESH_ERROR" ), aMess ); } + myHypoSet = 0; + return aResult; } @@ -257,6 +264,7 @@ void SMESHGUI_MeshOp::startOperation() selectionDone(); + myHypoSet = 0; myHasConcurrentSubBefore = false; myObjectToSelect.clear(); } @@ -1022,8 +1030,9 @@ void SMESHGUI_MeshOp::existingHyps( const int theDim, */ //================================================================================ SMESH::SMESH_Hypothesis_var -SMESHGUI_MeshOp::getInitParamsHypothesis( const QString& aHypType, - const QString& aServerLib ) const +SMESHGUI_MeshOp::getInitParamsHypothesis( const QString& aHypType, + const QString& aServerLib, + const SMESH::HypInitParams* aParams ) const { if ( aHypType.isEmpty() || aServerLib.isEmpty() ) return SMESH::SMESH_Hypothesis::_nil(); @@ -1083,18 +1092,42 @@ SMESHGUI_MeshOp::getInitParamsHypothesis( const QString& aHypType, } } + SMESH::HypInitParams initParams; + enum { BY_MESH, BY_GEOM, BY_AVERAGE_LENGTH }; // same as ::SMESH_Hypothesis::InitWay + if ( aParams ) + { + initParams = *aParams; + } + else + { + initParams.way = isSubMesh ? BY_MESH : BY_GEOM; + } + SMESH::SMESH_Hypothesis_var hyp = SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toUtf8().data(), aServerLib.toUtf8().data(), aMesh, aGeomVar, - /*byMesh = */isSubMesh); - if ( hyp->_is_nil() && isSubMesh ) + initParams ); + if ( hyp->_is_nil() && initParams.way == BY_MESH ) + { + initParams.way = BY_GEOM; + hyp = SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(), + aServerLib.toUtf8().data(), + aMesh, + aGeomVar, + initParams ); + } + if ( hyp->_is_nil() && initParams.way == BY_GEOM ) + { + initParams.way = BY_AVERAGE_LENGTH; + initParams.averageLength = 1.; hyp = SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(), aServerLib.toUtf8().data(), aMesh, aGeomVar, - /*byMesh = */false); + initParams ); + } return hyp; } @@ -1221,25 +1254,14 @@ namespace //================================================================================ /*! - * Create hypothesis and update dialog. - * \param theDim - dimension of hypothesis to be created - * \param theType - hypothesis category (algorithm, hypothesis, additional hypothesis) - * \param theTypeName - specifies hypothesis to be created + * \brief Return names of all existing hypotheses */ //================================================================================ -void SMESHGUI_MeshOp::createHypothesis(const int theDim, - const int theType, - const QString& theTypeName) -{ - HypothesisData* aData = SMESH::GetHypothesisData(theTypeName); - if (!aData) - return; - - myDim = theDim; - myType = theType; - // get a unique hyp name +QStringList SMESHGUI_MeshOp::getHypoNames() +{ QStringList aHypNames; + TDim2Type2HypList::const_iterator aDimIter = myExistingHyps.begin(); for ( ; aDimIter != myExistingHyps.end(); aDimIter++) { const TType2HypList& aType2HypList = aDimIter.value(); @@ -1254,7 +1276,30 @@ void SMESHGUI_MeshOp::createHypothesis(const int theDim, } } } - QString aHypName = GetUniqueName( aHypNames, aData->Label); + return aHypNames; +} + +//================================================================================ +/*! + * Create hypothesis and update dialog. + * \param theDim - dimension of hypothesis to be created + * \param theType - hypothesis category (algorithm, hypothesis, additional hypothesis) + * \param theTypeName - specifies hypothesis to be created + */ +//================================================================================ +void SMESHGUI_MeshOp::createHypothesis(const int theDim, + const int theType, + const QString& theTypeName) +{ + HypothesisData* aData = SMESH::GetHypothesisData(theTypeName); + if (!aData) + return; + + myDim = theDim; + myType = theType; + + // get a unique hyp name + QString aHypName = GetUniqueName( getHypoNames(), aData->Label); // existing hypos bool dialog = false; @@ -1655,6 +1700,179 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex, return; } +//================================================================================ +/*! + * \brief Create a sub-mesh on internal edges in the case where the global algorithm + * is of type 1D-2D[-3D] so that the internal edges would remain not meshed. + */ +//================================================================================ + +void SMESHGUI_MeshOp::createSubMeshOnInternalEdges( SMESH::SMESH_Mesh_ptr theMesh, + GEOM::GEOM_Object_ptr theMainShape ) +{ + if ( theMesh->_is_nil() || theMainShape->_is_nil() ) + return; + + if ( isAccessibleDim( 1 )) + return; // global 1D algorithm is/can be assigned + + const HypothesesSet::SetType internSet = HypothesesSet::INTERN; + bool toCreate = true; + bool toCreateMandatory = ( myHypoSet && + myAverageSize > 0 && + ( myHypoSet->init( /*algo=*/ true, internSet ), myHypoSet->more()) && + ( myHypoSet->init( /*algo=*/false, internSet ), myHypoSet->more())); + if ( !toCreateMandatory ) // ask the user + toCreate = false; // can't pass both mesh and geometry to Create Submesh operation (so far?) + // toCreate = SUIT_MessageBox::warning( SMESHGUI::desktop(), + // QObject::tr("SMESH_WRN_WARNING"), + // QObject::tr("SMESH_CREATE_SUBMESH_ON_INTERNAL_EDGES"), + // QObject::tr("SMESH_BUT_YES"), + // QObject::tr("SMESH_BUT_NO"), 1, 0); + if ( !toCreate ) + return; + + TopoDS_Shape shape; + if ( !GEOMBase::GetShape( theMainShape, shape )) + return; + + std::vector< TopoDS_Shape > internalEdges; + for ( TopExp_Explorer edge( shape, TopAbs_EDGE, TopAbs_WIRE ); edge.More(); edge.Next() ) + internalEdges.push_back( edge.Current() ); + + if ( internalEdges.empty() ) + return; + + TopTools_IndexedMapOfShape shapeIDs; + TopExp::MapShapes( shape, shapeIDs ); + + std::set< int > intIDSet; + for ( size_t i = 0; i < internalEdges.size(); ++i ) + intIDSet.insert( shapeIDs.FindIndex( internalEdges[ i ])); + + GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen(); + if (geomGen->_is_nil()) return; + + GEOM::GEOM_Object_var edgeGroup; + GEOM::GEOM_IShapesOperations_wrap sOp = geomGen->GetIShapesOperations(); + GEOM::GEOM_IGroupOperations_wrap gOp = geomGen->GetIGroupOperations(); + GEOM::ListOfGO_var geomGroups = sOp->GetExistingSubObjects( theMainShape, + /*groupsOnly=*/true ); + for ( CORBA::ULong i = 0; i < geomGroups->length(); ++i ) + { + GEOM::ListOfLong_var ids = gOp->GetObjects( geomGroups[ i ]); + std::set< int > idSet( & ids[0], & ids[0] + ids->length() ); + if ( idSet == intIDSet ) + { + edgeGroup = geomGroups[ i ]; + break; + } + } + + if ( edgeGroup->_is_nil() ) + { + GEOM::GEOM_Object_var edgeGroup = gOp->CreateGroup( theMainShape, TopAbs_EDGE ); + + GEOM::ListOfLong_var edgeIDs = new GEOM::ListOfLong; + edgeIDs->length( internalEdges.size() ); + std::set< int >::iterator id = intIDSet.begin(); + for ( size_t i = 0; i < intIDSet.size(); ++i, ++id ) + edgeIDs[ i ] = *id; + gOp->UnionIDs( edgeGroup, edgeIDs ); + + SALOMEDS::SObject_wrap so = geomGen->AddInStudy( edgeGroup, "Internal edges", theMainShape ); + } + + if ( !toCreateMandatory ) + { + // show Create Sub-mesh dislog + // _PTR(SObject) aMeshSO = SMESH::FindSObject( theMesh ); + // selectionMgr()->clearFilters(); + // selectObject( pSubmesh ); + // SMESHGUI::GetSMESHGUI()->switchToOperation( SMESHOp::OpEditMeshOrSubMesh ); + return; + } + + // create a sub-mesh using myAverageSize w/o GUI + + SMESH::SMESH_subMesh_var subMesh = theMesh->GetSubMesh( edgeGroup, "" ); + + for ( int isAlgo = 1; isAlgo >= 0; --isAlgo ) + for ( myHypoSet->init( isAlgo, internSet ); myHypoSet->more(); myHypoSet->next() ) + { + QString aHypoTypeName = myHypoSet->current(); + HypothesisData* aHypData = SMESH::GetHypothesisData( aHypoTypeName ); + if ( !aHypData ) + continue; + + myDim = aHypData->Dim[0]; + if ( myDim != 1 ) + continue; + + // create or/and set + SMESH::SMESH_Hypothesis_var newHypo; + if ( isAlgo ) + { + myAvailableHypData[ myDim ][ Algo ].clear(); + myAvailableHypData[ myDim ][ Algo ] << aHypData; + QStringList hypList; hypList << aHypoTypeName; + myDlg->tab( myDim )->setAvailableHyps( Algo, hypList ); + setCurrentHyp( myDim, Algo, 0 ); + newHypo = getAlgo( myDim ); + } + else + { + SMESH::HypInitParams params = { 2, myAverageSize, false }; + newHypo = getInitParamsHypothesis( aHypData->TypeName, aHypData->ServerLibName, & params ); + QString hypName = GetUniqueName( getHypoNames(), aHypData->Label ); + SALOMEDS::SObject_wrap so = + SMESHGUI::GetSMESHGen()->PublishInStudy( SALOMEDS::SObject::_nil(), newHypo, + hypName.toUtf8().data() ); + } + SMESH::AddHypothesisOnSubMesh( subMesh, newHypo ); + } + + return; +} + +//================================================================================ +/*! + * \brief Ask the user to enter an average size which will be used to create + * hypotheses of a hypo-set basing on this size + * \param [out] averageSize - average element size + * \return bool - false if the user canceled the dialog + */ +//================================================================================ + +bool SMESHGUI_MeshOp::getAverageSize( double & averageSize ) +{ + HypothesisData* hypData = SMESH::GetHypothesisData( "MaxLength" ); + if ( !hypData ) + return false; + + SMESH::SMESH_Hypothesis_var hyp = getInitParamsHypothesis( hypData->TypeName, + hypData->ServerLibName ); + if ( hyp->_is_nil() ) + return false; + + SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator( hypData->TypeName ); + if ( !aCreator ) + return false; + + initHypCreator( aCreator ); + myDlg->setEnabled( false ); + + aCreator->edit( hyp.in(), HypothesesSet::getCommonHypoSetHypoType(), + dlg(), this, SLOT( onHypoEdited( int ))); + + StdMeshers::StdMeshers_MaxLength_var lenHyp = StdMeshers::StdMeshers_MaxLength::_narrow( hyp ); + if ( lenHyp->_is_nil() ) + return false; + + averageSize = lenHyp->GetLength(); + return true; +} + //================================================================================ /*! * \brief Creates and selects hypothesis of hypotheses set @@ -1664,6 +1882,7 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex, void SMESHGUI_MeshOp::onHypoSet( const QString& theSetName ) { HypothesesSet* aHypoSet = SMESH::GetHypothesesSet(theSetName); + myHypoSet = aHypoSet; if (!aHypoSet) return; @@ -1676,38 +1895,68 @@ void SMESHGUI_MeshOp::onHypoSet( const QString& theSetName ) onAlgoSelected( -1, dim ); } + HypothesesSet::SetType setType = aHypoSet->getPreferredHypType(); + if ( !aHypoSet->getAlgoAvailable( setType )) + { + setType = setType == HypothesesSet::ALT ? HypothesesSet::MAIN : HypothesesSet::ALT; + if ( !aHypoSet->getAlgoAvailable( setType )) + return; + } + + myAverageSize = -1; + if ( aHypoSet->toUseCommonSize() && !getAverageSize( myAverageSize )) + return; + for ( int isAlgo = 1; isAlgo >= 0; --isAlgo ) - for ( aHypoSet->init( isAlgo ); aHypoSet->more(); aHypoSet->next() ) + for ( aHypoSet->init( isAlgo, setType ); aHypoSet->more(); aHypoSet->next() ) { QString aHypoTypeName = aHypoSet->current(); HypothesisData* aHypData = SMESH::GetHypothesisData( aHypoTypeName ); if (!aHypData) continue; - int aDim = aHypData->Dim[0]; + myDim = aHypData->Dim[0]; // create or/and set if ( isAlgo ) { - int index = myAvailableHypData[aDim][Algo].indexOf( aHypData ); + int index = myAvailableHypData[myDim][Algo].indexOf( aHypData ); if ( index >= 0 ) { - setCurrentHyp( aDim, Algo, index ); - onAlgoSelected( index, aDim ); + setCurrentHyp( myDim, Algo, index ); + onAlgoSelected( index, myDim ); } } else { - bool mainHyp = true; - int index = myAvailableHypData[aDim][MainHyp].indexOf( aHypData ); + myType = MainHyp; + int index = myAvailableHypData[myDim][MainHyp].indexOf( aHypData ); if ( index < 0 ) { - mainHyp = false; - index = myAvailableHypData[aDim][AddHyp].indexOf( aHypData ); + myType = AddHyp; + index = myAvailableHypData[myDim][AddHyp].indexOf( aHypData ); } if ( index >= 0 ) - createHypothesis( aDim, mainHyp ? MainHyp : AddHyp, aHypoTypeName ); + { + if ( myAverageSize > 0 ) + { + SMESH::HypInitParams params = { 2, myAverageSize, aHypoSet->isQuadDominated() }; + SMESH::SMESH_Hypothesis_var hyp = + getInitParamsHypothesis( aHypData->TypeName, aHypData->ServerLibName, & params ); + + QString hypName = GetUniqueName( getHypoNames(), aHypData->Label ); + SALOMEDS::SObject_wrap so = + SMESHGUI::GetSMESHGen()->PublishInStudy( SALOMEDS::SObject::_nil(), hyp, + hypName.toUtf8().data() ); + onHypoCreated(2); + } + else + { + createHypothesis( myDim, myType, aHypoTypeName ); + } + } } } + return; } @@ -1755,7 +2004,7 @@ bool SMESHGUI_MeshOp::createMesh( QString& theMess, QStringList& theEntryList ) namePrefix += "_"; } QStringList::Iterator it = aList.begin(); - for ( int i = 0; it!=aList.end(); it++, ++i ) + for ( int i = 0; it != aList.end(); it++, ++i ) { QString aGeomEntry = *it; _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toUtf8().data() ); @@ -1801,7 +2050,34 @@ bool SMESHGUI_MeshOp::createMesh( QString& theMess, QStringList& theEntryList ) if ( !anAlgoVar->_is_nil() ) SMESH::AddHypothesisOnMesh( aMesh, anAlgoVar ); } + + + if ( myDlg->toCreateAllGroups() && !aGeomVar->_is_nil() ) + { + // Create groups on all geom groups + + GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen(); + GEOM::GEOM_IShapesOperations_wrap op = geomGen->GetIShapesOperations(); + GEOM::ListOfGO_var geomGroups = op->GetExistingSubObjects( aGeomVar, + /*groupsOnly=*/true ); + SMESH::SMESH_GroupOnGeom_var meshGroup; + for ( CORBA::ULong iG = 0; iG < geomGroups->length(); ++iG ) + { + SMESH::ElementType elemType = SMESHGUI_GroupOnShapeOp::ElementType( geomGroups[ iG ] ); + if ( elemType == SMESH::ALL ) + continue; + + CORBA::String_var name = geomGroups[ iG ]->GetName(); + meshGroup = aMesh->CreateGroupFromGEOM( elemType, name, geomGroups[ iG ]); + if ( elemType != SMESH::NODE ) + meshGroup = aMesh->CreateGroupFromGEOM( SMESH::NODE, name, geomGroups[ iG ]); + } + } + + createSubMeshOnInternalEdges( aMesh, aGeomVar ); + } + return true; } @@ -2435,6 +2711,12 @@ bool SMESHGUI_MeshOp::editMeshOrSubMesh( QString& theMess ) } } + if ( aSubMeshVar->_is_nil() ) + { + GEOM::GEOM_Object_var mainGeom = aMesh->GetShapeToMesh(); + createSubMeshOnInternalEdges( aMesh, mainGeom ); + } + myHasConcurrentSubBefore = checkSubMeshConcurrency( aMesh, aSubMeshVar, /*askUser=*/!myHasConcurrentSubBefore ); @@ -2635,23 +2917,29 @@ void SMESHGUI_MeshOp::updateHypoSets() for ( ; inHypoSetName != aHypothesesSetsList.end(); ++inHypoSetName ) { HypothesesSet* currentHypoSet = SMESH::GetHypothesesSet( *inHypoSetName ); - bool isAvailable = false; - for ( currentHypoSet->init( true ); currentHypoSet->more(); currentHypoSet->next() ) + HypothesesSet::SetType sType; + for ( sType = HypothesesSet::MAIN; sType <= HypothesesSet::ALT; SMESHUtils::Increment( sType )) { - isAvailable = false; - if ( HypothesisData* algoDataIn = SMESH::GetHypothesisData( currentHypoSet->current() )) { - for (int i = SMESH::DIM_0D; i <= myMaxShapeDim; i++) { - int aCurrentAvailableAlgo = myAvailableHypData[i][Algo].indexOf( algoDataIn ); - if ( aCurrentAvailableAlgo > -1 ) { - isAvailable = true; - break; + bool isAvailable = false; + for ( currentHypoSet->init( true, sType ); currentHypoSet->more(); currentHypoSet->next() ) + { + isAvailable = false; + if ( HypothesisData* algoDataIn = SMESH::GetHypothesisData( currentHypoSet->current() )) { + for ( int dim = SMESH::DIM_0D; dim <= myMaxShapeDim; dim++) { + int aCurrentAvailableAlgo = myAvailableHypData[dim][Algo].indexOf( algoDataIn ); + if ( aCurrentAvailableAlgo > -1 ) { + isAvailable = true; + break; + } } + if ( !isAvailable ) + break; } - if ( !isAvailable ) - break; } + currentHypoSet->setAlgoAvailable( sType, isAvailable ); } - if ( isAvailable ) + if ( currentHypoSet->getAlgoAvailable( HypothesesSet::MAIN ) || + currentHypoSet->getAlgoAvailable( HypothesesSet::ALT )) aFilteredHypothesesSetsList.append( *inHypoSetName ); } myDlg->setHypoSets( aFilteredHypothesesSetsList ); diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.h b/src/SMESHGUI/SMESHGUI_MeshOp.h index d93e4a12e..1a117d53f 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.h +++ b/src/SMESHGUI/SMESHGUI_MeshOp.h @@ -121,6 +121,8 @@ private: bool createMesh( QString&, QStringList& ); bool createSubMesh( QString&, QStringList& ); bool editMeshOrSubMesh( QString& ); + void createSubMeshOnInternalEdges( SMESH::SMESH_Mesh_ptr mesh, + GEOM::GEOM_Object_ptr mainShape ); bool checkSubMeshConcurrency( SMESH::SMESH_Mesh_ptr mesh, SMESH::SMESH_subMesh_ptr submesh, bool askUser=false); @@ -137,8 +139,10 @@ private: int find( const SMESH::SMESH_Hypothesis_var&, const THypList& ) const; SMESH::SMESH_Hypothesis_var getInitParamsHypothesis( const QString&, - const QString& ) const; + const QString&, + const SMESH::HypInitParams* prm=0) const; void initHypCreator( SMESHGUI_GenericHypothesisCreator* aCreator ); + bool getAverageSize( double & averageSize ); bool isSubshapeOk() const; char* isSubmeshIgnored() const; _PTR(SObject) getSubmeshByGeom() const; @@ -146,6 +150,7 @@ private: void updateMeshTypeList(); void updateHypoSets(); void setFilteredAlgoData(); + QStringList getHypoNames(); private: @@ -172,6 +177,9 @@ private: bool myIgnoreAlgoSelection; int myDim, myType, myMaxShapeDim; + HypothesesSet* myHypoSet; // applied hypo-set + double myAverageSize; // entered at hypo-set processing + QString myObjectToSelect; }; diff --git a/src/SMESHGUI/SMESHGUI_XmlHandler.cxx b/src/SMESHGUI/SMESHGUI_XmlHandler.cxx index 823032fca..3993633be 100644 --- a/src/SMESHGUI/SMESHGUI_XmlHandler.cxx +++ b/src/SMESHGUI/SMESHGUI_XmlHandler.cxx @@ -201,14 +201,26 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&, { if (atts.value("name") != "") { - QString hypos = atts.value("hypos").remove( ' ' ); - QString algos = atts.value("algos").remove( ' ' ); + bool useCommonSize = ( atts.value("use-common-size") == "true" ); + bool isQuadDominated = ( atts.value("quad-dominated") == "true" ); + QString hypos = atts.value("hypos"); + QString algos = atts.value("algos"); + QString altHypos = atts.value("alt-hypos"); + QString altAlgos = atts.value("alt-algos"); + QString intHypos = atts.value("intern-edge-hypos"); + QString intAlgos = atts.value("intern-edge-algos"); bool badSet = hypos.contains( BAD_HYP_FLAG ) || algos.contains( BAD_HYP_FLAG ); if ( !badSet ) - myListOfHypothesesSets.append( new HypothesesSet ( atts.value("name"), - hypos.split( ',', QString::SkipEmptyParts ), - algos.split( ',', QString::SkipEmptyParts ) ) ); + myListOfHypothesesSets.append + ( new HypothesesSet ( atts.value("name"), + useCommonSize, isQuadDominated, + hypos.split ( ',', QString::SkipEmptyParts ), + algos.split ( ',', QString::SkipEmptyParts ), + altHypos.split( ',', QString::SkipEmptyParts ), + altAlgos.split( ',', QString::SkipEmptyParts ), + intHypos.split( ',', QString::SkipEmptyParts ), + intAlgos.split( ',', QString::SkipEmptyParts ))); } } else if ( qName == "python-wrap" || diff --git a/src/SMESHGUI/SMESH_msg_en.ts b/src/SMESHGUI/SMESH_msg_en.ts index 725431f1c..a998e9d1d 100644 --- a/src/SMESHGUI/SMESH_msg_en.ts +++ b/src/SMESHGUI/SMESH_msg_en.ts @@ -4659,6 +4659,10 @@ Please, create VTK viewer and try again PREF_NB_SEGMENTS Default Number of Segments + + PREF_USE_MESHGEMS_HYPOSET + Use MeshGems meshers when assigning set of hypotheses + SMESH_PREF_MESH_LOADING Mesh loading @@ -6516,6 +6520,10 @@ Please specify them and try again NAME Name + + CREATE_ALL_GROUPS + Create all Groups on Geometry + SMESHGUI_MeshOp @@ -8480,4 +8488,11 @@ red in the Object Browser. Option value + + SMESHGUI_GenericHypothesisCreator + + AverageLengthForHypoSet + Mean Size + + diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index aa3564d27..2b0e5d30c 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -764,14 +764,16 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::CreateHypothesis( const char* theHypNam //================================================================================ SMESH::SMESH_Hypothesis_ptr -SMESH_Gen_i::GetHypothesisParameterValues (const char* theHypType, - const char* theLibName, - SMESH::SMESH_Mesh_ptr theMesh, - GEOM::GEOM_Object_ptr theGeom, - CORBA::Boolean byMesh) +SMESH_Gen_i::GetHypothesisParameterValues (const char* theHypType, + const char* theLibName, + SMESH::SMESH_Mesh_ptr theMesh, + GEOM::GEOM_Object_ptr theGeom, + const SMESH::HypInitParams& theParams) throw ( SALOME::SALOME_Exception ) { Unexpect aCatch(SALOME_SalomeException); + + const bool byMesh = ( theParams.way == ::SMESH_Hypothesis::BY_MESH ); if ( byMesh && CORBA::is_nil( theMesh ) ) return SMESH::SMESH_Hypothesis::_nil(); if ( byMesh && CORBA::is_nil( theGeom ) ) @@ -826,17 +828,23 @@ SMESH_Gen_i::GetHypothesisParameterValues (const char* theHypType, if ( hyp->SetParametersByMesh( mesh, shape )) return SMESH::SMESH_Hypothesis::_duplicate( tmpHyp ); } - else { - double diagonal = 0; - if ( mesh ) - diagonal = mesh->GetShapeDiagonalSize(); - else - diagonal = ::SMESH_Mesh::GetShapeDiagonalSize( shape ); + else + { ::SMESH_Hypothesis::TDefaults dflts; - dflts._elemLength = diagonal / myGen.GetBoundaryBoxSegmentation(); - dflts._nbSegments = myGen.GetDefaultNbSegments(); - dflts._shape = &shape; - // let the temporary hypothesis initialize it's values + dflts._way = ( ::SMESH_Hypothesis::InitWay) theParams.way; + dflts._nbSegments = myGen.GetDefaultNbSegments(); + dflts._elemLength = theParams.averageLength; + dflts._quadDominated = theParams.quadDominated; + if ( theParams.way == ::SMESH_Hypothesis::BY_GEOM ) + { + if ( mesh ) + dflts._diagonal = mesh->GetShapeDiagonalSize(); + else + dflts._diagonal = ::SMESH_Mesh::GetShapeDiagonalSize( shape ); + dflts._elemLength = dflts._diagonal / myGen.GetBoundaryBoxSegmentation(); + dflts._shape = &shape; + } + // let the hypothesis initialize it's values if ( hyp->SetParametersByDefaults( dflts, mesh )) return SMESH::SMESH_Hypothesis::_duplicate( tmpHyp ); } diff --git a/src/SMESH_I/SMESH_Gen_i.hxx b/src/SMESH_I/SMESH_Gen_i.hxx index 3338b41dc..ec800b965 100644 --- a/src/SMESH_I/SMESH_Gen_i.hxx +++ b/src/SMESH_I/SMESH_Gen_i.hxx @@ -164,11 +164,11 @@ public: throw ( SALOME::SALOME_Exception ); // Return hypothesis of given type holding parameter values of the existing mesh - SMESH::SMESH_Hypothesis_ptr GetHypothesisParameterValues (const char* theHypType, - const char* theLibName, - SMESH::SMESH_Mesh_ptr theMesh, - GEOM::GEOM_Object_ptr theGeom, - CORBA::Boolean byMesh) + SMESH::SMESH_Hypothesis_ptr GetHypothesisParameterValues (const char* theHypType, + const char* theLibName, + SMESH::SMESH_Mesh_ptr theMesh, + GEOM::GEOM_Object_ptr theGeom, + const SMESH::HypInitParams& theWay) throw ( SALOME::SALOME_Exception ); /* diff --git a/src/SMESH_I/SMESH_Gen_i_1.cxx b/src/SMESH_I/SMESH_Gen_i_1.cxx index af7abc3d5..8cf5586ce 100644 --- a/src/SMESH_I/SMESH_Gen_i_1.cxx +++ b/src/SMESH_I/SMESH_Gen_i_1.cxx @@ -839,21 +839,25 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SMESH::SMESH_Mesh_ptr theMesh, SetName( aRootSO, aRootNames[aType] ); // Add new group to corresponding sub-tree - int isEmpty = false; + int isEmpty = ( theMesh->NbNodes() == 0 ); std::string pm[2] = { "ICON_SMESH_TREE_GROUP", "ICON_SMESH_TREE_MESH_WARN" }; - if ( SMESH::DownCast< SMESH_GroupOnFilter_i* > ( theGroup )) - { - pm[0] = "ICON_SMESH_TREE_GROUP_ON_FILTER"; - } - else if ( SMESH::DownCast< SMESH_Group_i* > ( theGroup )) + if ( !isEmpty ) { - if ( theGroup->GetType() == SMESH::NODE ) - isEmpty = ( theMesh->NbNodes() == 0 ); - else + if ( SMESH::DownCast< SMESH_GroupOnFilter_i* > ( theGroup )) // on filter { - SMESH::array_of_ElementType_var allElemTypes = theMesh->GetTypes(); - for ( size_t i =0; i < allElemTypes->length() && isEmpty; ++i ) - isEmpty = ( allElemTypes[i] != theGroup->GetType() ); + pm[0] = "ICON_SMESH_TREE_GROUP_ON_FILTER"; + + if ( theGroup->GetType() != SMESH::NODE ) + { + isEmpty = true; + SMESH::array_of_ElementType_var allElemTypes = theMesh->GetTypes(); + for ( size_t i =0; i < allElemTypes->length() && isEmpty; ++i ) + isEmpty = ( allElemTypes[i] != theGroup->GetType() ); + } + } + else // standalone or on geometry + { + isEmpty = ( theGroup->Size() == 0 ); } } aGroupSO = publish ( theGroup, aRootSO, 0, pm[isEmpty].c_str() ); @@ -873,14 +877,14 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SMESH::SMESH_Mesh_ptr theMesh, //======================================================================= //function : PublishHypothesis -//purpose : +//purpose : //======================================================================= SALOMEDS::SObject_ptr - SMESH_Gen_i::PublishHypothesis (SMESH::SMESH_Hypothesis_ptr theHyp, - const char* theName) +SMESH_Gen_i::PublishHypothesis (SMESH::SMESH_Hypothesis_ptr theHyp, + const char* theName) { - if(MYDEBUG) MESSAGE("PublishHypothesis") + if(MYDEBUG) MESSAGE("PublishHypothesis"); if ( !myIsEnablePublish ) return SALOMEDS::SObject::_nil(); if (theHyp->_is_nil()) diff --git a/src/SMESH_SWIG/StdMeshersBuilder.py b/src/SMESH_SWIG/StdMeshersBuilder.py index 858820238..0c4241384 100644 --- a/src/SMESH_SWIG/StdMeshersBuilder.py +++ b/src/SMESH_SWIG/StdMeshersBuilder.py @@ -174,10 +174,11 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm): hyp.SetLength(length) if not UseExisting: # set preestimated length + import SMESH gen = self.mesh.smeshpyD initHyp = gen.GetHypothesisParameterValues("MaxLength", "libStdMeshersEngine.so", self.mesh.GetMesh(), self.mesh.GetShape(), - False) # <- byMesh + SMESH.HypInitParams( 1, 1.0, False )) preHyp = initHyp._narrow(StdMeshers.StdMeshers_MaxLength) if preHyp: hyp.SetPreestimatedLength( preHyp.GetPreestimatedLength() ) diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py index df65f685f..e843ff168 100644 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -1250,6 +1250,27 @@ class smeshBuilder( SMESH._objref_SMESH_Gen, object ): return hyp + def GetHypothesisParameterValues( self, hypType, libName, mesh, shape, initParams ): + """ + Create hypothesis initialized according to parameters + + Parameters: + hypType (string): hypothesis type + libName (string): plug-in library name + mesh: optional mesh by which a hypotheses can initialize self + shape: optional geometry by size of which a hypotheses can initialize self + initParams: structure SMESH.HypInitParams defining how to initialize a hypothesis + + Returns: + created hypothesis instance + """ + if isinstance( mesh, Mesh ): + mesh = mesh.GetMesh() + if isinstance( initParams, (bool,int)): + initParams = SMESH.HypInitParams( not initParams, 1.0, not mesh ) + return SMESH._objref_SMESH_Gen.GetHypothesisParameterValues(self, hypType, libName, + mesh, shape, initParams ) + def GetMeshInfo(self, obj): """ Get the mesh statistic. diff --git a/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx b/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx index dc1f6b19e..d477b2fc6 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx @@ -841,7 +841,7 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const item.myName = tr("SMESH_USE_PREESTIMATED_LENGTH"); p.append( item ); QCheckBox* aQCheckBox = new QCheckBox(dlg()); - if ( !noPreestimatedAtEdition && h->HavePreestimatedLength() ) { + if ( h->HavePreestimatedLength() ) { aQCheckBox->setChecked( h->GetUsePreestimatedLength() ); connect( aQCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( onValueChanged() ) ); } diff --git a/src/StdMeshersGUI/StdMeshers_images.ts b/src/StdMeshersGUI/StdMeshers_images.ts index 36489516b..681bf7bed 100644 --- a/src/StdMeshersGUI/StdMeshers_images.ts +++ b/src/StdMeshersGUI/StdMeshers_images.ts @@ -183,6 +183,14 @@ ICON_SMESH_TREE_HYPO_Geometric1D mesh_tree_hypo_length.png + + ICON_SMESH_TREE_HYPO_ImportSource1D + mesh_tree_hypo_import_source_1d.png + + + ICON_SMESH_TREE_HYPO_ImportSource2D + mesh_tree_hypo_import_source_2d.png + ICON_SMESH_TREE_HYPO_AutomaticLength mesh_tree_hypo_length.png @@ -191,6 +199,10 @@ ICON_SMESH_TREE_HYPO_Deflection1D mesh_tree_hypo_length.png + + ICON_SMESH_TREE_HYPO_FixedPoints1D + mesh_tree_hypo_length.png + ICON_SMESH_TREE_HYPO_Adaptive1D mesh_tree_hypo_length.png @@ -199,6 +211,10 @@ ICON_SMESH_TREE_HYPO_LayerDistribution mesh_tree_hypo_layers_distribution.png + + ICON_SMESH_TREE_HYPO_LayerDistribution2D + mesh_tree_hypo_layers_distribution_2d.png + ICON_SMESH_TREE_HYPO_LengthFromEdges mesh_tree_hypo_area.png @@ -229,7 +245,7 @@ ICON_SMESH_TREE_HYPO_NumberOfLayers2D - mesh_tree_hypo_layers_distribution.png + mesh_tree_hypo_layers_distribution_2d.png ICON_SMESH_TREE_HYPO_NumberOfSegments