Salome HOME
Fix Redesign of SMESH documentation
[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 via menu **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
57 Switching on **Insert filter in viewer** check-box limits
58 selection of elements in the Viewer to the current filter.
59
60 In the **Source** field you choose if the filter will be applied to
61 the whole **Mesh**, the **Initial Selection** or the **Current Dialog**. 
62 If **Mesh** is chosen, the elements satisfying the filter
63 will be selected in the 3D Viewer. If **Initial Selection** is
64 chosen, the filter will be applied to the selected elements and the
65 elements rejected by the filter will be deselected. If **Current Dialog** 
66 is chosen, the filter will be applied to the list of
67 elements in the current dialog and the elements rejected
68 by the filter will be removed from the list.
69
70 **Copy from...** button gives you a possibility to load an
71 existing filter from **Selection filter library** and **Add to...** 
72 button gives you a possibility to save your current filter in the Library.
73
74 .. note::
75         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.
76
77 Some criteria are applicable to all **Entity types**:
78
79 * **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.
80 * **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.
81 * **Belong to Mesh Group** selects entities included into the mesh group defined by the **Threshold Value**.
82 * **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"
83 * **Color of Group** allows selection of entities belonging to the Group with the color defined by the **Threshold Value**.
84 * **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
85         * node ID (that you can pick in the Viewer) or
86         * geometrical vertex (that you can pick either in the Viewer or in the Object Browser) or
87         * 3 coordinates of a point (that you can enter in TUI mode only).
88
89 Some criteria are applicable to entities of dimension more than zero, i.e. to **Edges**, **Faces** and **Volumes**:
90
91 * **Linear** allows selection of Linear or Quadratic elements (if Unary is set to "Not")
92 * **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.
93 * **Entity type** allows selection of elements by their type defined as a combination of geometry type and the number of nodes.
94
95 The following criteria are applicable to Entities of **all** types except for *Volumes*:
96
97 * **Belong to Plane** selects entities whose all nodes belong to a specified plane within a given **Tolerance**.
98 * **Belong to Cylinder** selects entities whose all nodes belong to a specified cylinder within a given **Tolerance**.
99 * **Belong to Surface** selects entities whose all nodes belong to a specified arbitrary surface within a given **Tolerance**.
100
101 The following criteria allow selecting mesh **Nodes**:
102
103 * **Free nodes** selects nodes not belonging to any mesh element.
104 * **Double nodes** selects a node coincident with other nodes (within a given **Tolerance**). See also :ref:`Double Nodes quality control <tui_double_nodes_control>`.
105 * **Connectivity number** selects nodes with a number of connected elements, which is more, less or equal to **Threshold Value**. Elements of the highest dimension are countered only.
106
107 The following criteria allow selecting mesh **Edges**:
108
109 * **Free Borders** selects free 1D mesh elements, i.e. edges belonging to one element (face or volume) only. See also a :ref:`Free Borders quality control <free_borders_page>`.
110 * **Double edges** selects 1D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements` quality control.
111 * **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 **Threshold Value**. See also a :ref:`borders_at_multi_connection_page` quality control.
112 * **Length** selects edges with a value of length, which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. See also a :ref:`length_page`  quality control.
113
114 The following criteria allow selecting mesh **Faces**:
115
116 * **Aspect ratio** selects 2D mesh elements with an aspect ratio (see also an :ref:`aspect_ratio_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**.
117 * **Warping** selects quadrangles with warping angle (see also a :ref:`warping_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**.
118 * **Minimum angle** selects triangles and quadrangles with minimum angle (see also a :ref:`minimum_angle_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**.
119 * **Taper** selects quadrangles cells with taper value (see also a :ref:`taper_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**.
120 * **Skew** selects triangles and quadrangles with skew value (see also a :ref:`skew_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**.
121 * **Area** selects triangles and quadrangles with a value of area (see also an :ref:`area_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**.
122 * **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` quality control.
123 * **Free faces** selects 2D mesh elements, which belong to less than two volumes.
124 * **Double faces** selects 2D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements` quality control.
125 * **Faces with bare border** selects 2D mesh elements having a free border without an edge on it. See also :ref:`bare_border_faces_page` quality control.
126 * **Over-constrained faces** selects 2D mesh elements having only one border shared with other 2D elements. See also :ref:`over_constrained_faces_page` quality control.
127 * **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 **Threshold Value**. See also a :ref:`borders_at_multi_connection_2d_page` quality control.
128 * **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 **Threshold Value**. See also a :ref:`length_2d_page` quality control.
129 * **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.
130 * **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 **Threshold Value**. See also a :ref:`max_element_length_2d_page` quality control.
131
132 The following criteria allow selecting mesh **Volumes**:
133
134 * **Aspect ratio 3D** selects 3D mesh elements with an aspect ratio (see also an :ref:`aspect_ratio_3d_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**.
135 * **Volume** selects 3D mesh elements with a value of volume (see also a :ref:`volume_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**.
136 * **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 **Threshold Value**. See also a :ref:`max_element_length_3d_page` quality control.
137 * **Double volumes** selects 3D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements` quality control.
138 * **Bad oriented volume** selects mesh volumes, which are incorrectly oriented from the point of view of MED convention.
139 * **Over-constrained volumes** selects mesh volumes having only one facet shared with other volumes. See also :ref:`over_constrained_volumes_page` quality control.
140 * **Volumes with bare border** selects 3D mesh elements having a free border without a face on it. See also :ref:`bare_border_volumes_page` quality control.
141
142
143 **See also** sample scripts of :ref:`tui_filters_page`.
144
145
146
147
148