Functions | |
def | GetEmptyCriterion |
Create an empty criterion. More... | |
def | GetCriterion |
Create a criterion by the given parameters Criterion structures allow to define complex filters by combining them with logical operations (AND / OR) (see example below) More... | |
def | GetFilter |
Create a filter with the given parameters. More... | |
def | GetFilterFromCriteria |
Create a filter from criteria. More... | |
def | GetFunctor |
Create a numerical functor by its type. More... | |
def | GetIdsFromFilter |
Pass mesh elements through the given filter and return IDs of fitting elements. More... | |
def GetEmptyCriterion | ( | self | ) |
Create an empty criterion.
References smeshBuilder.EnumToLong(), and smeshBuilder.GetCriterion().
def GetCriterion | ( | self, | |
elementType, | |||
CritType, | |||
Compare = FT_EqualTo , |
|||
Threshold = "" , |
|||
UnaryOp = FT_Undefined , |
|||
BinaryOp = FT_Undefined , |
|||
Tolerance = 1e-07 |
|||
) |
Create a criterion by the given parameters
Criterion structures allow to define complex filters by combining them with logical operations (AND / OR) (see example below)
elementType | the type of elements(SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME) |
CritType | the type of criterion (SMESH.FT_Taper, SMESH.FT_Area, etc.) Type SMESH.FunctorType._items in the Python Console to see all values. Note that the items starting from FT_LessThan are not suitable for CritType. |
Compare | belongs to {SMESH.FT_LessThan, SMESH.FT_MoreThan, SMESH.FT_EqualTo} |
Threshold | the threshold value (range of ids as string, shape, numeric) |
UnaryOp | SMESH.FT_LogicalNOT or SMESH.FT_Undefined |
BinaryOp | a binary logical operation SMESH.FT_LogicalAND, SMESH.FT_LogicalOR or SMESH.FT_Undefined |
Tolerance | the tolerance used by SMESH.FT_BelongToGeom, SMESH.FT_BelongToSurface, SMESH.FT_LyingOnGeom, SMESH.FT_CoplanarFaces criteria |
References smeshBuilder.ColorToString(), smeshBuilder.EnumToLong(), smeshBuilder.GetCurrentStudy(), smeshBuilder.GetEmptyCriterion(), smeshBuilder.GetFilter(), and smeshBuilder.GetName().
def GetFilter | ( | self, | |
elementType, | |||
CritType = FT_Undefined , |
|||
Compare = FT_EqualTo , |
|||
Threshold = "" , |
|||
UnaryOp = FT_Undefined , |
|||
Tolerance = 1e-07 , |
|||
mesh = None |
|||
) |
Create a filter with the given parameters.
elementType | the type of elements (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME) |
CritType | the type of criterion (SMESH.FT_Taper, SMESH.FT_Area, etc.) Type SMESH.FunctorType._items in the Python Console to see all values. Note that the items starting from FT_LessThan are not suitable for CritType. |
Compare | belongs to {SMESH.FT_LessThan, SMESH.FT_MoreThan, SMESH.FT_EqualTo} |
Threshold | the threshold value (range of ids as string, shape, numeric) |
UnaryOp | SMESH.FT_LogicalNOT or SMESH.FT_Undefined |
Tolerance | the tolerance used by SMESH.FT_BelongToGeom, SMESH.FT_BelongToSurface, SMESH.FT_LyingOnGeom, SMESH.FT_CoplanarFaces and SMESH.FT_EqualNodes criteria |
mesh | the mesh to initialize the filter with |
References smeshBuilder.GetCriterion().
def GetFilterFromCriteria | ( | self, | |
criteria, | |||
binOp = SMESH.FT_LogicalAND |
|||
) |
Create a filter from criteria.
criteria | a list of criteria |
binOp | binary operator used when binary operator of criteria is undefined |
References smeshBuilder.EnumToLong().
def GetFunctor | ( | self, | |
theCriterion | |||
) |
Create a numerical functor by its type.
theCriterion | functor type - an item of SMESH.FunctorType enumeration. Type SMESH.FunctorType._items in the Python Console to see all items. Note that not all items correspond to numerical functors. |
def GetIdsFromFilter | ( | self, | |
theFilter | |||
) |
Pass mesh elements through the given filter and return IDs of fitting elements.
theFilter | SMESH_Filter |
References Mesh.mesh.