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_scaled_jacobian:
69 filters 3D mesh elements (volumes) according to the scaled jacobian value:
71 * element type is *SMESH.VOLUME*
72 * functor type is *SMESH.FT_ScaledJacobian*
73 * threshold is floating point value
75 .. literalinclude:: ../../examples/filters_ex40.py
78 :download:`Download this script <../../examples/filters_ex40.py>`
80 **See also:** :ref:`tui_scaled_jacobian`
82 .. _filter_warping_angle:
87 filters 2D mesh elements (faces) according to the warping angle value:
89 * element type is *SMESH.FACE*
90 * functor type is *SMESH.FT_Warping*
91 * threshold is floating point value (warping angle)
93 .. literalinclude:: ../../examples/filters_ex03.py
96 :download:`Download this script <../../examples/filters_ex03.py>`
98 **See also:** :ref:`tui_warping`
100 .. _filter_minimum_angle:
105 filters 2D mesh elements (faces) according to the minimum angle value:
107 * element type is *SMESH.FACE*
108 * functor type is *SMESH.FT_MinimumAngle*
109 * threshold is floating point value (minimum angle)
111 .. literalinclude:: ../../examples/filters_ex04.py
114 :download:`Download this script <../../examples/filters_ex04.py>`
116 **See also:** :ref:`tui_minimum_angle`
123 filters 2D mesh elements (faces) according to the taper value:
125 * element type is *SMESH.FACE*
126 * functor type is *SMESH.FT_Taper*
127 * threshold is floating point value (taper)
129 .. literalinclude:: ../../examples/filters_ex05.py
132 :download:`Download this script <../../examples/filters_ex05.py>`
134 **See also:** :ref:`tui_taper`
141 filters 2D mesh elements (faces) according to the skew value:
143 * element type is *SMESH.FACE*
144 * functor type is *SMESH.FT_Skew*
145 * threshold is floating point value (skew)
147 .. literalinclude:: ../../examples/filters_ex06.py
150 :download:`Download this script <../../examples/filters_ex06.py>`
152 **See also:** :ref:`tui_skew`
159 filters 2D mesh elements (faces) according to the area value:
161 * element type is *SMESH.FACE*
162 * functor type is *SMESH.FT_Area*
163 * threshold is floating point value (area)
165 .. literalinclude:: ../../examples/filters_ex07.py
168 :download:`Download this script <../../examples/filters_ex07.py>`
170 **See also:** :ref:`tui_area`
177 filters 3D mesh elements (volumes) according to the volume value:
179 * element type is *SMESH.VOLUME*
180 * functor type is *SMESH.FT_Volume3D*
181 * threshold is floating point value (volume)
183 .. literalinclude:: ../../examples/filters_ex08.py
186 :download:`Download this script <../../examples/filters_ex08.py>`
188 **See also:** :ref:`tui_volume`
190 .. _filter_free_borders:
195 filters 1D mesh elements (edges) which represent free borders of a mesh:
197 * element type is *SMESH.EDGE*
198 * functor type is *SMESH.FT_FreeBorders*
199 * threshold value is not required
201 .. literalinclude:: ../../examples/filters_ex09.py
204 :download:`Download this script <../../examples/filters_ex09.py>`
206 **See also:** :ref:`tui_free_borders`
208 .. _filter_free_edges:
213 filters 2D mesh elements (faces) having edges (i.e. links between
214 nodes, not mesh segments) belonging to one face of mesh only:
216 * element type is *SMESH.FACE*
217 * functor type is *SMESH.FT_FreeEdges*
218 * threshold value is not required
220 .. literalinclude:: ../../examples/filters_ex10.py
223 :download:`Download this script <../../examples/filters_ex10.py>`
225 **See also:** :ref:`tui_free_edges`
227 .. _filter_free_nodes:
234 * element type is *SMESH.NODE*
235 * functor type is *SMESH.FT_FreeNodes*
236 * threshold value is not required
238 .. literalinclude:: ../../examples/filters_ex11.py
241 :download:`Download this script <../../examples/filters_ex11.py>`
243 **See also:** :ref:`tui_free_nodes`
245 .. _filter_free_faces:
252 * element type is *SMESH.FACE*
253 * functor type is *SMESH.FT_FreeFaces*
254 * threshold value is not required
256 .. literalinclude:: ../../examples/filters_ex12.py
259 :download:`Download this script <../../examples/filters_ex12.py>`
261 **See also:** :ref:`tui_free_faces`
263 .. _filter_bare_border_faces:
268 filters faces with bare borders:
270 * element type is *SMESH.FACE*
271 * functor type is *SMESH.FT_BareBorderFace*
272 * threshold value is not required
274 .. literalinclude:: ../../examples/filters_ex13.py
277 :download:`Download this script <../../examples/filters_ex13.py>`
279 **See also:** :ref:`tui_bare_border_faces`
281 .. _filter_coplanar_faces:
286 filters coplanar faces:
288 * element type is *SMESH.FACE*
289 * functor type is *SMESH.FT_CoplanarFaces*
290 * threshold value is the face ID
291 * tolerance is in degrees
293 .. literalinclude:: ../../examples/filters_ex14.py
296 :download:`Download this script <../../examples/filters_ex14.py>`
298 .. _filter_over_constrained_faces:
300 Over-constrained faces
301 ======================
303 filters over-constrained faces:
305 * element type is *SMESH.FACE*
306 * functor type is *SMESH.FT_OverConstrainedFace*
307 * threshold value is not required
309 .. literalinclude:: ../../examples/filters_ex15.py
312 :download:`Download this script <../../examples/filters_ex15.py>`
314 **See also:** :ref:`tui_over_constrained_faces`
316 .. _filter_double_elements:
318 Double edges, Double faces, Double volumes
319 ##########################################
321 filters mesh elements basing on the same set of nodes:
323 * element type is either *SMESH.EDGE*, *SMESH.FACE* or *SMESH.VOLUME*
324 * functor type is either *SMESH.FT_EqualEdges*, *SMESH.FT_EqualFaces* or *SMESH.FT_EqualVolumes*,
325 * threshold value is not required
327 .. literalinclude:: ../../examples/filters_ex16.py
330 :download:`Download this script <../../examples/filters_ex16.py>`
332 .. _tui_double_nodes_control:
337 filters mesh nodes which are coincident with other nodes (within a given tolerance):
339 * element type is *SMESH.NODE*
340 * functor type is *SMESH.FT_EqualNodes*
341 * threshold value is not required
342 * default tolerance is 1.0e-7
344 .. literalinclude:: ../../examples/filters_ex17.py
347 :download:`Download this script <../../examples/filters_ex17.py>`
349 .. _filter_node_nb_conn:
351 Node connectivity number
352 ========================
354 filters nodes according to a number of elements of highest dimension connected to a node:
356 * element type should be *SMESH.NODE*
357 * functor type should be *SMESH.FT_NodeConnectivityNumber*
358 * threshold is an integer value (number of elements)
360 .. 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
380 :download:`Download this script <../../examples/filters_ex18.py>`
382 **See also:** :ref:`tui_borders_at_multiconnection`
384 .. _filter_borders_multiconnection_2d:
386 Borders at multi-connection 2D
387 ==============================
389 filters 2D mesh elements (faces) with the specified maximal number of
390 faces connected to a border (link between nodes, not mesh segment):
392 * element type is *SMESH.FACE*
393 * functor type is *SMESH.FT_MultiConnection2D*
394 * threshold is integer value (number of connections)
396 .. literalinclude:: ../../examples/filters_ex19.py
399 :download:`Download this script <../../examples/filters_ex19.py>`
401 **See also:** :ref:`tui_borders_at_multiconnection_2d`
408 filters 1D mesh elements (edges) according to the edge length value:
410 * element type should be *SMESH.EDGE*
411 * functor type should be *SMESH.FT_Length*
412 * threshold is floating point value (length)
414 .. literalinclude:: ../../examples/filters_ex20.py
417 :download:`Download this script <../../examples/filters_ex20.py>`
419 **See also:** :ref:`tui_length_1d`
421 .. _filter_length_2d:
426 filters 2D mesh elements (faces) according to the maximum length of its
427 edges (links between nodes):
429 * element type should be *SMESH.FACE*
430 * functor type should be *SMESH.FT_Length2D*
431 * threshold is floating point value (edge length)
433 .. literalinclude:: ../../examples/filters_ex21.py
436 :download:`Download this script <../../examples/filters_ex21.py>`
438 **See also:** :ref:`tui_length_2d`
440 .. _filter_max_element_length_2d:
445 filters 2D mesh elements (faces) according to the maximum length
446 of its edges and diagonals:
448 * element type should be *SMESH.FACE*
449 * functor type should be *SMESH.FT_MaxElementLength2D*
450 * threshold is floating point value (length)
452 .. literalinclude:: ../../examples/filters_ex22.py
455 :download:`Download this script <../../examples/filters_ex22.py>`
457 **See also:** :ref:`tui_max_element_length_2d`
459 .. _filter_max_element_length_3d:
464 filters 3D mesh elements (volumes) according to the maximum length
465 of its edges and diagonals:
467 * element type should be *SMESH.VOLUME*
468 * functor type should be *SMESH.FT_MaxElementLength3D*
469 * threshold is floating point value (edge/diagonal length)
471 .. literalinclude:: ../../examples/filters_ex23.py
474 :download:`Download this script <../../examples/filters_ex23.py>`
476 **See also:** :ref:`tui_max_element_length_3d`
478 .. _filter_bare_border_volumes:
483 filters 3D mesh elements with bare borders, i.e. having a facet not
484 shared with other volumes and without a face on it:
486 * element type is *SMESH.VOLUME*
487 * functor type is *SMESH.FT_BareBorderVolume*
488 * threshold value is not required
490 .. literalinclude:: ../../examples/filters_ex24.py
493 :download:`Download this script <../../examples/filters_ex24.py>`
495 **See also:** :ref:`tui_bare_border_volumes`
497 .. _filter_over_constrained_volumes:
499 Over-constrained volumes
500 ========================
502 filters over-constrained volumes, whose all nodes are on the mesh boundary:
504 * element type is *SMESH.VOLUME*
505 * functor type is *SMESH.FT_OverConstrainedVolume*
506 * threshold value is not required
508 .. literalinclude:: ../../examples/filters_ex25.py
511 :download:`Download this script <../../examples/filters_ex25.py>`
513 **See also:** :ref:`tui_over_constrained_faces`
515 .. _filter_belong_to_group:
520 filters mesh entities (nodes or elements) included in a mesh group
521 defined by threshold value:
523 * element type can be any, from *SMESH.NODE* to *SMESH.BALL*
524 * functor type should be *SMESH.FT_BelongToMeshGroup*
525 * threshold is mesh group object
527 .. literalinclude:: ../../examples/filters_belong2group.py
530 :download:`Download this script <../../examples/filters_belong2group.py>`
532 .. _filter_belong_to_geom:
537 filters mesh entities (nodes or elements) which all nodes lie 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_BelongToGeom*
542 * threshold is geometrical object
543 * tolerance is a distance between a node and the geometrical object; it is used if an node is not associated to any geometry.
545 .. literalinclude:: ../../examples/filters_ex26.py
548 :download:`Download this script <../../examples/filters_ex26.py>`
550 .. _filter_lying_on_geom:
555 filters mesh entities (nodes or elements) at least one node of which lies on the
556 shape defined by threshold value:
558 * element type can be any, from *SMESH.NODE* to *SMESH.BALL*
559 * functor type should be *SMESH.FT_LyingOnGeom*
560 * threshold is geometrical object
561 * tolerance is a distance between a node and the geometrical object;
563 it is used if an node is not associated to any geometry.
565 .. literalinclude:: ../../examples/filters_ex27.py
568 :download:`Download this script <../../examples/filters_ex27.py>`
570 .. _filter_belong_to_plane:
575 filters mesh entities (nodes or elements) which all nodes belong to the
576 plane defined by threshold value with the given tolerance:
578 * element type can be any except *SMESH.VOLUME*
579 * functor type should be *SMESH.FT_BelongToPlane*
580 * threshold is geometrical object (plane)
581 * default tolerance is 1.0e-7
583 .. literalinclude:: ../../examples/filters_ex28.py
586 :download:`Download this script <../../examples/filters_ex28.py>`
588 .. _filter_belong_to_cylinder:
593 filters mesh entities (nodes or elements) which all nodes belong to the
594 cylindrical face defined by threshold value with the given tolerance:
596 * element type can be any except *SMESH.VOLUME*
597 * functor type should be *SMESH.FT_BelongToCylinder*
598 * threshold is geometrical object (cylindrical face)
599 * default tolerance is 1.0e-7
601 .. literalinclude:: ../../examples/filters_ex29.py
604 :download:`Download this script <../../examples/filters_ex29.py>`
606 .. _filter_belong_to_surface:
611 filters mesh entities (nodes or elements) which all nodes belong to the
612 arbitrary surface defined by threshold value with the given tolerance:
614 * element type can be any except *SMESH.VOLUME*
615 * functor type should be *SMESH.FT_BelongToGenSurface*
616 * threshold is geometrical object (arbitrary surface)
617 * default tolerance is 1.0e-7
619 .. literalinclude:: ../../examples/filters_ex30.py
622 :download:`Download this script <../../examples/filters_ex30.py>`
624 .. _filter_range_of_ids:
629 filters mesh entities elements (nodes or elements) according to the
630 specified identifiers range:
632 * element type can be any, from *SMESH.NODE* to *SMESH.BALL*
633 * functor type is *SMESH.FT_RangeOfIds*
634 * threshold is string listing required IDs and/or ranges of IDs, e.g."1,2,3,50-60,63,67,70-78"
636 .. literalinclude:: ../../examples/filters_ex31.py
639 :download:`Download this script <../../examples/filters_ex31.py>`
641 .. _filter_bad_oriented_volume:
643 Badly oriented volume
644 =====================
646 filters 3D mesh elements (volumes), which are incorrectly oriented from
647 the point of view of MED convention.
649 * element type should be *SMESH.VOLUME*
650 * functor type is *SMESH.FT_BadOrientedVolume*
651 * threshold is not required
653 .. literalinclude:: ../../examples/filters_ex32.py
656 :download:`Download this script <../../examples/filters_ex32.py>`
658 .. _filter_linear_or_quadratic:
663 filters linear / quadratic mesh elements:
665 * element type should be either *SMESH.EDGE*, *SMESH.FACE* or *SMESH.VOLUME*
666 * functor type is *SMESH.FT_LinearOrQuadratic*
667 * threshold is not required
668 * if unary operator is set to SMESH.FT_LogicalNOT, the quadratic elements are selected, otherwise (by default) linear elements are selected
670 .. literalinclude:: ../../examples/filters_ex33.py
673 :download:`Download this script <../../examples/filters_ex33.py>`
675 .. _filter_group_color:
680 filters mesh entities, belonging to the group with the color defined by the threshold value.
682 * element type can be any, from *SMESH.NODE* to *SMESH.BALL*
683 * functor type is *SMESH.FT_GroupColor*
684 * threshold should be of SALOMEDS.Color type
686 .. literalinclude:: ../../examples/filters_ex34.py
689 :download:`Download this script <../../examples/filters_ex34.py>`
691 .. _filter_geom_type:
696 filters mesh elements by the geometric type defined with the threshold
697 value. The list of available geometric types depends on the element
700 * element type can be any, e.g.: *SMESH.EDGE*, *SMESH.FACE*, *SMESH.VOLUME*, etc.
701 * functor type should be *SMESH.FT_ElemGeomType*
702 * threshold is either of smesh.GeometryType values. Type *SMESH.GeometryType._items* in the Python Console to see all geometric types.
704 .. literalinclude:: ../../examples/filters_ex35.py
707 :download:`Download this script <../../examples/filters_ex35.py>`
709 .. _filter_entity_type:
714 filters mesh elements by the geometric type and number of nodes.
716 * element type can be any, e.g.: *SMESH.EDGE*, *SMESH.FACE*, *SMESH.VOLUME*, etc.
717 * functor type should be *SMESH.FT_EntityType*
718 * threshold is either of SMESH.EntityType values. Type *SMESH.EntityType._items* in the Python Console to see all entity types.
720 .. literalinclude:: ../../examples/filters_ex37.py
723 :download:`Download this script <../../examples/filters_ex37.py>`
725 .. _filter_ball_diam:
730 filters ball elements by diameter.
732 * element type should be *SMESH.BALL*
733 * functor type should be *SMESH.FT_BallDiameter*
734 * threshold is floating point value (ball diameter)
736 .. literalinclude:: ../../examples/filters_ex38.py
739 :download:`Download this script <../../examples/filters_ex38.py>`
746 filters elements of a specified domain.
748 * element type can be any, e.g.: *SMESH.EDGE*, *SMESH.FACE*, *SMESH.VOLUME*, etc.
749 * functor type should be *SMESH.FT_ConnectedElements*
750 * threshold is either (1) node ID or (2) geometrical vertex or (3) 3 coordinates of a point.
752 .. literalinclude:: ../../examples/filters_ex39.py
755 :download:`Download this script <../../examples/filters_ex39.py>`
757 .. _combining_filters:
759 How to combine several criteria into a filter?
760 ==============================================
762 Several criteria can be combined into a filter.
764 .. literalinclude:: ../../examples/filters_ex36.py
767 :download:`Download this script <../../examples/filters_ex36.py>`