7 Filters allow picking only the mesh elements satisfying to a
8 specific condition or a set of conditions. Filters can be used to create
9 or edit mesh groups, remove elements from the mesh, control
10 mesh quality by different parameters, etc.
12 Several filtering criteria can be combined together by using logical
13 operators *AND* and *OR*. In addition, a filtering criterion can
14 be reverted using logical operator *NOT*.
16 Mesh filters can use the functionality of mesh quality controls to filter
17 mesh nodes / elements by a specific characteristic (Area, Length, etc).
19 This page provides a short description of the existing mesh filters,
20 describes required parameters and gives simple examples of usage in
23 **See also:** :ref:`tui_quality_controls_page`
25 .. contents:: `Table of contents`
28 .. _filter_aspect_ratio:
33 filters 2D mesh elements (faces) according to the aspect ratio value:
35 * element type should be *SMESH.FACE*
36 * functor type should be *SMESH.FT_AspectRatio*
37 * threshold is floating point value (aspect ratio)
39 .. literalinclude:: ../../examples/filters_ex01.py
42 :download:`Download this script <../../examples/filters_ex01.py>`
44 **See also:** :ref:`tui_aspect_ratio`
46 .. _filter_aspect_ratio_3d:
51 filters 3D mesh elements (volumes) according to the aspect ratio value:
53 * element type is *SMESH.VOLUME*
54 * functor type is *SMESH.FT_AspectRatio3D*
55 * threshold is floating point value (aspect ratio)
57 .. literalinclude:: ../../examples/filters_ex02.py
60 :download:`Download this script <../../examples/filters_ex02.py>`
62 **See also:** :ref:`tui_aspect_ratio_3d`
64 .. _filter_warping_angle:
69 filters 2D mesh elements (faces) according to the warping angle value:
71 * element type is *SMESH.FACE*
72 * functor type is *SMESH.FT_Warping*
73 * threshold is floating point value (warping angle)
75 .. literalinclude:: ../../examples/filters_ex03.py
78 :download:`Download this script <../../examples/filters_ex03.py>`
80 **See also:** :ref:`tui_warping`
82 .. _filter_minimum_angle:
87 filters 2D mesh elements (faces) according to the minimum angle value:
89 * element type is *SMESH.FACE*
90 * functor type is *SMESH.FT_MinimumAngle*
91 * threshold is floating point value (minimum angle)
93 .. literalinclude:: ../../examples/filters_ex04.py
96 :download:`Download this script <../../examples/filters_ex04.py>`
98 **See also:** :ref:`tui_minimum_angle`
105 filters 2D mesh elements (faces) according to the taper value:
107 * element type is *SMESH.FACE*
108 * functor type is *SMESH.FT_Taper*
109 * threshold is floating point value (taper)
111 .. literalinclude:: ../../examples/filters_ex05.py
114 :download:`Download this script <../../examples/filters_ex05.py>`
116 **See also:** :ref:`tui_taper`
123 filters 2D mesh elements (faces) according to the skew value:
125 * element type is *SMESH.FACE*
126 * functor type is *SMESH.FT_Skew*
127 * threshold is floating point value (skew)
129 .. literalinclude:: ../../examples/filters_ex06.py
132 :download:`Download this script <../../examples/filters_ex06.py>`
134 **See also:** :ref:`tui_skew`
141 filters 2D mesh elements (faces) according to the area value:
143 * element type is *SMESH.FACE*
144 * functor type is *SMESH.FT_Area*
145 * threshold is floating point value (area)
147 .. literalinclude:: ../../examples/filters_ex07.py
150 :download:`Download this script <../../examples/filters_ex07.py>`
152 **See also:** :ref:`tui_area`
159 filters 3D mesh elements (volumes) according to the volume value:
161 * element type is *SMESH.VOLUME*
162 * functor type is *SMESH.FT_Volume3D*
163 * threshold is floating point value (volume)
165 .. literalinclude:: ../../examples/filters_ex08.py
168 :download:`Download this script <../../examples/filters_ex08.py>`
170 **See also:** :ref:`tui_volume`
172 .. _filter_free_borders:
177 filters 1D mesh elements (edges) which represent free borders of a mesh:
179 * element type is *SMESH.EDGE*
180 * functor type is *SMESH.FT_FreeBorders*
181 * threshold value is not required
183 .. literalinclude:: ../../examples/filters_ex09.py
186 :download:`Download this script <../../examples/filters_ex09.py>`
188 **See also:** :ref:`tui_free_borders`
190 .. _filter_free_edges:
195 filters 2D mesh elements (faces) having edges (i.e. links between
196 nodes, not mesh segments) belonging to one face of mesh only:
198 * element type is *SMESH.FACE*
199 * functor type is *SMESH.FT_FreeEdges*
200 * threshold value is not required
202 .. literalinclude:: ../../examples/filters_ex10.py
205 :download:`Download this script <../../examples/filters_ex10.py>`
207 **See also:** :ref:`tui_free_edges`
209 .. _filter_free_nodes:
216 * element type is *SMESH.NODE*
217 * functor type is *SMESH.FT_FreeNodes*
218 * threshold value is not required
220 .. literalinclude:: ../../examples/filters_ex11.py
223 :download:`Download this script <../../examples/filters_ex11.py>`
225 **See also:** :ref:`tui_free_nodes`
227 .. _filter_free_faces:
234 * element type is *SMESH.FACE*
235 * functor type is *SMESH.FT_FreeFaces*
236 * threshold value is not required
238 .. literalinclude:: ../../examples/filters_ex12.py
241 :download:`Download this script <../../examples/filters_ex12.py>`
243 **See also:** :ref:`tui_free_faces`
245 .. _filter_bare_border_faces:
250 filters faces with bare borders:
252 * element type is *SMESH.FACE*
253 * functor type is *SMESH.FT_BareBorderFace*
254 * threshold value is not required
256 .. literalinclude:: ../../examples/filters_ex13.py
259 :download:`Download this script <../../examples/filters_ex13.py>`
261 **See also:** :ref:`tui_bare_border_faces`
263 .. _filter_coplanar_faces:
268 filters coplanar faces:
270 * element type is *SMESH.FACE*
271 * functor type is *SMESH.FT_CoplanarFaces*
272 * threshold value is the face ID
273 * tolerance is in degrees
275 .. literalinclude:: ../../examples/filters_ex14.py
278 :download:`Download this script <../../examples/filters_ex14.py>`
280 .. _filter_over_constrained_faces:
282 Over-constrained faces
283 ======================
285 filters over-constrained faces:
287 * element type is *SMESH.FACE*
288 * functor type is *SMESH.FT_OverConstrainedFace*
289 * threshold value is not required
291 .. literalinclude:: ../../examples/filters_ex15.py
294 :download:`Download this script <../../examples/filters_ex15.py>`
296 **See also:** :ref:`tui_over_constrained_faces`
298 .. _filter_double_elements:
300 Double edges, Double faces, Double volumes
301 ##########################################
303 filters mesh elements basing on the same set of nodes:
305 * element type is either *SMESH.EDGE*, *SMESH.FACE* or *SMESH.VOLUME*
306 * functor type is either *SMESH.FT_EqualEdges*, *SMESH.FT_EqualFaces* or *SMESH.FT_EqualVolumes*,
307 * threshold value is not required
309 .. literalinclude:: ../../examples/filters_ex16.py
312 :download:`Download this script <../../examples/filters_ex16.py>`
314 .. _tui_double_nodes_control:
319 filters mesh nodes which are coincident with other nodes (within a given tolerance):
321 * element type is *SMESH.NODE*
322 * functor type is *SMESH.FT_EqualNodes*
323 * threshold value is not required
324 * default tolerance is 1.0e-7
326 .. literalinclude:: ../../examples/filters_ex17.py
329 :download:`Download this script <../../examples/filters_ex17.py>`
331 .. _filter_node_nb_conn:
333 Node connectivity number
334 ========================
336 filters nodes according to a number of elements of highest dimension connected to a node:
338 * element type should be *SMESH.NODE*
339 * functor type should be *SMESH.FT_NodeConnectivityNumber*
340 * threshold is an integer value (number of elements)
342 .. literalinclude:: ../../examples/filters_node_nb_conn.py
345 :download:`Download this script <../../examples/filters_node_nb_conn.py>`
347 .. _filter_borders_multiconnection:
349 Borders at multi-connection
350 ===========================
352 filters 1D mesh elements (segments) according to the specified number of
353 connections (faces and volumes on whose border the segment lies):
355 * element type is *SMESH.EDGE*
356 * functor type is *SMESH.FT_MultiConnection*
357 * threshold is integer value (number of connections)
359 .. literalinclude:: ../../examples/filters_ex18.py
362 :download:`Download this script <../../examples/filters_ex18.py>`
364 **See also:** :ref:`tui_borders_at_multiconnection`
366 .. _filter_borders_multiconnection_2d:
368 Borders at multi-connection 2D
369 ==============================
371 filters 2D mesh elements (faces) with the specified maximal number of
372 faces connected to a border (link between nodes, not mesh segment):
374 * element type is *SMESH.FACE*
375 * functor type is *SMESH.FT_MultiConnection2D*
376 * threshold is integer value (number of connections)
378 .. literalinclude:: ../../examples/filters_ex19.py
381 :download:`Download this script <../../examples/filters_ex19.py>`
383 **See also:** :ref:`tui_borders_at_multiconnection_2d`
390 filters 1D mesh elements (edges) according to the edge length value:
392 * element type should be *SMESH.EDGE*
393 * functor type should be *SMESH.FT_Length*
394 * threshold is floating point value (length)
396 .. literalinclude:: ../../examples/filters_ex20.py
399 :download:`Download this script <../../examples/filters_ex20.py>`
401 **See also:** :ref:`tui_length_1d`
403 .. _filter_length_2d:
408 filters 2D mesh elements (faces) according to the maximum length of its
409 edges (links between nodes):
411 * element type should be *SMESH.FACE*
412 * functor type should be *SMESH.FT_Length2D*
413 * threshold is floating point value (edge length)
415 .. literalinclude:: ../../examples/filters_ex21.py
418 :download:`Download this script <../../examples/filters_ex21.py>`
420 **See also:** :ref:`tui_length_2d`
422 .. _filter_max_element_length_2d:
427 filters 2D mesh elements (faces) according to the maximum length
428 of its edges and diagonals:
430 * element type should be *SMESH.FACE*
431 * functor type should be *SMESH.FT_MaxElementLength2D*
432 * threshold is floating point value (length)
434 .. literalinclude:: ../../examples/filters_ex22.py
437 :download:`Download this script <../../examples/filters_ex22.py>`
439 **See also:** :ref:`tui_max_element_length_2d`
441 .. _filter_max_element_length_3d:
446 filters 3D mesh elements (volumes) according to the maximum length
447 of its edges and diagonals:
449 * element type should be *SMESH.VOLUME*
450 * functor type should be *SMESH.FT_MaxElementLength3D*
451 * threshold is floating point value (edge/diagonal length)
453 .. literalinclude:: ../../examples/filters_ex23.py
456 :download:`Download this script <../../examples/filters_ex23.py>`
458 **See also:** :ref:`tui_max_element_length_3d`
460 .. _filter_bare_border_volumes:
465 filters 3D mesh elements with bare borders, i.e. having a facet not
466 shared with other volumes and without a face on it:
468 * element type is *SMESH.VOLUME*
469 * functor type is *SMESH.FT_BareBorderVolume*
470 * threshold value is not required
472 .. literalinclude:: ../../examples/filters_ex24.py
475 :download:`Download this script <../../examples/filters_ex24.py>`
477 **See also:** :ref:`tui_bare_border_volumes`
479 .. _filter_over_constrained_volumes:
481 Over-constrained volumes
482 ========================
484 filters over-constrained volumes, whose all nodes are on the mesh boundary:
486 * element type is *SMESH.VOLUME*
487 * functor type is *SMESH.FT_OverConstrainedVolume*
488 * threshold value is not required
490 .. literalinclude:: ../../examples/filters_ex25.py
493 :download:`Download this script <../../examples/filters_ex25.py>`
495 **See also:** :ref:`tui_over_constrained_faces`
497 .. _filter_belong_to_group:
502 filters mesh entities (nodes or elements) included in a mesh group
503 defined by threshold value:
505 * element type can be any, from *SMESH.NODE* to *SMESH.BALL*
506 * functor type should be *SMESH.FT_BelongToMeshGroup*
507 * threshold is mesh group object
509 .. literalinclude:: ../../examples/filters_belong2group.py
512 :download:`Download this script <../../examples/filters_belong2group.py>`
514 .. _filter_belong_to_geom:
519 filters mesh entities (nodes or elements) which all nodes lie on the
520 shape defined by threshold value:
522 * element type can be any, from *SMESH.NODE* to *SMESH.BALL*
523 * functor type should be *SMESH.FT_BelongToGeom*
524 * threshold is geometrical object
525 * tolerance is a distance between a node and the geometrical object; it is used if an node is not associated to any geometry.
527 .. literalinclude:: ../../examples/filters_ex26.py
530 :download:`Download this script <../../examples/filters_ex26.py>`
532 .. _filter_lying_on_geom:
537 filters mesh entities (nodes or elements) at least one node of which lies on the
538 shape defined by threshold value:
540 * element type can be any, from *SMESH.NODE* to *SMESH.BALL*
541 * functor type should be *SMESH.FT_LyingOnGeom*
542 * threshold is geometrical object
543 * tolerance is a distance between a node and the geometrical object;
545 it is used if an node is not associated to any geometry.
547 .. literalinclude:: ../../examples/filters_ex27.py
550 :download:`Download this script <../../examples/filters_ex27.py>`
552 .. _filter_belong_to_plane:
557 filters mesh entities (nodes or elements) which all nodes belong to the
558 plane defined by threshold value with the given tolerance:
560 * element type can be any except *SMESH.VOLUME*
561 * functor type should be *SMESH.FT_BelongToPlane*
562 * threshold is geometrical object (plane)
563 * default tolerance is 1.0e-7
565 .. literalinclude:: ../../examples/filters_ex28.py
568 :download:`Download this script <../../examples/filters_ex28.py>`
570 .. _filter_belong_to_cylinder:
575 filters mesh entities (nodes or elements) which all nodes belong to the
576 cylindrical face defined by threshold value with the given tolerance:
578 * element type can be any except *SMESH.VOLUME*
579 * functor type should be *SMESH.FT_BelongToCylinder*
580 * threshold is geometrical object (cylindrical face)
581 * default tolerance is 1.0e-7
583 .. literalinclude:: ../../examples/filters_ex29.py
586 :download:`Download this script <../../examples/filters_ex29.py>`
588 .. _filter_belong_to_surface:
593 filters mesh entities (nodes or elements) which all nodes belong to the
594 arbitrary surface defined by threshold value with the given tolerance:
596 * element type can be any except *SMESH.VOLUME*
597 * functor type should be *SMESH.FT_BelongToGenSurface*
598 * threshold is geometrical object (arbitrary surface)
599 * default tolerance is 1.0e-7
601 .. literalinclude:: ../../examples/filters_ex30.py
604 :download:`Download this script <../../examples/filters_ex30.py>`
606 .. _filter_range_of_ids:
611 filters mesh entities elements (nodes or elements) according to the
612 specified identifiers range:
614 * element type can be any, from *SMESH.NODE* to *SMESH.BALL*
615 * functor type is *SMESH.FT_RangeOfIds*
616 * threshold is string listing required IDs and/or ranges of IDs, e.g."1,2,3,50-60,63,67,70-78"
618 .. literalinclude:: ../../examples/filters_ex31.py
621 :download:`Download this script <../../examples/filters_ex31.py>`
623 .. _filter_bad_oriented_volume:
625 Badly oriented volume
626 =====================
628 filters 3D mesh elements (volumes), which are incorrectly oriented from
629 the point of view of MED convention.
631 * element type should be *SMESH.VOLUME*
632 * functor type is *SMESH.FT_BadOrientedVolume*
633 * threshold is not required
635 .. literalinclude:: ../../examples/filters_ex32.py
638 :download:`Download this script <../../examples/filters_ex32.py>`
640 .. _filter_linear_or_quadratic:
645 filters linear / quadratic mesh elements:
647 * element type should be either *SMESH.EDGE*, *SMESH.FACE* or *SMESH.VOLUME*
648 * functor type is *SMESH.FT_LinearOrQuadratic*
649 * threshold is not required
650 * if unary operator is set to SMESH.FT_LogicalNOT, the quadratic elements are selected, otherwise (by default) linear elements are selected
652 .. literalinclude:: ../../examples/filters_ex33.py
655 :download:`Download this script <../../examples/filters_ex33.py>`
657 .. _filter_group_color:
662 filters mesh entities, belonging to the group with the color defined by the threshold value.
664 * element type can be any, from *SMESH.NODE* to *SMESH.BALL*
665 * functor type is *SMESH.FT_GroupColor*
666 * threshold should be of SALOMEDS.Color type
668 .. literalinclude:: ../../examples/filters_ex34.py
671 :download:`Download this script <../../examples/filters_ex34.py>`
673 .. _filter_geom_type:
678 filters mesh elements by the geometric type defined with the threshold
679 value. The list of available geometric types depends on the element
682 * element type can be any, e.g.: *SMESH.EDGE*, *SMESH.FACE*, *SMESH.VOLUME*, etc.
683 * functor type should be *SMESH.FT_ElemGeomType*
684 * threshold is either of smesh.GeometryType values. Type *SMESH.GeometryType._items* in the Python Console to see all geometric types.
686 .. literalinclude:: ../../examples/filters_ex35.py
689 :download:`Download this script <../../examples/filters_ex35.py>`
691 .. _filter_entity_type:
696 filters mesh elements by the geometric type and number of nodes.
698 * element type can be any, e.g.: *SMESH.EDGE*, *SMESH.FACE*, *SMESH.VOLUME*, etc.
699 * functor type should be *SMESH.FT_EntityType*
700 * threshold is either of SMESH.EntityType values. Type *SMESH.EntityType._items* in the Python Console to see all entity types.
702 .. literalinclude:: ../../examples/filters_ex37.py
705 :download:`Download this script <../../examples/filters_ex37.py>`
707 .. _filter_ball_diam:
712 filters ball elements by diameter.
714 * element type should be *SMESH.BALL*
715 * functor type should be *SMESH.FT_BallDiameter*
716 * threshold is floating point value (ball diameter)
718 .. literalinclude:: ../../examples/filters_ex38.py
721 :download:`Download this script <../../examples/filters_ex38.py>`
728 filters elements of a specified domain.
730 * element type can be any, e.g.: *SMESH.EDGE*, *SMESH.FACE*, *SMESH.VOLUME*, etc.
731 * functor type should be *SMESH.FT_ConnectedElements*
732 * threshold is either (1) node ID or (2) geometrical vertex or (3) 3 coordinates of a point.
734 .. literalinclude:: ../../examples/filters_ex39.py
737 :download:`Download this script <../../examples/filters_ex39.py>`
739 .. _combining_filters:
741 How to combine several criteria into a filter?
742 ==============================================
744 Several criteria can be combined into a filter.
746 .. literalinclude:: ../../examples/filters_ex36.py
749 :download:`Download this script <../../examples/filters_ex36.py>`