Salome HOME
0020749: EDF 1291 SMESH : Create 2D Mesh from 3D improvement
[modules/smesh.git] / doc / salome / gui / SMESH / input / tui_filters.doc
1 /*!
2
3 \page tui_filters_page Filters usage
4
5 Filters allow picking only the mesh elements satisfying to a
6 specific condition or a set of conditions. Filters can be used to create
7 or edit mesh groups, remove elements from the mesh object, control
8 mesh quality by different parameters, etc.
9
10 Several filters can be combined together by using logical operators \a
11 AND and \a OR. In addition, applied filter criterion can be reverted
12 using logical operator \a NOT.
13
14 Mesh filters use the functionality of mesh quality controls to filter
15 mesh nodes / elements by a specific characteristic (Area, Length, etc).
16
17 This page provides a short description of the existing mesh filters,
18 describes required parameters and gives simple examples of usage in
19 Python scripts.
20
21 \sa \ref tui_quality_controls_page
22
23 \section filter_aspect_ratio Aspect ratio
24
25 Filter 2D mesh elements (faces) according to the aspect ratio value:
26 - element type should be \a smesh.FACE
27 - functor type should be \a smesh.FT_AspectRatio
28 - threshold is floating point value (aspect ratio)
29
30 \code
31 # create mesh
32 from SMESH_mechanic import *
33 # get faces with aspect ratio > 6.5
34 filter = smesh.GetFilter(smesh.FACE, smesh.FT_AspectRatio, smesh.FT_MoreThan, 6.5)
35 ids = mesh.GetIdsFromFilter(filter)
36 print "Number of faces with aspect ratio > 6.5:", len(ids)
37 \endcode
38
39 \sa \ref tui_aspect_ratio
40
41 \section filter_aspect_ratio_3d Aspect ratio 3D
42
43 Filter 3D mesh elements (volumes) according to the aspect ratio value:
44 - element type is \a smesh.VOLUME
45 - functor type is \a smesh.FT_AspectRatio3D
46 - threshold is floating point value (aspect ratio)
47
48 \code
49 # create mesh with volumes
50 from SMESH_mechanic import *
51 mesh.Tetrahedron( algo=smesh.NETGEN )
52 mesh.Compute()
53 # get volumes with aspect ratio < 2.0
54 filter = smesh.GetFilter(smesh.VOLUME, smesh.FT_AspectRatio3D, smesh.FT_LessThan, 2.0)
55 ids = mesh.GetIdsFromFilter(filter)
56 print "Number of volumes with aspect ratio < 2.0:", len(ids)
57 \endcode
58
59 \sa \ref tui_aspect_ratio_3d
60
61 \section filter_warping_angle Warping angle
62
63 Filter 2D mesh elements (faces) according to the warping angle value:
64 - element type is \a smesh.FACE
65 - functor type is \a smesh.FT_Warping
66 - threshold is floating point value (warping angle)
67
68 \code
69 # create mesh
70 from SMESH_mechanic import *
71 # get faces with warping angle = 2.0e-13 with tolerance 5.0e-14
72 criterion = smesh.GetCriterion(smesh.FACE, smesh.FT_Warping, smesh.FT_EqualTo, 2.0e-13)
73 criterion.Tolerance = 5.0e-14
74 filter = smesh.CreateFilterManager().CreateFilter()
75 filter.SetCriteria([criterion])
76 ids = mesh.GetIdsFromFilter(filter)
77 print "Number of faces with warping angle = 2.0e-13 (tolerance 5.0e-14):", len(ids)
78 \endcode
79
80 \sa \ref tui_warping
81
82 \section filter_minimum_angle Minimum angle
83
84 Filter 2D mesh elements (faces) according to the minimum angle value:
85 - element type is \a smesh.FACE
86 - functor type is \a smesh.FT_MinimumAngle
87 - threshold is floating point value (minimum angle)
88
89 \code
90 # create mesh
91 from SMESH_mechanic import *
92 # get faces with minimum angle > 75
93 filter = smesh.GetFilter(smesh.FACE, smesh.FT_MinimumAngle, smesh.FT_MoreThan, 75)
94 ids = mesh.GetIdsFromFilter(filter)
95 print "Number of faces with minimum angle > 75:", len(ids)
96 \endcode
97
98 \sa \ref tui_minimum_angle
99
100 \section filter_taper Taper
101
102 Filter 2D mesh elements (faces) according to the taper value:
103 - element type is \a smesh.FACE
104 - functor type is \a smesh.FT_Taper
105 - threshold is floating point value (taper)
106
107 \code
108 # create mesh
109 from SMESH_mechanic import *
110 # get faces with taper < 1.e-15
111 filter = smesh.GetFilter(smesh.FACE, smesh.FT_Taper, smesh.FT_LessThan, 1.e-15)
112 ids = mesh.GetIdsFromFilter(filter)
113 print "Number of faces with taper < 1.e-15:", len(ids)
114 \endcode
115
116 \sa \ref tui_taper
117
118 \section filter_skew Skew
119
120 Filter 2D mesh elements (faces) according to the skew value:
121 - element type is \a smesh.FACE
122 - functor type is \a smesh.FT_Skew
123 - threshold is floating point value (skew)
124
125 \code
126 # create mesh
127 from SMESH_mechanic import *
128 # get faces with skew > 50
129 filter = smesh.GetFilter(smesh.FACE, smesh.FT_Skew, smesh.FT_MoreThan, 50)
130 ids = mesh.GetIdsFromFilter(filter)
131 print "Number of faces with skew > 50:", len(ids)
132 \endcode
133
134 \sa \ref tui_skew
135
136 \section filter_area Area
137
138 Filter 2D mesh elements (faces) according to the area value:
139 - element type is \a smesh.FACE
140 - functor type is \a smesh.FT_Area
141 - threshold is floating point value (area)
142
143 \code
144 # create mesh
145 from SMESH_mechanic import *
146 # get faces with area > 60 and < 90
147 criterion1 = smesh.GetCriterion(smesh.FACE, smesh.FT_Area, smesh.FT_MoreThan, 60,\
148                                 smesh.FT_Undefined, smesh.FT_LogicalAND)
149 criterion2 = smesh.GetCriterion(smesh.FACE, smesh.FT_Area, smesh.FT_LessThan, 90)
150 filter = smesh.CreateFilterManager().CreateFilter()
151 filter.SetCriteria([criterion1,criterion2])
152 ids = mesh.GetIdsFromFilter(filter)
153 print "Number of faces with area in range (60,90):", len(ids)
154 \endcode
155
156 \sa \ref tui_area
157
158 \section filter_volume Volume
159
160 Filter 3D mesh elements (volumes) according to the volume value:
161 - element type is \a smesh.VOLUME
162 - functor type is \a smesh.FT_Volume3D
163 - threshold is floating point value (volume)
164
165 \code
166 # create mesh with volumes
167 from SMESH_mechanic import *
168 mesh.Tetrahedron( algo=smesh.NETGEN )
169 mesh.Compute()
170 # get volumes faces with volume > 100
171 filter = smesh.GetFilter(smesh.VOLUME, smesh.FT_Volume3D, smesh.FT_MoreThan, 100)
172 ids = mesh.GetIdsFromFilter(filter)
173 print "Number of volumes with volume > 100:", len(ids)
174 \endcode
175
176 \sa \ref tui_volume
177
178 \section filter_free_borders Free borders
179
180 Filter 1D mesh elements (edges) which represent free borders of a mesh:
181 - element type is \a smesh.EDGE
182 - functor type is \a smesh.FT_FreeBorders
183 - threshold value is not required
184
185 \code
186 # create mesh
187 import geompy, smesh, StdMeshers
188 face = geompy.MakeFaceHW(100, 100, 1)
189 geompy.addToStudy( face, "quadrangle" )
190 mesh = smesh.Mesh(face)
191 mesh.Segment().NumberOfSegments(10)
192 mesh.Triangle().MaxElementArea(25)
193 mesh.Compute()
194 # get all free borders
195 filter = smesh.GetFilter(smesh.EDGE, smesh.FT_FreeBorders)
196 ids = mesh.GetIdsFromFilter(filter)
197 print "Number of edges on free borders:", len(ids)
198 \endcode
199
200 \sa \ref tui_free_borders
201
202 \section filter_free_edges Free edges
203
204 Filter 2D mesh elements (faces) consisting of edges belonging to one
205 element of mesh only:
206 - element type is \a smesh.FACE
207 - functor type is \a smesh.FT_FreeEdges
208 - threshold value is not required
209
210 \code
211 # create mesh
212 import geompy, smesh, StdMeshers
213 face = geompy.MakeFaceHW(100, 100, 1)
214 geompy.addToStudy( face, "quadrangle" )
215 mesh = smesh.Mesh(face)
216 mesh.Segment().NumberOfSegments(10)
217 mesh.Triangle().MaxElementArea(25)
218 mesh.Compute()
219 # get all faces with free edges
220 filter = smesh.GetFilter(smesh.FACE, smesh.FT_FreeEdges)
221 ids = mesh.GetIdsFromFilter(filter)
222 print "Number of faces with free edges:", len(ids)
223 \endcode
224
225 \sa \ref tui_free_edges
226
227 \section filter_free_nodes Free nodes
228
229 Filter free nodes:
230 - element type is \a smesh.NODE
231 - functor type is \a smesh.FT_FreeNodes
232 - threshold value is not required
233
234 \code
235 # create mesh
236 from SMESH_mechanic import *
237 # add node
238 mesh.AddNode(0,0,0)
239 # get all free nodes
240 filter = smesh.GetFilter(smesh.EDGE, smesh.FT_FreeNodes)
241 ids = mesh.GetIdsFromFilter(filter)
242 print "Number of free nodes:", len(ids)
243 \endcode
244
245 \sa \ref tui_free_nodes
246
247 \section filter_free_faces Free faces
248
249 Filter free faces:
250 - element type is \a smesh.FACE
251 - functor type is \a smesh.FT_FreeFaces
252 - threshold value is not required
253
254 \code
255 # create mesh
256 from SMESH_mechanic import *
257 # get all free faces
258 filter = smesh.GetFilter(smesh.EDGE, smesh.FT_FreeFaces)
259 ids = mesh.GetIdsFromFilter(filter)
260 print "Number of free faces:", len(ids)
261 \endcode
262
263 \sa \ref tui_free_faces
264
265 \section filter_borders_multiconnection Borders at multi-connection
266
267 Filter border 1D mesh elements (edges) according to the specified number of
268 connections (faces belonging the border edges)
269 - element type is \a smesh.EDGE
270 - functor type is \a smesh.FT_MultiConnection
271 - threshold is integer value (number of connections)
272
273 \code
274 # create mesh
275 from SMESH_mechanic import *
276 # get border edges with number of connected faces = 5
277 filter = smesh.GetFilter(smesh.EDGE, smesh.FT_MultiConnection, 5)
278 ids = mesh.GetIdsFromFilter(filter)
279 print "Number of border edges with 5 faces connected:", len(ids)
280 \endcode
281
282 \sa \ref tui_borders_at_multiconnection
283
284 \section filter_borders_multiconnection_2d Borders at multi-connection 2D
285
286 Filter 2D mesh elements (faces) which consist of edges belonging
287 to the specified number of mesh elements
288 - element type is \a smesh.FACE
289 - functor type is \a smesh.FT_MultiConnection2D
290 - threshold is integer value (number of connections)
291
292 \code
293 # create mesh
294 from SMESH_mechanic import *
295 # get faces which consist of edges belonging to 2 mesh elements
296 filter = smesh.GetFilter(smesh.FACE, smesh.FT_MultiConnection2D, 2)
297 ids = mesh.GetIdsFromFilter(filter)
298 print "Number of faces consisting of edges belonging to 2 faces:", len(ids)
299 \endcode
300
301 \sa \ref tui_borders_at_multiconnection_2d
302
303 \section filter_length Length
304
305 Filter 1D mesh elements (edges) according to the edge length value:
306 - element type should be \a smesh.EDGE
307 - functor type should be \a smesh.FT_Length
308 - threshold is floating point value (length)
309
310 \code
311 # create mesh
312 from SMESH_mechanic import *
313 # get edges with length > 14
314 filter = smesh.GetFilter(smesh.EDGE, smesh.FT_Length, smesh.FT_MoreThan, 14)
315 ids = mesh.GetIdsFromFilter(filter)
316 print "Number of edges with length > 14:", len(ids)
317 \endcode
318
319 \sa \ref tui_length_1d
320
321 \section filter_length_2d Length 2D
322
323 Filter 2D mesh elements (faces) corresponding to the maximum length.
324 value of its edges:
325 - element type should be \a smesh.FACE
326 - functor type should be \a smesh.FT_Length2D
327 - threshold is floating point value (edge length)
328
329 \code
330 # create mesh
331 from SMESH_mechanic import *
332 # get all faces that have edges with length > 14
333 filter = smesh.GetFilter(smesh.FACE, smesh.FT_Length2D, smesh.FT_MoreThan, 14)
334 ids = mesh.GetIdsFromFilter(filter)
335 print "Number of faces with maximum edge length > 14:", len(ids)
336 \endcode
337
338 \sa \ref tui_length_2d
339
340 \section filter_max_element_length_2d Element Diameter 2D
341
342 Filter 2D mesh elements (faces) corresponding to the maximum length
343 value of its edges and diagonals:
344 - element type should be \a smesh.FACE
345 - functor type should be \a smesh.FT_MaxElementLength2D
346 - threshold is floating point value (edge/diagonal length)
347
348 \code
349 # create mesh
350 from SMESH_mechanic import *
351 # get all faces that have elements with length > 10
352 filter = smesh.GetFilter(smesh.FACE, smesh.FT_MaxElementLength2D, smesh.FT_MoreThan, 10)
353 ids = mesh.GetIdsFromFilter(filter)
354 print "Number of faces with maximum element length > 10:", len(ids)
355 \endcode
356
357 \sa \ref tui_max_element_length_2d
358
359 \section filter_max_element_length_3d Element Diameter 3D
360
361 Filter 3D mesh elements (volumes) corresponding to the maximum length
362 value of its edges and diagonals:
363 - element type should be \a smesh.VOLUME
364 - functor type should be \a smesh.FT_MaxElementLength3D
365 - threshold is floating point value (edge/diagonal length)
366
367 \code
368 # create mesh with volumes
369 from SMESH_mechanic import *
370 mesh.Tetrahedron( algo=smesh.NETGEN )
371 mesh.Compute()
372 # get all volumes that have elements with length > 10
373 filter = smesh.GetFilter(smesh.VOLUME, smesh.FT_MaxElementLength3D, smesh.FT_MoreThan, 10)
374 ids = mesh.GetIdsFromFilter(filter)
375 print "Number of volumes with maximum element length > 10:", len(ids)
376 \endcode
377
378 \sa \ref tui_max_element_length_3d
379
380 \section filter_belong_to_geom Belong to Geom
381
382 Filter mesh entities (nodes or elements) which all nodes lie on the
383 shape defined by threshold value:
384 - element type can be any entity type, from \a smesh.NODE to \a smesh.VOLUME
385 - functor type should be \a smesh.FT_BelongToGeom
386 - threshold is geometrical object
387
388 \code
389 # create mesh
390 from SMESH_mechanic import *
391 # get all faces which nodes lie on the face sub_face3
392 filter = smesh.GetFilter(smesh.FACE, smesh.FT_BelongToGeom, sub_face3)
393 ids = mesh.GetIdsFromFilter(filter)
394 print "Number of faces which nodes lie on sub_face3:", len(ids)
395 \endcode
396
397 \section filter_lying_on_geom Lying on Geom
398
399 Filter mesh entities (nodes or elements) at least one node of which lies on the
400 shape defined by threshold value:
401 - element type can be any entity type, from \a smesh.NODE to \a smesh.VOLUME
402 - functor type should be \a smesh.FT_LyingOnGeom
403 - threshold is geometrical object
404
405 \code
406 # create mesh
407 from SMESH_mechanic import *
408 # get all faces at least one node of each lies on the face sub_face3
409 filter = smesh.GetFilter(smesh.FACE, smesh.FT_LyingOnGeom, sub_face3)
410 ids = mesh.GetIdsFromFilter(filter)
411 print "Number of faces at least one node of each lies on sub_face3:", len(ids)
412 \endcode
413
414 \section filter_belong_to_plane Belong to Plane
415
416 Filter mesh entities (nodes or elements) which all nodes belong to the
417 plane defined by threshold value with the given tolerance:
418 - element type can be: \a smesh.NODE, \a smesh.EDGE, \a smesh.FACE
419 - functor type should be \a smesh.FT_BelongToPlane
420 - threshold is geometrical object (plane)
421 - default tolerance is 1.0e-7
422
423 \code
424 # create mesh
425 from SMESH_mechanic import *
426 # create plane
427 import geompy
428 plane_1 = geompy.MakePlane(p3,seg1,2000)
429 geompy.addToStudy(plane_1, "plane_1")
430 # get all nodes which lie on the plane \a plane_1
431 filter = smesh.GetFilter(smesh.NODE, smesh.FT_BelongToPlane, plane_1)
432 ids = mesh.GetIdsFromFilter(filter)
433 print "Number of nodes which lie on the plane plane_1:", len(ids)
434 \endcode
435
436 \section filter_belong_to_cylinder Belong to Cylinder
437
438 Filter mesh entities (nodes or elements) which all nodes belong to the
439 cylindrical face defined by threshold value with the given tolerance:
440 - element type can be: \a smesh.NODE, \a smesh.EDGE, \a smesh.FACE
441 - functor type should be \a smesh.FT_BelongToCylinder
442 - threshold is geometrical object (cylindrical face)
443 - default tolerance is 1.0e-7
444
445 \code
446 # create mesh
447 from SMESH_mechanic import *
448 # get all faces which lie on the cylindrical face \a sub_face1
449 filter = smesh.GetFilter(smesh.FACE, smesh.FT_BelongToCylinder, sub_face1)
450 ids = mesh.GetIdsFromFilter(filter)
451 print "Number of faces which lie on the cylindrical surface sub_face1:", len(ids)
452 \endcode
453
454 \section filter_belong_to_surface Belong to Surface
455
456 Filter mesh entities (nodes or elements) which all nodes belong to the
457 arbitrary surface defined by threshold value with the given tolerance:
458 - element type can be: \a smesh.NODE, \a smesh.EDGE, \a smesh.FACE
459 - functor type should be \a smesh.FT_BelongToGenSurface
460 - threshold is geometrical object (arbitrary surface)
461 - default tolerance is 1.0e-7
462
463 \code
464 # create mesh
465 from SMESH_mechanic import *
466 # create b-spline
467 spline_1 = geompy.MakeInterpol([p4,p6,p3,p1])
468 surface_1 = geompy.MakePrismVecH( spline_1, vz, 70.0 )
469 geompy.addToStudy(surface_1, "surface_1")
470 # get all nodes which lie on the surface \a surface_1
471 filter = smesh.GetFilter(smesh.NODE, smesh.FT_BelongToGenSurface, surface_1)
472 ids = mesh.GetIdsFromFilter(filter)
473 print "Number of nodes which lie on the surface surface_1:", len(ids)
474 \endcode
475
476 \section filter_range_of_ids Range of IDs
477
478 Filter mesh entities elements (nodes or elements) according to the
479 specified identifiers range:
480 - element type can be any entity type, from \a smesh.NODE to \a smesh.VOLUME
481 - functor type is \a smesh.FT_RangeOfIds
482 - threshold is string listing required IDs and/or ranges of IDs, e.g."1,2,3,50-60,63,67,70-78"  
483
484 \code
485 # create mesh
486 from SMESH_mechanic import *
487 # get nodes with identifiers [5-10] and [15-30]
488 criterion1 = smesh.GetCriterion(smesh.NODE, smesh.FT_RangeOfIds, Treshold="5-10",\
489                                 BinaryOp=smesh.FT_LogicalOR)
490 criterion2 = smesh.GetCriterion(smesh.NODE, smesh.FT_RangeOfIds, Treshold="15-30")
491 filter = smesh.CreateFilterManager().CreateFilter()
492 filter.SetCriteria([criterion1,criterion2])
493 ids = mesh.GetIdsFromFilter(filter)
494 print "Number of nodes in ranges [5-10] and [15-30]:", len(ids)
495 \endcode
496
497 \section filter_bad_oriented_volume Badly oriented volume
498
499 Filter 3D mesh elements (volumes), which are incorrectly oriented from
500 the point of view of MED convention. 
501 - element type should be \a smesh.VOLUME
502 - functor type is \a smesh.FT_BadOrientedVolume
503 - threshold is not required
504
505 \code
506 # create mesh with volumes
507 from SMESH_mechanic import *
508 mesh.Tetrahedron( algo=smesh.NETGEN )
509 mesh.Compute()
510 # get all badly oriented volumes
511 filter = smesh.GetFilter(smesh.VOLUME, smesh.FT_BadOrientedVolume)
512 ids = mesh.GetIdsFromFilter(filter)
513 print "Number of badly oriented volumes:", len(ids)
514 \endcode
515
516 \section filter_linear_or_quadratic Linear / quadratic
517
518 Filter linear / quadratic mesh elements:
519 - element type should be any element type, e.g.: \a smesh.EDGE, \a smesh.FACE, \a smesh.VOLUME
520 - functor type is \a smesh.FT_LinearOrQuadratic
521 - threshold is not required
522 - if unary operator is set to smesh.FT_LogicalNOT, the quadratic
523 elements are selected, otherwise (by default) linear elements are selected
524
525 \code
526 # create mesh
527 from SMESH_mechanic import *
528 # get number of linear and quadratic edges
529 filter_linear = smesh.GetFilter(smesh.EDGE, smesh.FT_LinearOrQuadratic)
530 filter_quadratic = smesh.GetFilter(smesh.EDGE, smesh.FT_LinearOrQuadratic, smesh.FT_LogicalNOT)
531 ids_linear = mesh.GetIdsFromFilter(filter_linear)
532 ids_quadratic = mesh.GetIdsFromFilter(filter_quadratic)
533 print "Number of linear edges:", len(ids_linear), "; number of quadratic edges:", len(ids_quadratic)
534 # convert mesh to quadratic
535 print "Convert to quadratic..."
536 mesh.ConvertToQuadratic(True)
537 # get number of linear and quadratic edges
538 ids_linear = mesh.GetIdsFromFilter(filter_linear)
539 ids_quadratic = mesh.GetIdsFromFilter(filter_quadratic)
540 print "Number of linear edges:", len(ids_linear), "; number of quadratic edges:", len(ids_quadratic)
541 \endcode
542
543 \section filter_group_color Group color
544
545 Filter mesh entities, belonging to the group with the color defined by the threshold value.
546 - element type can be any entity type, from \a smesh.NODE to \a smesh.VOLUME
547 - functor type is \a smesh.FT_GroupColor
548 - threshold should be of SALOMEDS.Color type
549
550 \code
551 # create mesh
552 from SMESH_mechanic import *
553 # create group of edges
554 all_edges = mesh.GetElementsByType(smesh.EDGE)
555 grp = mesh.MakeGroupByIds("edges group", smesh.EDGE, all_edges[:len(all_edges)/4])
556 import SALOMEDS
557 c = SALOMEDS.Color(0.1, 0.5, 1.0)
558 grp.SetColor(c)
559 # get number of the edges not belonging to the group with the given color
560 filter = smesh.GetFilter(smesh.EDGE, smesh.FT_GroupColor, c, smesh.FT_LogicalNOT)
561 ids = mesh.GetIdsFromFilter(filter)
562 print "Number of edges not beloging to the group with color (0.1, 0.5, 1.0):", len(ids)
563 \endcode
564
565 \section filter_geom_type Geometry type
566
567 Filter mesh elements by the geometric type defined with the threshold
568 value. The list of available geometric types depends on the element
569 entity type.
570 - element type should be any element type, e.g.: \a smesh.EDGE, \a smesh.FACE, \a smesh.VOLUME
571 - functor type should be \a smesh.FT_ElemGeomType
572 - threshold is of smesh.GeometryType value
573
574 \code
575 # create mesh with volumes
576 from SMESH_mechanic import *
577 mesh.Tetrahedron( algo=smesh.NETGEN )
578 mesh.Compute()
579 # get all triangles, quadrangles, tetrahedrons, pyramids
580 filter_tri = smesh.GetFilter(smesh.FACE, smesh.FT_ElemGeomType, smesh.Geom_TRIANGLE)
581 filter_qua = smesh.GetFilter(smesh.FACE, smesh.FT_ElemGeomType, smesh.Geom_QUADRANGLE)
582 filter_tet = smesh.GetFilter(smesh.VOLUME, smesh.FT_ElemGeomType, smesh.Geom_TETRA)
583 filter_pyr = smesh.GetFilter(smesh.VOLUME, smesh.FT_ElemGeomType, smesh.Geom_PYRAMID)
584 ids_tri = mesh.GetIdsFromFilter(filter_tri)
585 ids_qua = mesh.GetIdsFromFilter(filter_qua)
586 ids_tet = mesh.GetIdsFromFilter(filter_tet)
587 ids_pyr = mesh.GetIdsFromFilter(filter_pyr)
588 print "Number of triangles:", len(ids_tri)
589 print "Number of quadrangles:", len(ids_qua)
590 print "Number of tetrahedrons:", len(ids_tet)
591 print "Number of pyramids:", len(ids_pyr)
592 \endcode
593
594 */