mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-24 15:02:03 +05:00
rnc: Added a paragraph about the use of criteria in documentation
and links from GetFilter and GetCriterion methods to tui_filters documentation page
This commit is contained in:
parent
7e60e718da
commit
f1fdcd1571
@ -689,4 +689,25 @@ print "Number of tetrahedrons:", len(ids_tet)
|
|||||||
print "Number of pyramids:", len(ids_pyr)
|
print "Number of pyramids:", len(ids_pyr)
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
|
\section combining_filters How to combine filters with Criterion structures?
|
||||||
|
|
||||||
|
Filters can be combined by making use of "criteria".
|
||||||
|
|
||||||
|
Example :
|
||||||
|
|
||||||
|
\code
|
||||||
|
# create mesh
|
||||||
|
from SMESH_mechanic import *
|
||||||
|
# get all the quadrangle faces ...
|
||||||
|
criterion1 = smesh.GetCriterion(smesh.FACE, smesh.FT_ElemGeomType, smesh.Geom_QUADRANGLE, smesh.FT_LogicalAND)
|
||||||
|
# ... AND do NOT get those from sub_face3
|
||||||
|
criterion2 = smesh.GetCriterion(smesh.FACE, smesh.FT_BelongToGeom, sub_face3, smesh.FT_LogicalNOT)
|
||||||
|
filter = smesh.CreateFilterManager().CreateFilter()
|
||||||
|
filter.SetCriteria([criterion1,criterion2])
|
||||||
|
ids = mesh.GetIdsFromFilter(filter)
|
||||||
|
|
||||||
|
myGroup = mesh.MakeGroupByIds("Quads_on_cylindrical_faces",smesh.FACE,ids)
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@ -745,6 +745,7 @@ class smeshDC(SMESH._objref_SMESH_Gen):
|
|||||||
UnaryOp, BinaryOp, Tolerance, TypeOfElement, Precision)
|
UnaryOp, BinaryOp, Tolerance, TypeOfElement, Precision)
|
||||||
|
|
||||||
## Creates a criterion by the given parameters
|
## Creates a criterion by the given parameters
|
||||||
|
# \n Criterion structures allow to define complex filters by combining them with logical operations (AND / OR) (see example below)
|
||||||
# @param elementType the type of elements(NODE, EDGE, FACE, VOLUME)
|
# @param elementType the type of elements(NODE, EDGE, FACE, VOLUME)
|
||||||
# @param CritType the type of criterion (FT_Taper, FT_Area, FT_RangeOfIds, FT_LyingOnGeom etc.)
|
# @param CritType the type of criterion (FT_Taper, FT_Area, FT_RangeOfIds, FT_LyingOnGeom etc.)
|
||||||
# @param Compare belongs to {FT_LessThan, FT_MoreThan, FT_EqualTo}
|
# @param Compare belongs to {FT_LessThan, FT_MoreThan, FT_EqualTo}
|
||||||
@ -755,6 +756,8 @@ class smeshDC(SMESH._objref_SMESH_Gen):
|
|||||||
# @param Tolerance the tolerance used by FT_BelongToGeom, FT_BelongToSurface,
|
# @param Tolerance the tolerance used by FT_BelongToGeom, FT_BelongToSurface,
|
||||||
# FT_LyingOnGeom, FT_CoplanarFaces criteria
|
# FT_LyingOnGeom, FT_CoplanarFaces criteria
|
||||||
# @return SMESH.Filter.Criterion
|
# @return SMESH.Filter.Criterion
|
||||||
|
#
|
||||||
|
# <a href="../tui_filters_page.html#combining_filters">Example of Criteria usage</a>
|
||||||
# @ingroup l1_controls
|
# @ingroup l1_controls
|
||||||
def GetCriterion(self,elementType,
|
def GetCriterion(self,elementType,
|
||||||
CritType,
|
CritType,
|
||||||
@ -875,6 +878,8 @@ class smeshDC(SMESH._objref_SMESH_Gen):
|
|||||||
# @param Tolerance the tolerance used by FT_BelongToGeom, FT_BelongToSurface,
|
# @param Tolerance the tolerance used by FT_BelongToGeom, FT_BelongToSurface,
|
||||||
# FT_LyingOnGeom, FT_CoplanarFaces criteria
|
# FT_LyingOnGeom, FT_CoplanarFaces criteria
|
||||||
# @return SMESH_Filter
|
# @return SMESH_Filter
|
||||||
|
#
|
||||||
|
# <a href="../tui_filters_page.html#tui_filters">Example of Filters usage</a>
|
||||||
# @ingroup l1_controls
|
# @ingroup l1_controls
|
||||||
def GetFilter(self,elementType,
|
def GetFilter(self,elementType,
|
||||||
CritType=FT_Undefined,
|
CritType=FT_Undefined,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user