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
43 :download:`Download this script <../../../examples/filters_ex01.py>`
45 **See also:** :ref:`tui_aspect_ratio`
47 .. _filter_aspect_ratio_3d:
52 filters 3D mesh elements (volumes) according to the aspect ratio value:
54 * element type is *SMESH.VOLUME*
55 * functor type is *SMESH.FT_AspectRatio3D*
56 * threshold is floating point value (aspect ratio)
58 .. literalinclude:: ../../../examples/filters_ex02.py
62 :download:`Download this script <../../../examples/filters_ex02.py>`
64 **See also:** :ref:`tui_aspect_ratio_3d`
66 .. _filter_warping_angle:
71 filters 2D mesh elements (faces) according to the warping angle value:
73 * element type is *SMESH.FACE*
74 * functor type is *SMESH.FT_Warping*
75 * threshold is floating point value (warping angle)
77 .. literalinclude:: ../../../examples/filters_ex03.py
81 :download:`Download this script <../../../examples/filters_ex03.py>`
83 **See also:** :ref:`tui_warping`
85 .. _filter_minimum_angle:
90 filters 2D mesh elements (faces) according to the minimum angle value:
92 * element type is *SMESH.FACE*
93 * functor type is *SMESH.FT_MinimumAngle*
94 * threshold is floating point value (minimum angle)
96 .. literalinclude:: ../../../examples/filters_ex04.py
100 :download:`Download this script <../../../examples/filters_ex04.py>`
102 **See also:** :ref:`tui_minimum_angle`
109 filters 2D mesh elements (faces) according to the taper value:
111 * element type is *SMESH.FACE*
112 * functor type is *SMESH.FT_Taper*
113 * threshold is floating point value (taper)
115 .. literalinclude:: ../../../examples/filters_ex05.py
119 :download:`Download this script <../../../examples/filters_ex05.py>`
121 **See also:** :ref:`tui_taper`
128 filters 2D mesh elements (faces) according to the skew value:
130 * element type is *SMESH.FACE*
131 * functor type is *SMESH.FT_Skew*
132 * threshold is floating point value (skew)
134 .. literalinclude:: ../../../examples/filters_ex06.py
138 :download:`Download this script <../../../examples/filters_ex06.py>`
140 **See also:** :ref:`tui_skew`
147 filters 2D mesh elements (faces) according to the area value:
149 * element type is *SMESH.FACE*
150 * functor type is *SMESH.FT_Area*
151 * threshold is floating point value (area)
153 .. literalinclude:: ../../../examples/filters_ex07.py
157 :download:`Download this script <../../../examples/filters_ex07.py>`
159 **See also:** :ref:`tui_area`
166 filters 3D mesh elements (volumes) according to the volume value:
168 * element type is *SMESH.VOLUME*
169 * functor type is *SMESH.FT_Volume3D*
170 * threshold is floating point value (volume)
172 .. literalinclude:: ../../../examples/filters_ex08.py
176 :download:`Download this script <../../../examples/filters_ex08.py>`
178 **See also:** :ref:`tui_volume`
180 .. _filter_free_borders:
185 filters 1D mesh elements (edges) which represent free borders of a mesh:
187 * element type is *SMESH.EDGE*
188 * functor type is *SMESH.FT_FreeBorders*
189 * threshold value is not required
191 .. literalinclude:: ../../../examples/filters_ex09.py
195 :download:`Download this script <../../../examples/filters_ex09.py>`
197 **See also:** :ref:`tui_free_borders`
199 .. _filter_free_edges:
204 filters 2D mesh elements (faces) having edges (i.e. links between
205 nodes, not mesh segments) belonging to one face of mesh only:
207 * element type is *SMESH.FACE*
208 * functor type is *SMESH.FT_FreeEdges*
209 * threshold value is not required
211 .. literalinclude:: ../../../examples/filters_ex10.py
215 :download:`Download this script <../../../examples/filters_ex10.py>`
217 **See also:** :ref:`tui_free_edges`
219 .. _filter_free_nodes:
226 * element type is *SMESH.NODE*
227 * functor type is *SMESH.FT_FreeNodes*
228 * threshold value is not required
230 .. literalinclude:: ../../../examples/filters_ex11.py
234 :download:`Download this script <../../../examples/filters_ex11.py>`
236 **See also:** :ref:`tui_free_nodes`
238 .. _filter_free_faces:
245 * element type is *SMESH.FACE*
246 * functor type is *SMESH.FT_FreeFaces*
247 * threshold value is not required
249 .. literalinclude:: ../../../examples/filters_ex12.py
253 :download:`Download this script <../../../examples/filters_ex12.py>`
255 **See also:** :ref:`tui_free_faces`
257 .. _filter_bare_border_faces:
262 filters faces with bare borders:
264 * element type is *SMESH.FACE*
265 * functor type is *SMESH.FT_BareBorderFace*
266 * threshold value is not required
268 .. literalinclude:: ../../../examples/filters_ex13.py
272 :download:`Download this script <../../../examples/filters_ex13.py>`
274 **See also:** :ref:`tui_bare_border_faces`
276 .. _filter_coplanar_faces:
281 filters coplanar faces:
283 * element type is *SMESH.FACE*
284 * functor type is *SMESH.FT_CoplanarFaces*
285 * threshold value is the face ID
286 * tolerance is in degrees
288 .. literalinclude:: ../../../examples/filters_ex14.py
292 :download:`Download this script <../../../examples/filters_ex14.py>`
294 .. _filter_over_constrained_faces:
296 Over-constrained faces
297 ======================
299 filters over-constrained faces:
301 * element type is *SMESH.FACE*
302 * functor type is *SMESH.FT_OverConstrainedFace*
303 * threshold value is not required
305 .. literalinclude:: ../../../examples/filters_ex15.py
309 :download:`Download this script <../../../examples/filters_ex15.py>`
311 **See also:** :ref:`tui_over_constrained_faces`
313 .. _filter_double_elements:
315 Double edges, Double faces, Double volumes
316 ##########################################
318 filters mesh elements basing on the same set of nodes:
320 * element type is either *SMESH.EDGE*, *SMESH.FACE* or *SMESH.VOLUME*
321 * functor type is either *SMESH.FT_EqualEdges*, *SMESH.FT_EqualFaces* or *SMESH.FT_EqualVolumes*,
322 * threshold value is not required
324 .. literalinclude:: ../../../examples/filters_ex16.py
328 :download:`Download this script <../../../examples/filters_ex16.py>`
330 .. _tui_double_nodes_control:
335 filters mesh nodes which are coincident with other nodes (within a given tolerance):
337 * element type is *SMESH.NODE*
338 * functor type is *SMESH.FT_EqualNodes*
339 * threshold value is not required
340 * default tolerance is 1.0e-7
342 .. literalinclude:: ../../../examples/filters_ex17.py
346 :download:`Download this script <../../../examples/filters_ex17.py>`
348 .. _filter_node_nb_conn:
350 Node connectivity number
351 ========================
353 filters nodes according to a number of elements of highest dimension connected to a node:
355 * element type should be *SMESH.NODE*
356 * functor type should be *SMESH.FT_NodeConnectivityNumber*
357 * threshold is an integer value (number of elements)
359 .. literalinclude:: ../../../examples/filters_node_nb_conn.py
363 :download:`Download this script <../../../examples/filters_node_nb_conn.py>`
365 .. _filter_borders_multiconnection:
367 Borders at multi-connection
368 ===========================
370 filters 1D mesh elements (segments) according to the specified number of
371 connections (faces and volumes on whose border the segment lies):
373 * element type is *SMESH.EDGE*
374 * functor type is *SMESH.FT_MultiConnection*
375 * threshold is integer value (number of connections)
377 .. literalinclude:: ../../../examples/filters_ex18.py
381 :download:`Download this script <../../../examples/filters_ex18.py>`
383 **See also:** :ref:`tui_borders_at_multiconnection`
385 .. _filter_borders_multiconnection_2d:
387 Borders at multi-connection 2D
388 ==============================
390 filters 2D mesh elements (faces) with the specified maximal number of
391 faces connected to a border (link between nodes, not mesh segment):
393 * element type is *SMESH.FACE*
394 * functor type is *SMESH.FT_MultiConnection2D*
395 * threshold is integer value (number of connections)
397 .. literalinclude:: ../../../examples/filters_ex19.py
401 :download:`Download this script <../../../examples/filters_ex19.py>`
403 **See also:** :ref:`tui_borders_at_multiconnection_2d`
410 filters 1D mesh elements (edges) according to the edge length value:
412 * element type should be *SMESH.EDGE*
413 * functor type should be *SMESH.FT_Length*
414 * threshold is floating point value (length)
416 .. literalinclude:: ../../../examples/filters_ex20.py
420 :download:`Download this script <../../../examples/filters_ex20.py>`
422 **See also:** :ref:`tui_length_1d`
424 .. _filter_length_2d:
429 filters 2D mesh elements (faces) according to the maximum length of its
430 edges (links between nodes):
432 * element type should be *SMESH.FACE*
433 * functor type should be *SMESH.FT_Length2D*
434 * threshold is floating point value (edge length)
436 .. literalinclude:: ../../../examples/filters_ex21.py
440 :download:`Download this script <../../../examples/filters_ex21.py>`
442 **See also:** :ref:`tui_length_2d`
444 .. _filter_max_element_length_2d:
449 filters 2D mesh elements (faces) according to the maximum length
450 of its edges and diagonals:
452 * element type should be *SMESH.FACE*
453 * functor type should be *SMESH.FT_MaxElementLength2D*
454 * threshold is floating point value (length)
456 .. literalinclude:: ../../../examples/filters_ex22.py
460 :download:`Download this script <../../../examples/filters_ex22.py>`
462 **See also:** :ref:`tui_max_element_length_2d`
464 .. _filter_max_element_length_3d:
469 filters 3D mesh elements (volumes) according to the maximum length
470 of its edges and diagonals:
472 * element type should be *SMESH.VOLUME*
473 * functor type should be *SMESH.FT_MaxElementLength3D*
474 * threshold is floating point value (edge/diagonal length)
476 .. literalinclude:: ../../../examples/filters_ex23.py
480 :download:`Download this script <../../../examples/filters_ex23.py>`
482 **See also:** :ref:`tui_max_element_length_3d`
484 .. _filter_bare_border_volumes:
489 filters 3D mesh elements with bare borders, i.e. having a facet not
490 shared with other volumes and without a face on it:
492 * element type is *SMESH.VOLUME*
493 * functor type is *SMESH.FT_BareBorderVolume*
494 * threshold value is not required
496 .. literalinclude:: ../../../examples/filters_ex24.py
500 :download:`Download this script <../../../examples/filters_ex24.py>`
502 **See also:** :ref:`tui_bare_border_volumes`
504 .. _filter_over_constrained_volumes:
506 Over-constrained volumes
507 ========================
509 filters over-constrained volumes, whose all nodes are on the mesh boundary:
511 * element type is *SMESH.VOLUME*
512 * functor type is *SMESH.FT_OverConstrainedVolume*
513 * threshold value is not required
515 .. literalinclude:: ../../../examples/filters_ex25.py
519 :download:`Download this script <../../../examples/filters_ex25.py>`
521 **See also:** :ref:`tui_over_constrained_faces`
523 .. _filter_belong_to_group:
528 filters mesh entities (nodes or elements) included in a mesh group
529 defined by threshold value:
531 * element type can be any, from *SMESH.NODE* to *SMESH.BALL*
532 * functor type should be *SMESH.FT_BelongToMeshGroup*
533 * threshold is mesh group object
535 .. literalinclude:: ../../../examples/filters_belong2group.py
539 :download:`Download this script <../../../examples/filters_belong2group.py>`
541 .. _filter_belong_to_geom:
546 filters mesh entities (nodes or elements) which all nodes lie on the
547 shape defined by threshold value:
549 * element type can be any, from *SMESH.NODE* to *SMESH.BALL*
550 * functor type should be *SMESH.FT_BelongToGeom*
551 * threshold is geometrical object
552 * tolerance is a distance between a node and the geometrical object; it is used if an node is not associated to any geometry.
554 .. literalinclude:: ../../../examples/filters_ex26.py
558 :download:`Download this script <../../../examples/filters_ex26.py>`
560 .. _filter_lying_on_geom:
565 filters mesh entities (nodes or elements) at least one node of which lies on the
566 shape defined by threshold value:
568 * element type can be any, from *SMESH.NODE* to *SMESH.BALL*
569 * functor type should be *SMESH.FT_LyingOnGeom*
570 * threshold is geometrical object
571 * tolerance is a distance between a node and the geometrical object;
573 it is used if an node is not associated to any geometry.
575 .. literalinclude:: ../../../examples/filters_ex27.py
579 :download:`Download this script <../../../examples/filters_ex27.py>`
581 .. _filter_belong_to_plane:
586 filters mesh entities (nodes or elements) which all nodes belong to the
587 plane defined by threshold value with the given tolerance:
589 * element type can be any except *SMESH.VOLUME*
590 * functor type should be *SMESH.FT_BelongToPlane*
591 * threshold is geometrical object (plane)
592 * default tolerance is 1.0e-7
594 .. literalinclude:: ../../../examples/filters_ex28.py
598 :download:`Download this script <../../../examples/filters_ex28.py>`
600 .. _filter_belong_to_cylinder:
605 filters mesh entities (nodes or elements) which all nodes belong to the
606 cylindrical face defined by threshold value with the given tolerance:
608 * element type can be any except *SMESH.VOLUME*
609 * functor type should be *SMESH.FT_BelongToCylinder*
610 * threshold is geometrical object (cylindrical face)
611 * default tolerance is 1.0e-7
613 .. literalinclude:: ../../../examples/filters_ex29.py
617 :download:`Download this script <../../../examples/filters_ex29.py>`
619 .. _filter_belong_to_surface:
624 filters mesh entities (nodes or elements) which all nodes belong to the
625 arbitrary surface defined by threshold value with the given tolerance:
627 * element type can be any except *SMESH.VOLUME*
628 * functor type should be *SMESH.FT_BelongToGenSurface*
629 * threshold is geometrical object (arbitrary surface)
630 * default tolerance is 1.0e-7
632 .. literalinclude:: ../../../examples/filters_ex30.py
636 :download:`Download this script <../../../examples/filters_ex30.py>`
638 .. _filter_range_of_ids:
643 filters mesh entities elements (nodes or elements) according to the
644 specified identifiers range:
646 * element type can be any, from *SMESH.NODE* to *SMESH.BALL*
647 * functor type is *SMESH.FT_RangeOfIds*
648 * threshold is string listing required IDs and/or ranges of IDs, e.g."1,2,3,50-60,63,67,70-78"
650 .. literalinclude:: ../../../examples/filters_ex31.py
654 :download:`Download this script <../../../examples/filters_ex31.py>`
656 .. _filter_bad_oriented_volume:
658 Badly oriented volume
659 =====================
661 filters 3D mesh elements (volumes), which are incorrectly oriented from
662 the point of view of MED convention.
664 * element type should be *SMESH.VOLUME*
665 * functor type is *SMESH.FT_BadOrientedVolume*
666 * threshold is not required
668 .. literalinclude:: ../../../examples/filters_ex32.py
672 :download:`Download this script <../../../examples/filters_ex32.py>`
674 .. _filter_linear_or_quadratic:
679 filters linear / quadratic mesh elements:
681 * element type should be either *SMESH.EDGE*, *SMESH.FACE* or *SMESH.VOLUME*
682 * functor type is *SMESH.FT_LinearOrQuadratic*
683 * threshold is not required
684 * if unary operator is set to SMESH.FT_LogicalNOT, the quadratic elements are selected, otherwise (by default) linear elements are selected
686 .. literalinclude:: ../../../examples/filters_ex33.py
690 :download:`Download this script <../../../examples/filters_ex33.py>`
692 .. _filter_group_color:
697 filters mesh entities, belonging to the group with the color defined by the threshold value.
699 * element type can be any, from *SMESH.NODE* to *SMESH.BALL*
700 * functor type is *SMESH.FT_GroupColor*
701 * threshold should be of SALOMEDS.Color type
703 .. literalinclude:: ../../../examples/filters_ex34.py
707 :download:`Download this script <../../../examples/filters_ex34.py>`
709 .. _filter_geom_type:
714 filters mesh elements by the geometric type defined with the threshold
715 value. The list of available geometric types depends on the element
718 * element type can be any, e.g.: *SMESH.EDGE*, *SMESH.FACE*, *SMESH.VOLUME*, etc.
719 * functor type should be *SMESH.FT_ElemGeomType*
720 * threshold is either of smesh.GeometryType values. Type *SMESH.GeometryType._items* in the Python Console to see all geometric types.
722 .. literalinclude:: ../../../examples/filters_ex35.py
726 :download:`Download this script <../../../examples/filters_ex35.py>`
728 .. _filter_entity_type:
733 filters mesh elements by the geometric type and number of nodes.
735 * element type can be any, e.g.: *SMESH.EDGE*, *SMESH.FACE*, *SMESH.VOLUME*, etc.
736 * functor type should be *SMESH.FT_EntityType*
737 * threshold is either of SMESH.EntityType values. Type *SMESH.EntityType._items* in the Python Console to see all entity types.
739 .. literalinclude:: ../../../examples/filters_ex37.py
743 :download:`Download this script <../../../examples/filters_ex37.py>`
745 .. _filter_ball_diam:
750 filters ball elements by diameter.
752 * element type should be *SMESH.BALL*
753 * functor type should be *SMESH.FT_BallDiameter*
754 * threshold is floating point value (ball diameter)
756 .. literalinclude:: ../../../examples/filters_ex38.py
760 :download:`Download this script <../../../examples/filters_ex38.py>`
767 filters elements of a specified domain.
769 * element type can be any, e.g.: *SMESH.EDGE*, *SMESH.FACE*, *SMESH.VOLUME*, etc.
770 * functor type should be *SMESH.FT_ConnectedElements*
771 * threshold is either (1) node ID or (2) geometrical vertex or (3) 3 coordinates of a point.
773 .. literalinclude:: ../../../examples/filters_ex39.py
777 :download:`Download this script <../../../examples/filters_ex39.py>`
779 .. _combining_filters:
781 How to combine several criteria into a filter?
782 ==============================================
784 Several criteria can be combined into a filter.
786 .. literalinclude:: ../../../examples/filters_ex36.py
790 :download:`Download this script <../../../examples/filters_ex36.py>`