Salome HOME
Merge branch 'V8_4_BR'
[modules/smesh.git] / doc / salome / gui / SMESH / input / selection_filter_library.rst
1 .. _selection_filter_library_page:
2
3 ************************
4 Selection filter library
5 ************************
6
7 Selection filter library allows creating and storing in files
8 the filters that can be later reused for operations on meshes. You can
9 access it from the Main Menu via **Tools / Selection filter library**.
10 It is also possible to save/load a filter by invoking the filter library
11 from :ref:`filtering_elements` launched from any mesh operation.
12
13 .. image:: ../images/selectionfilterlibrary.png
14         :align: center
15
16 **Library file name** shows the path and the file name where your
17 filters will be stored. By clicking the **Browse** button you can
18 load an existing filter library.
19
20 **Names of filters** lists the filters created or uploaded for
21 the current study. You can **Add** or **Delete** filters.
22
23 In **Filter name** box you can specify the name for your
24 filter. By default it is prefixed with the corresponding entity type.
25
26 .. _filtering_elements:
27
28 Filter Dialog
29 #############
30
31 When we use filters during group creation or another operation (by 
32 clicking **Set Filter** button in the corresponding dialog), the
33 dialog for setting filters looks as shown below.
34
35 .. image:: ../images/a-filteronfaces.png
36         :align: center
37
38 The **Add** button creates a new criterion at the end of the list of
39 criteria. The **Insert** button creates a new criterion before the
40 selected criterion. The **Remove** button deletes the selected
41 criterion. The **Clear** button deletes all criteria.
42
43 If there is a choice of **Entity type** in the dialog, only
44 criteria of currently selected type are used to create or change a
45 filter, and criteria of hidden types (if were specified) are ignored.
46
47 Each **Entity type** has its specific list of criteria, however all
48 filters have common syntax. The **Threshold Value** should be specified 
49 for most criteria. For numerical criteria it is necessary to indicate if 
50 the found elements should be **More**, **Less** or **Equal** to this
51 **Value**. You can also reverse the sense of a criterion using **Unary**
52 operator *Not* and you should specify logical relations between
53 criteria using **Binary** operators *Or* and *And*.
54
55 Some criteria have the additional parameter of **Tolerance**. 
56 Switching on **Insert filter in viewer** check-box limits
57 selection of elements in the Viewer to the current filter.
58
59 In the **Source** field you choose if the filter will be applied to
60 the whole **Mesh**, the **Initial Selection** or the **Current Dialog**. 
61 If **Mesh** is chosen, the elements satisfying the filter
62 will be selected in the 3D Viewer. If **Initial Selection** is
63 chosen, the filter will be applied to the selected elements and the
64 elements rejected by the filter will be deselected. If **Current Dialog** 
65 is chosen, the filter will be applied to the list of
66 elements in the current dialog and the elements rejected
67 by the filter will be removed from the list.
68
69 **Copy from...** button gives you a possibility to load an
70 existing filter from **Selection filter library** and **Add to...** 
71 button gives you a possibility to save your current filter in the Library.
72
73 .. note::
74         If the button **Apply and Close** is disabled, there is no selected mesh in the Object Browser and the filter can not be created. You have to select the mesh and the button will be enabled.
75
76 Some criteria are applicable to all **Entity types**:
77
78 * **Belong to Geom** selects entities whose all nodes lie on the shape defined by **Threshold Value**. If the threshold shape is a sub-shape of the main shape of the mesh, the filtering algorithm works faster because node-to-shape association is used instead of measuring distance between nodes and the shape, and **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 **Tolerance**. The latter approach (distance measurement) is also used if an element is not associated to any shape.
79 * **Lying on Geom** selects entities whose at least one node lies on the shape defined by the **Threshold Value**. If the threshold shape is a sub-shape of the main shape of the mesh, the filtering algorithm works faster because node-to-shape association is used instead of measuring distance between nodes and the shape, and **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 **Tolerance**. The latter approach (distance measurement) is also used if an element is not associated to any shape.
80 * **Belong to Mesh Group** selects entities included into the mesh group defined by the **Threshold Value**.
81 * **Range of IDs** allows selection of entities with the specified IDs. **Threshold Value** can be, for example: "1,2,3,50-60,63,67,70-78"
82 * **Color of Group** allows selection of entities belonging to the Group with the color defined by the **Threshold Value**.
83 * **Elements of a domain** allows selection of entities belonging to one domain of a mesh. The domain is mesh part not connected to other parts. **Threshold Value** locating any element of the domain can be either
84         * node ID (that you can pick in the Viewer) or
85         * geometrical vertex (that you can pick either in the Viewer or in the Object Browser) or
86         * 3 coordinates of a point (that you can enter in TUI mode only).
87
88 Some criteria are applicable to entities of dimension more than zero, i.e. to **Edges**, **Faces** and **Volumes**:
89
90 * **Linear** allows selection of Linear or Quadratic elements (if Unary is set to "Not")
91 * **Geometry type** allows selection of elements by their geometric type defined by the **Threshold Value**. The list of available geometric types depends on the current entity type.
92 * **Entity type** allows selection of elements by their type defined as a combination of geometry type and the number of nodes.
93
94 The following criteria are applicable to Entities of **all** types except for *Volumes*:
95
96 * **Belong to Plane** selects entities whose all nodes belong to a specified plane within a given **Tolerance**.
97 * **Belong to Cylinder** selects entities whose all nodes belong to a specified cylinder within a given **Tolerance**.
98 * **Belong to Surface** selects entities whose all nodes belong to a specified arbitrary surface within a given **Tolerance**.
99
100 The following criteria allow selecting mesh **Nodes**:
101
102 * **Free nodes** selects nodes not belonging to any mesh element.
103 * **Double nodes** selects a node coincident with other nodes (within a given **Tolerance**). See also :ref:`tui_double_nodes_control`.
104 * **Connectivity number** selects nodes with a number of connected elements, which is more, less or equal to the predefined **Threshold Value**. Elements of the highest dimension are countered only.
105
106 The following criteria allow selecting mesh **Edges**:
107
108 * **Free Borders** selects free 1D mesh elements, i.e. edges belonging to one element (face or volume) only. See also a :ref:`free_borders_page`.
109 * **Double edges** selects 1D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements` .
110 * **Borders at Multi-Connections** selects edges belonging to several faces. The number of faces should be more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`borders_at_multi_connection_page`.
111 * **Length** selects edges with a value of length, which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`length_page` .
112
113 The following criteria allow selecting mesh **Faces**:
114
115 * **Aspect ratio** selects 2D mesh elements with an aspect ratio (see also an :ref:`aspect_ratio_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**.
116 * **Warping** selects quadrangles with warping angle (see also a :ref:`warping_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**.
117 * **Minimum angle** selects triangles and quadrangles with minimum angle (see also a :ref:`minimum_angle_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**.
118 * **Taper** selects quadrangles cells with taper value (see also a :ref:`taper_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**.
119 * **Skew** selects triangles and quadrangles with skew value (see also a :ref:`skew_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**.
120 * **Area** selects triangles and quadrangles with a value of area (see also an :ref:`area_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**.
121 * **Free edges** selects 2D mesh elements having at least one edge, which is not shared with other faces. See also a :ref:`free_edges_page`.
122 * **Free faces** selects 2D mesh elements, which belong to less than two volumes.
123 * **Double faces** selects 2D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements`.
124 * **Faces with bare border** selects 2D mesh elements having a free border without an edge on it. See also :ref:`bare_border_faces_page`.
125 * **Over-constrained faces** selects 2D mesh elements having only one border shared with other 2D elements. See also :ref:`over_constrained_faces_page`.
126 * **Borders at Multi-Connections 2D** selects cells consisting of edges belonging to several elements of mesh. The number of mesh elements should be more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`borders_at_multi_connection_2d_page`.
127 * **Length 2D** selects triangles and quadrangles combining of the edges with a value of length, which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`length_2d_page`.
128 * **Coplanar faces** selects mesh faces neighboring the one selected by ID in **Threshold Value** field, if the angle between the normal to the neighboring face and the normal to the selected face is less then the angular tolerance (defined in degrees). Selection continues among all neighbor faces of already selected ones.
129 * **Element Diameter 2D** selects triangles and quadrangles composed of the edges and diagonals with a value of length, which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`max_element_length_2d_page`.
130
131 The following criteria allow selecting mesh **Volumes**:
132
133 * **Aspect ratio 3D** selects 3D mesh elements with an aspect ratio (see also an :ref:`aspect_ratio_3d_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**.
134 * **Volume** selects 3D mesh elements with a value of volume (see also a :ref:`volume_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**.
135 * **Element Diameter 3D** selects 3D mesh elements composed of the edges and diagonals with a value of length, which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`max_element_length_3d_page`.
136 * **Double volumes** selects 3D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements`.
137 * **Bad oriented volume** selects mesh volumes, which are incorrectly oriented from the point of view of MED convention.
138 * **Over-constrained volumes** selects mesh volumes having only one facet shared with other volumes. See also :ref:`over_constrained_volumes_page`.
139 * **Volumes with bare border** selects 3D mesh elements having a free border without a face on it. See also :ref:`bare_border_volumes_page`.
140
141
142
143
144