From 43f41f0c11ce8e843ca6b0abac6f6f36c11d72b3 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 3 Mar 2016 15:42:23 +0300 Subject: [PATCH] 23250: [CEA 1766] 3D tab is empty when editing mesh + minor changes in docs + fix other problems with Mesh Dialog: 1) at mesh edition, old hypothesis remain assigned after playing with Mesh Type and Hypo Sets (change is in isSelectedHyp()) 2) When a 3D algo is unset due to change of Mesh Type, its hypotheses remain assigned and a new hyp can be created --- doc/salome/examples/filters_ex01.py | 1 + doc/salome/examples/filters_ex09.py | 10 +- doc/salome/examples/filters_ex10.py | 10 +- doc/salome/examples/filters_ex13.py | 2 +- doc/salome/examples/filters_ex17.py | 10 +- doc/salome/examples/filters_ex18.py | 27 +++++- .../SMESH/images/bare_border_volumes_smpl.png | Bin 7555 -> 8103 bytes doc/salome/gui/SMESH/input/about_filters.doc | 10 +- doc/salome/gui/SMESH/input/about_meshes.doc | 3 +- .../SMESH/input/selection_filter_library.doc | 8 +- doc/salome/gui/SMESH/input/tui_filters.doc | 91 +++++++++--------- src/SMESHGUI/SMESHGUI_MeshDlg.cxx | 21 ++-- src/SMESHGUI/SMESHGUI_MeshOp.cxx | 32 ++++-- src/SMESHGUI/SMESHGUI_MeshOp.h | 2 +- src/SMESH_PY/smeshstudytools.py | 4 +- src/SMESH_SWIG/smeshBuilder.py | 2 +- 16 files changed, 138 insertions(+), 95 deletions(-) diff --git a/doc/salome/examples/filters_ex01.py b/doc/salome/examples/filters_ex01.py index 88305c97f..8af735e71 100644 --- a/doc/salome/examples/filters_ex01.py +++ b/doc/salome/examples/filters_ex01.py @@ -1,4 +1,5 @@ # Aspect ratio +# This script demonstrates various usages of filters # create mesh from SMESH_mechanic import * diff --git a/doc/salome/examples/filters_ex09.py b/doc/salome/examples/filters_ex09.py index 9efa00871..dd6415930 100644 --- a/doc/salome/examples/filters_ex09.py +++ b/doc/salome/examples/filters_ex09.py @@ -1,23 +1,21 @@ # Free borders -# create mesh - -import salome +# initialize SALOME and modules +import salome, SMESH salome.salome_init() -import GEOM from salome.geom import geomBuilder geompy = geomBuilder.New(salome.myStudy) - -import SMESH, SALOMEDS from salome.smesh import smeshBuilder smesh = smeshBuilder.New(salome.myStudy) +# create mesh face = geompy.MakeFaceHW(100, 100, 1) geompy.addToStudy( face, "quadrangle" ) mesh = smesh.Mesh(face) mesh.Segment().NumberOfSegments(10) mesh.Triangle().MaxElementArea(25) mesh.Compute() + # get all free borders filter = smesh.GetFilter(SMESH.EDGE, SMESH.FT_FreeBorders) ids = mesh.GetIdsFromFilter(filter) diff --git a/doc/salome/examples/filters_ex10.py b/doc/salome/examples/filters_ex10.py index 423b91029..bf6f7419b 100644 --- a/doc/salome/examples/filters_ex10.py +++ b/doc/salome/examples/filters_ex10.py @@ -1,23 +1,21 @@ # Free edges -# create mesh - -import salome +# initialize SALOME and modules +import salome, SMESH salome.salome_init() -import GEOM from salome.geom import geomBuilder geompy = geomBuilder.New(salome.myStudy) - -import SMESH, SALOMEDS from salome.smesh import smeshBuilder smesh = smeshBuilder.New(salome.myStudy) +# create mesh face = geompy.MakeFaceHW(100, 100, 1) geompy.addToStudy( face, "quadrangle" ) mesh = smesh.Mesh(face) mesh.Segment().NumberOfSegments(10) mesh.Triangle().MaxElementArea(25) mesh.Compute() + # get all faces with free edges filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_FreeEdges) ids = mesh.GetIdsFromFilter(filter) diff --git a/doc/salome/examples/filters_ex13.py b/doc/salome/examples/filters_ex13.py index f56d39f84..8d8077083 100644 --- a/doc/salome/examples/filters_ex13.py +++ b/doc/salome/examples/filters_ex13.py @@ -4,7 +4,7 @@ from SMESH_mechanic import * # remove some faces to have faces with bare borders mesh.RemoveElements( mesh.GetElementsByType(SMESH.FACE)[0:5] ) -# get all faces bare borders +# get all faces with bare borders filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_BareBorderFace) ids = mesh.GetIdsFromFilter(filter) print "Faces with bare borders:", ids diff --git a/doc/salome/examples/filters_ex17.py b/doc/salome/examples/filters_ex17.py index c3f80d65a..9dc01b49c 100644 --- a/doc/salome/examples/filters_ex17.py +++ b/doc/salome/examples/filters_ex17.py @@ -1,16 +1,12 @@ # Double nodes - import salome salome.salome_init() -import GEOM from salome.geom import geomBuilder geompy = geomBuilder.New(salome.myStudy) - -import SMESH, SALOMEDS +import SMESH from salome.smesh import smeshBuilder smesh = smeshBuilder.New(salome.myStudy) -import salome_notebook # make a mesh on a box box = geompy.MakeBoxDXDYDZ(100,100,100) @@ -20,8 +16,8 @@ mesh.Quadrangle() mesh.Hexahedron() mesh.Compute() # copy all elements with translation -mesh.TranslateObject( mesh, smesh.MakeDirStruct( 10,0,0), Copy=True ) -# create filters to find nodes equal within tolerance of 1e-5 +mesh.TranslateObject( mesh, [10,0,0], Copy=True ) +# create a filter to find nodes equal within tolerance of 1e-5 filter = smesh.GetFilter(SMESH.NODE, SMESH.FT_EqualNodes, Tolerance=1e-5) # get equal nodes print "Number of equal nodes:", len( mesh.GetIdsFromFilter( filter )) diff --git a/doc/salome/examples/filters_ex18.py b/doc/salome/examples/filters_ex18.py index 805f54e06..32950cc50 100644 --- a/doc/salome/examples/filters_ex18.py +++ b/doc/salome/examples/filters_ex18.py @@ -1,8 +1,25 @@ # Borders at multi-connection -# create mesh -from SMESH_mechanic import * -# get border edges with number of connected faces = 5 -filter = smesh.GetFilter(SMESH.EDGE, SMESH.FT_MultiConnection, 5) +import salome +salome.salome_init() +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) +import SMESH +from salome.smesh import smeshBuilder +smesh = smeshBuilder.New(salome.myStudy) + +# make a mesh on a box +box = geompy.MakeBoxDXDYDZ(100,100,100) +mesh = smesh.Mesh( box, "Box" ) +mesh.Segment().NumberOfSegments(10) +mesh.Quadrangle() +mesh.Hexahedron() +mesh.Compute() +# copy all elements with translation and merge nodes +mesh.TranslateObject( mesh, [10,0,0], Copy=True ) +mesh.MergeNodes( mesh.FindCoincidentNodes( 1e-5 )) + +# get mesh edges with number of connected elements (faces and volumes) == 3 +filter = smesh.GetFilter(SMESH.EDGE, SMESH.FT_MultiConnection, 3) ids = mesh.GetIdsFromFilter(filter) -print "Number of border edges with 5 faces connected:", len(ids) +print "Number of border edges with 3 faces connected:", len(ids) diff --git a/doc/salome/gui/SMESH/images/bare_border_volumes_smpl.png b/doc/salome/gui/SMESH/images/bare_border_volumes_smpl.png index a1e799aa24f7f6356cafff6064981c648eb1c6a8..3508518fd1d8db83f741a7d3defd952539cbe4ff 100644 GIT binary patch literal 8103 zcmXAudpy(MAIFoV6wBA8CYe-{Tw*RWOd*%tm3t|~hU7NMWg#)SP2}1}nkESe2}#JM zWST8WF3qJixtrUB-_h@nJ@(l7>~qfNT;8wO^ZowZx3)AE6p#?uv15mzsfnTOjvYKq z@X_0|6SQnfPVEL?djm|If_Ll?`mp`s$viD|c*hQyld0jkOSg&BLwZ4yAHVLJ`zHMI z`VEtK%SzvmEWSO#!t+c~j@$m^7@jCA9*@gYe3*|9&gbh3+ul>MF0g^ewVQ91%!J!z zR>((*pD#C2x`lj@F+|suoY)$#ij5F?z+#?DKQiQf`?lp4Zjk*u>hVHtVj%XUa2PD# ze(Phz$|Pvdq{z5yJV>s`AoIviS7ujO}0FF8P|VpzFtJnE9^6D5ML18$6;KsH8RBSm?!0tpIL9 zAc-awq~)F+<2nCt0bV#hbFe^H<8O7&W18`Qhj1eHG3hyseOao`XDARU#a}tw^Y&qK zRJ>1+8=WT-jy?9q%(iA#3P@iod>7&{WfcyU8uS0stVEAyGQZbpny${wY!T{|pL>YC z4}8~?7u-_xPOdWKvXh+gqx$58!3GB@#no%Y5PP2MMAX~w$cL0l zG&{8lSi)38an;Z&^DSj=_(rBbkhijz7edaB6Kz{V8GuRuZ{x|Rtyk(! zC_gqA;o8!(nv-P|N?@;tBwIE0Tlf@EN8&3sqc-g}N4FXW8L=0<@gG_I8f&QJxcd6Q zz;_#VTNxIzOTD_8)fB=!YwteE#<5WanW)UB%Nx8$OTs#*U(aE`wGZRNh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% z7tc<8_`a&S9f4cZDSG8ulsD5fQhnV>5je#!z1=@0s80alwpl zgXn8XeVFUkmR(nWHU7Gk*dzaGu~ijXpXj!J!cq3O|7gg!+3fH4Y@%>bzx>9_>9I?v ze$C!WU0m-iN8~poO}72=8_l83x^qAkyw)4;=~5m}`^6dk#ryAk{?C)&tq}j6lOvAb z&Zob!4w>=d{F;34fA@Q_S2zywem{{ZFU#u@9}S`BH$u$L8&jf6NJJ-|nYS=};8H z>5ew)NgESY{AoEJg8H0f(2wTbE=k}IFi~`=hsZtHNtDy<1{nprl`qo7)ETEF=xH#! zoCN+VQ>|aHN<;|u5v>R&h}?qxet+){4iM$%9YSzR$FTVk59dOr=J!Z0hBiwYmiIyB zdh6#09gBvz@;SKrTTk@^-`b(lpM24Rj=b$cMz*%2IXxhleI|nt7X}ZYx??V*beo4& zb|oKN{sLYBEq3Thi`EZs7{x%=x8k&VvbyzecTekn8NzB!?oLK+YSw9yl{|HUY*-Ct nAf5$FN=YJmaIT>C*B_h4i`TH?_2R+5s*pF!&*QY4Aoc$M1H!$y diff --git a/doc/salome/gui/SMESH/input/about_filters.doc b/doc/salome/gui/SMESH/input/about_filters.doc index f331fa4be..7468931a1 100644 --- a/doc/salome/gui/SMESH/input/about_filters.doc +++ b/doc/salome/gui/SMESH/input/about_filters.doc @@ -4,11 +4,11 @@ \b Filters allow picking only the mesh elements satisfying to a specific condition or a set of conditions. Filters can be used to create -or edit mesh groups, remove elements from the mesh object, control +or edit mesh groups, remove elements from the mesh, control mesh quality by different parameters, etc. Several criteria can be combined together by using logical operators \a -AND and \a OR. In addition, applied filter criterion can be reverted +AND and \a OR. In addition, a filter criterion can be reverted using logical operator \a NOT. Some filtering criteria use the functionality of \ref quality_page "mesh quality controls" @@ -27,6 +27,8 @@ about selection filters and their usage in GUI. entities (nodes or elements) for the operations, which require the list of entities as input parameter (create/modify group, remove nodes/elements, etc) and for the operations, which accept objects - as input parameter. The page \ref tui_filters_page provides - examples of the filters usage in Python scripts. + (groups, sub-meshes) as input parameter. The page \ref + tui_filters_page provides examples of the filters usage in Python + scripts. + */ diff --git a/doc/salome/gui/SMESH/input/about_meshes.doc b/doc/salome/gui/SMESH/input/about_meshes.doc index 621a47e99..1490bce12 100644 --- a/doc/salome/gui/SMESH/input/about_meshes.doc +++ b/doc/salome/gui/SMESH/input/about_meshes.doc @@ -100,7 +100,8 @@ The mesh can include the following entities: Every mesh entity has an attribute associating it to a sub-shape it is generated on (if any). The node generated on the geometrical edge or surface in addition stores its position in parametric space of the -associated geometrical entity. +associated geometrical entity. This attribute is set up by meshing +algorithms generating elements and nodes. Mesh entities are identified by integer IDs starting from 1. Nodes and elements are counted separately, i.e. there can be a node diff --git a/doc/salome/gui/SMESH/input/selection_filter_library.doc b/doc/salome/gui/SMESH/input/selection_filter_library.doc index c87d928e8..145c48fec 100644 --- a/doc/salome/gui/SMESH/input/selection_filter_library.doc +++ b/doc/salome/gui/SMESH/input/selection_filter_library.doc @@ -73,7 +73,9 @@ 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. +shape is measured and is compared with \b Tolerance. The latter +approach (distance measurement) is also used if an element is not +associated to any shape.
  • Lying on Geom selects entities whose at least one node lies on the shape defined by the Threshold Value. @@ -82,7 +84,9 @@ 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. +shape is measured and is compared with \b Tolerance. The latter +approach (distance measurement) is also used if an element is not +associated to any shape.
  • Belong to Mesh Group selects entities included into the mesh group defined by the Threshold Value. diff --git a/doc/salome/gui/SMESH/input/tui_filters.doc b/doc/salome/gui/SMESH/input/tui_filters.doc index cfe65fff5..7356103dc 100755 --- a/doc/salome/gui/SMESH/input/tui_filters.doc +++ b/doc/salome/gui/SMESH/input/tui_filters.doc @@ -6,7 +6,7 @@ Filters allow picking only the mesh elements satisfying to a specific condition or a set of conditions. Filters can be used to create -or edit mesh groups, remove elements from the mesh object, control +or edit mesh groups, remove elements from the mesh, control mesh quality by different parameters, etc. Several filtering criteria can be combined together by using logical @@ -24,7 +24,7 @@ Python scripts. \section filter_aspect_ratio Aspect ratio -Filter 2D mesh elements (faces) according to the aspect ratio value: +filters 2D mesh elements (faces) according to the aspect ratio value: - element type should be \a SMESH.FACE - functor type should be \a SMESH.FT_AspectRatio - threshold is floating point value (aspect ratio) @@ -35,7 +35,7 @@ Filter 2D mesh elements (faces) according to the aspect ratio value: \section filter_aspect_ratio_3d Aspect ratio 3D -Filter 3D mesh elements (volumes) according to the aspect ratio value: +filters 3D mesh elements (volumes) according to the aspect ratio value: - element type is \a SMESH.VOLUME - functor type is \a SMESH.FT_AspectRatio3D - threshold is floating point value (aspect ratio) @@ -46,7 +46,7 @@ Filter 3D mesh elements (volumes) according to the aspect ratio value: \section filter_warping_angle Warping angle -Filter 2D mesh elements (faces) according to the warping angle value: +filters 2D mesh elements (faces) according to the warping angle value: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_Warping - threshold is floating point value (warping angle) @@ -57,7 +57,7 @@ Filter 2D mesh elements (faces) according to the warping angle value: \section filter_minimum_angle Minimum angle -Filter 2D mesh elements (faces) according to the minimum angle value: +filters 2D mesh elements (faces) according to the minimum angle value: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_MinimumAngle - threshold is floating point value (minimum angle) @@ -68,7 +68,7 @@ Filter 2D mesh elements (faces) according to the minimum angle value: \section filter_taper Taper -Filter 2D mesh elements (faces) according to the taper value: +filters 2D mesh elements (faces) according to the taper value: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_Taper - threshold is floating point value (taper) @@ -79,7 +79,7 @@ Filter 2D mesh elements (faces) according to the taper value: \section filter_skew Skew -Filter 2D mesh elements (faces) according to the skew value: +filters 2D mesh elements (faces) according to the skew value: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_Skew - threshold is floating point value (skew) @@ -90,7 +90,7 @@ Filter 2D mesh elements (faces) according to the skew value: \section filter_area Area -Filter 2D mesh elements (faces) according to the area value: +filters 2D mesh elements (faces) according to the area value: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_Area - threshold is floating point value (area) @@ -101,7 +101,7 @@ Filter 2D mesh elements (faces) according to the area value: \section filter_volume Volume -Filter 3D mesh elements (volumes) according to the volume value: +filters 3D mesh elements (volumes) according to the volume value: - element type is \a SMESH.VOLUME - functor type is \a SMESH.FT_Volume3D - threshold is floating point value (volume) @@ -112,7 +112,7 @@ Filter 3D mesh elements (volumes) according to the volume value: \section filter_free_borders Free borders -Filter 1D mesh elements (edges) which represent free borders of a mesh: +filters 1D mesh elements (edges) which represent free borders of a mesh: - element type is \a SMESH.EDGE - functor type is \a SMESH.FT_FreeBorders - threshold value is not required @@ -123,8 +123,8 @@ Filter 1D mesh elements (edges) which represent free borders of a mesh: \section filter_free_edges Free edges -Filter 2D mesh elements (faces) consisting of edges belonging to one -element of mesh only: +filters 2D mesh elements (faces) having edges (i.e. links between +nodes, not mesh segments) belonging to one face of mesh only: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_FreeEdges - threshold value is not required @@ -135,7 +135,7 @@ element of mesh only: \section filter_free_nodes Free nodes -Filter free nodes: +filters free nodes: - element type is \a SMESH.NODE - functor type is \a SMESH.FT_FreeNodes - threshold value is not required @@ -146,7 +146,7 @@ Filter free nodes: \section filter_free_faces Free faces -Filter free faces: +filters free faces: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_FreeFaces - threshold value is not required @@ -157,7 +157,7 @@ Filter free faces: \section filter_bare_border_faces Bare border faces -Filter faces with bare borders: +filters faces with bare borders: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_BareBorderFace - threshold value is not required @@ -168,7 +168,7 @@ Filter faces with bare borders: \section filter_coplanar_faces Coplanar faces -Filter faces with bare borders: +filters coplanar faces: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_CoplanarFaces - threshold value is the face ID @@ -178,7 +178,7 @@ Filter faces with bare borders: \section filter_over_constrained_faces Over-constrained faces -Filter over-constrained faces: +filters over-constrained faces: - element type is \a SMESH.FACE - functor type is \a SMESH.FT_OverConstrainedFace - threshold value is not required @@ -189,7 +189,7 @@ Filter over-constrained faces: \section filter_double_elements Double edges, Double faces, Double volumes -filter mesh elements basing on the same set of nodes: +filters mesh elements basing on the same set of nodes: - element type is either \a SMESH.EGDE, \a SMESH.FACE or \a SMESH.VOLUME - functor type is either \a SMESH.FT_EqualEdges, \a SMESH.FT_EqualFaces or \a SMESH.FT_EqualVolumes, @@ -211,8 +211,8 @@ filters mesh nodes which are coincident with other nodes (within a given toleran \section filter_borders_multiconnection Borders at multi-connection -Filter border 1D mesh elements (edges) according to the specified number of -connections (faces belonging the border edges) +filters 1D mesh elements (segments) according to the specified number of +connections (faces and volumes on whose border the segment lies): - element type is \a SMESH.EDGE - functor type is \a SMESH.FT_MultiConnection - threshold is integer value (number of connections) @@ -223,8 +223,8 @@ connections (faces belonging the border edges) \section filter_borders_multiconnection_2d Borders at multi-connection 2D -Filter 2D mesh elements (faces) which consist of edges belonging -to the specified number of mesh elements +filters 2D mesh elements (faces) with the specified maximal number of +faces connected to a border (link between nodes, not mesh segment): - element type is \a SMESH.FACE - functor type is \a SMESH.FT_MultiConnection2D - threshold is integer value (number of connections) @@ -235,7 +235,7 @@ to the specified number of mesh elements \section filter_length Length -Filter 1D mesh elements (edges) according to the edge length value: +filters 1D mesh elements (edges) according to the edge length value: - element type should be \a SMESH.EDGE - functor type should be \a SMESH.FT_Length - threshold is floating point value (length) @@ -246,8 +246,8 @@ Filter 1D mesh elements (edges) according to the edge length value: \section filter_length_2d Length 2D -Filter 2D mesh elements (faces) corresponding to the maximum length. -value of its edges: +filters 2D mesh elements (faces) according to the maximum length of its +edges (links between nodes): - element type should be \a SMESH.FACE - functor type should be \a SMESH.FT_Length2D - threshold is floating point value (edge length) @@ -258,11 +258,11 @@ value of its edges: \section filter_max_element_length_2d Element Diameter 2D -Filter 2D mesh elements (faces) corresponding to the maximum length -value of its edges and diagonals: +filters 2D mesh elements (faces) according to the maximum length +of its edges and diagonals: - element type should be \a SMESH.FACE - functor type should be \a SMESH.FT_MaxElementLength2D -- threshold is floating point value (edge/diagonal length) +- threshold is floating point value (length) \tui_script{filters_ex22.py} @@ -270,8 +270,8 @@ value of its edges and diagonals: \section filter_max_element_length_3d Element Diameter 3D -Filter 3D mesh elements (volumes) corresponding to the maximum length -value of its edges and diagonals: +filters 3D mesh elements (volumes) according to the maximum length +of its edges and diagonals: - element type should be \a SMESH.VOLUME - functor type should be \a SMESH.FT_MaxElementLength3D - threshold is floating point value (edge/diagonal length) @@ -282,7 +282,8 @@ value of its edges and diagonals: \section filter_bare_border_volumes Bare border volumes -Filter 3D mesh elements with bare borders: +filters 3D mesh elements with bare borders, i.e. having a facet not +shared with other volumes and without a face on it: - element type is \a SMESH.VOLUME - functor type is \a SMESH.FT_BareBorderVolume - threshold value is not required @@ -293,7 +294,7 @@ Filter 3D mesh elements with bare borders: \section filter_over_constrained_volumes Over-constrained volumes -Filter over-constrained volumes: +filters over-constrained volumes, whose all nodes are on the mesh boundary: - element type is \a SMESH.VOLUME - functor type is \a SMESH.FT_OverConstrainedVolume - threshold value is not required @@ -304,7 +305,7 @@ Filter over-constrained volumes: \section filter_belong_to_group Belong to Mesh Group -Filter mesh entities (nodes or elements) included in a mesh group +filters mesh entities (nodes or elements) included in a mesh group defined by threshold value: - element type can be any entity type, from \a SMESH.NODE to \a SMESH.VOLUME - functor type should be \a SMESH.FT_BelongToMeshGroup @@ -314,27 +315,31 @@ defined by threshold value: \section filter_belong_to_geom Belong to Geom -Filter mesh entities (nodes or elements) which all nodes lie on the +filters mesh entities (nodes or elements) which all nodes lie on the shape defined by threshold value: - element type can be any entity type, from \a SMESH.NODE to \a SMESH.VOLUME - functor type should be \a SMESH.FT_BelongToGeom - threshold is geometrical object +- tolerance is a distance between a node and the geometrical object; +it is used if an node is not associated to any geometry. \tui_script{filters_ex26.py} \section filter_lying_on_geom Lying on Geom -Filter mesh entities (nodes or elements) at least one node of which lies on the +filters mesh entities (nodes or elements) at least one node of which lies on the shape defined by threshold value: - element type can be any entity type, from \a SMESH.NODE to \a SMESH.VOLUME - functor type should be \a SMESH.FT_LyingOnGeom - threshold is geometrical object +- tolerance is a distance between a node and the geometrical object; +it is used if an node is not associated to any geometry. \tui_script{filters_ex27.py} \section filter_belong_to_plane Belong to Plane -Filter mesh entities (nodes or elements) which all nodes belong to the +filters mesh entities (nodes or elements) which all nodes belong to the plane defined by threshold value with the given tolerance: - element type can be: \a SMESH.NODE, \a SMESH.EDGE, \a SMESH.FACE - functor type should be \a SMESH.FT_BelongToPlane @@ -345,7 +350,7 @@ plane defined by threshold value with the given tolerance: \section filter_belong_to_cylinder Belong to Cylinder -Filter mesh entities (nodes or elements) which all nodes belong to the +filters mesh entities (nodes or elements) which all nodes belong to the cylindrical face defined by threshold value with the given tolerance: - element type can be: \a , \a SMESH.EDGE, \a SMESH.FACE - functor type should be \a SMESH.FT_BelongToCylinder @@ -356,7 +361,7 @@ cylindrical face defined by threshold value with the given tolerance: \section filter_belong_to_surface Belong to Surface -Filter mesh entities (nodes or elements) which all nodes belong to the +filters mesh entities (nodes or elements) which all nodes belong to the arbitrary surface defined by threshold value with the given tolerance: - element type can be: \a SMESH.NODE, \a SMESH.EDGE, \a SMESH.FACE - functor type should be \a SMESH.FT_BelongToGenSurface @@ -367,7 +372,7 @@ arbitrary surface defined by threshold value with the given tolerance: \section filter_range_of_ids Range of IDs -Filter mesh entities elements (nodes or elements) according to the +filters mesh entities elements (nodes or elements) according to the specified identifiers range: - element type can be any entity type, from \a SMESH.NODE to \a SMESH.VOLUME - functor type is \a SMESH.FT_RangeOfIds @@ -377,7 +382,7 @@ specified identifiers range: \section filter_bad_oriented_volume Badly oriented volume -Filter 3D mesh elements (volumes), which are incorrectly oriented from +filters 3D mesh elements (volumes), which are incorrectly oriented from the point of view of MED convention. - element type should be \a SMESH.VOLUME - functor type is \a SMESH.FT_BadOrientedVolume @@ -387,7 +392,7 @@ the point of view of MED convention. \section filter_linear_or_quadratic Linear / quadratic -Filter linear / quadratic mesh elements: +filters linear / quadratic mesh elements: - element type should be any element type, e.g.: \a SMESH.EDGE, \a SMESH.FACE, \a SMESH.VOLUME - functor type is \a SMESH.FT_LinearOrQuadratic - threshold is not required @@ -398,7 +403,7 @@ elements are selected, otherwise (by default) linear elements are selected \section filter_group_color Group color -Filter mesh entities, belonging to the group with the color defined by the threshold value. +filters mesh entities, belonging to the group with the color defined by the threshold value. - element type can be any entity type, from \a SMESH.NODE to \a SMESH.VOLUME - functor type is \a SMESH.FT_GroupColor - threshold should be of SALOMEDS.Color type @@ -407,7 +412,7 @@ Filter mesh entities, belonging to the group with the color defined by the thres \section filter_geom_type Geometry type -Filter mesh elements by the geometric type defined with the threshold +filters mesh elements by the geometric type defined with the threshold value. The list of available geometric types depends on the element entity type. - element type should be any element type, e.g.: \a SMESH.EDGE, \a SMESH.FACE, \a SMESH.VOLUME diff --git a/src/SMESHGUI/SMESHGUI_MeshDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshDlg.cxx index 4973a5d1e..253ef61b3 100644 --- a/src/SMESHGUI/SMESHGUI_MeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshDlg.cxx @@ -338,17 +338,24 @@ void SMESHGUI_MeshTab::setCurrentHyp( const int theId, const int theIndex ) } else // more than one additional hyp assigned { - // move a hyp from myHypCombo[ AddHyp ] to myAddHypList - for ( int i = 1, nb = myHypCombo[ AddHyp ]->count(); i < nb; ++i ) + if ( theIndex > 0 ) { - int curIndex = myHypCombo[ AddHyp ]->itemData( i ).toInt(); - if ( theIndex == curIndex ) + // move a hyp from myHypCombo[ AddHyp ] to myAddHypList + for ( int i = 1, nb = myHypCombo[ AddHyp ]->count(); i < nb; ++i ) { - addItem( myHypCombo[ AddHyp ]->itemText( i ), theId, theIndex ); - myHypCombo[ AddHyp ]->removeItem( i ); - break; + int curIndex = myHypCombo[ AddHyp ]->itemData( i ).toInt(); + if ( theIndex == curIndex ) + { + addItem( myHypCombo[ AddHyp ]->itemText( i ), theId, theIndex ); + myHypCombo[ AddHyp ]->removeItem( i ); + break; + } } } + else + { + myAddHypList->clear(); + } } } diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index 69053214a..cc873f15b 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -2010,6 +2010,9 @@ int SMESHGUI_MeshOp::currentHyp( const int theDim, const int theHypType ) const bool SMESHGUI_MeshOp::isSelectedHyp( int theDim, int theHypType, int theIndex) const { + if ( theIndex < 0 ) + return false; + if ( theHypType < AddHyp ) // only one hyp can be selected return currentHyp( theDim, theHypType ) == theIndex; @@ -2050,17 +2053,28 @@ bool SMESHGUI_MeshOp::isAccessibleDim( const int theDim ) const * \param theDim - dimension of hypothesis or algorithm * \param theHypType - Type of hypothesis (Algo, MainHyp, AddHyp) * \param theIndex - Index of hypothesis + * \param updateHypsOnAlgoDeselection - to clear and disable hyps if algo deselected * * Gets current hypothesis or algorithms */ //================================================================================ -void SMESHGUI_MeshOp::setCurrentHyp( const int theDim, - const int theHypType, - const int theIndex ) +void SMESHGUI_MeshOp::setCurrentHyp( const int theDim, + const int theHypType, + const int theIndex, + const bool updateHypsOnAlgoDeselection) { myIgnoreAlgoSelection = true; myDlg->tab( theDim )->setCurrentHyp( theHypType, theIndex + 1 ); myIgnoreAlgoSelection = false; + + if ( updateHypsOnAlgoDeselection && theHypType == Algo && theIndex < 0 ) + { + const QStringList noHyps; + myDlg->tab( theDim )->setAvailableHyps( MainHyp, noHyps ); + myDlg->tab( theDim )->setExistingHyps ( MainHyp, noHyps ); + myDlg->tab( theDim )->setAvailableHyps( AddHyp, noHyps ); + myDlg->tab( theDim )->setExistingHyps ( AddHyp, noHyps ); + } } //================================================================================ @@ -2645,7 +2659,7 @@ void SMESHGUI_MeshOp::setAvailableMeshType( const QStringList& theTypeMesh ) * \param theIndex - Index of current type of mesh */ //================================================================================ -void SMESHGUI_MeshOp::onAlgoSetByMeshType( const int theTabIndex, const int theIndex) +void SMESHGUI_MeshOp::onAlgoSetByMeshType( const int theTabIndex, const int theIndex ) { setFilteredAlgoData( theTabIndex, theIndex); } @@ -2705,8 +2719,8 @@ void SMESHGUI_MeshOp::setFilteredAlgoData( const int theTabIndex, const int theI } else for ( int i = SMESH::DIM_0D; i <= SMESH::DIM_3D; i++ ) { - if ( i > myMaxShapeDim || ( isReqDisBound && i != aReqDim ) ) myDlg->disableTab( i ); - else myDlg->enableTab( i ); + if ( i > myMaxShapeDim || ( isReqDisBound && i < aReqDim ) ) myDlg->disableTab( i ); + else myDlg->enableTab( i ); } myDlg->setCurrentTab( theTabIndex ); } @@ -2740,7 +2754,7 @@ void SMESHGUI_MeshOp::setFilteredAlgoData( const int theTabIndex, const int theI //set new algorithm list and select the current algorithm myDlg->tab( dim )->setAvailableHyps( Algo, anAvailableAlgs ); anCurrentCompareType = ( anCompareType == "HEXA" || anCompareType == "QUAD" ) ? "QUAD" : "TRIA"; - setCurrentHyp( dim, Algo, anCurrentAvailableAlgo ); + setCurrentHyp( dim, Algo, anCurrentAvailableAlgo, /*updateHyps=*/true ); } for ( int i = myMaxShapeDim; i >= SMESH::DIM_0D; i-- ) { @@ -2753,7 +2767,7 @@ void SMESHGUI_MeshOp::setFilteredAlgoData( const int theTabIndex, const int theI for (int j = myMaxShapeDim; j >= SMESH::DIM_0D; j--) { if ( currentHyp( j, Algo ) < 0 ) { myDlg->disableTab( j ); - setCurrentHyp( j , Algo, -1 ); + setCurrentHyp( j , Algo, -1, /*updateHyps=*/true ); } } break; @@ -2763,8 +2777,8 @@ void SMESHGUI_MeshOp::setFilteredAlgoData( const int theTabIndex, const int theI } } if ( aDim == SMESH::DIM_2D) { + setCurrentHyp( SMESH::DIM_3D, Algo, -1, /*updateHyps=*/true ); myDlg->disableTab( SMESH::DIM_3D ); - setCurrentHyp( SMESH::DIM_3D, Algo, -1); } int currentTab = ( theTabIndex <= aDim ) ? theTabIndex : aDim; diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.h b/src/SMESHGUI/SMESHGUI_MeshOp.h index 35bd50672..6d26686b4 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.h +++ b/src/SMESHGUI/SMESHGUI_MeshOp.h @@ -128,7 +128,7 @@ private: bool isSelectedHyp( int, int, int ) const; int nbDlgHypTypes( const int ) const; bool isAccessibleDim( const int ) const; - void setCurrentHyp( const int, const int, const int ); + void setCurrentHyp( const int, const int, const int, const bool=false); void setDefaultName( const QString& prefix="" ) const; SMESH::SMESH_Hypothesis_var getAlgo( const int ); void readMesh(); diff --git a/src/SMESH_PY/smeshstudytools.py b/src/SMESH_PY/smeshstudytools.py index 51bcc3567..7d4277211 100644 --- a/src/SMESH_PY/smeshstudytools.py +++ b/src/SMESH_PY/smeshstudytools.py @@ -127,8 +127,8 @@ class SMeshStudyTools: from salome.smesh import smeshBuilder smesh = smeshBuilder.New(self.editor.study) - meshObject=smesh.IDToObject(entry) - return meshObject + meshObject=salome.IDToObject(entry) + return smesh.Mesh( meshObject ) ## Returns the SMESH object associated to the specified \em SObject, # (the SObject is an item in the objects browser). diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py index 2c98e1653..67e3c71b3 100644 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -1970,7 +1970,7 @@ class Mesh: # @param groupName the name of the mesh group # @param elementType the type of elements in the group; either of # (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). - # @param elemIDs the list of ids + # @param elemIDs either the list of ids, group, sub-mesh, or filter # @return SMESH_Group # @ingroup l2_grps_create def MakeGroupByIds(self, groupName, elementType, elemIDs): -- 2.39.2