Functions | |
def | EnumToLong |
Returns a long value from enumeration Should be used for SMESH.FunctorType enumeration. | |
def | ColorToString |
Returns a string representation of the color. | |
def | GetEmptyCriterion |
Creates an empty criterion. | |
def | GetCriterion |
Creates a criterion by the given parameters Criterion structures allow to define complex filters by combining them with logical operations (AND / OR) (see example below) | |
def | GetFilter |
Creates a filter with the given parameters. | |
def | GetFilterFromCriteria |
Creates a filter from criteria. | |
def | GetFunctor |
Creates a numerical functor by its type. | |
def | GetIdsFromFilter |
Passes mesh elements through the given filter and return IDs of fitting elements. | |
def | GetFreeBorders |
Verifies whether a 2D mesh element has free edges (edges connected to one face only) Returns a list of special structures (borders). |
def smesh.EnumToLong | ( | self, | |
theItem | |||
) |
Returns a long value from enumeration Should be used for SMESH.FunctorType enumeration.
def smesh.ColorToString | ( | self, | |
c | |||
) |
Returns a string representation of the color.
To be used with filters.
c | color value (SALOMEDS.Color) |
def smesh.GetEmptyCriterion | ( | self | ) |
def smesh.GetCriterion | ( | self, | |
elementType, | |||
CritType, | |||
Compare = FT_EqualTo , |
|||
Threshold = "" , |
|||
UnaryOp = FT_Undefined , |
|||
BinaryOp = FT_Undefined , |
|||
Tolerance = 1e-07 |
|||
) |
Creates 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(NODE, EDGE, FACE, VOLUME) |
CritType | the type of criterion (FT_Taper, FT_Area, FT_RangeOfIds, FT_LyingOnGeom etc.) |
Compare | belongs to {FT_LessThan, FT_MoreThan, FT_EqualTo} |
Threshold | the threshold value (range of ids as string, shape, numeric) |
UnaryOp | FT_LogicalNOT or FT_Undefined |
BinaryOp | a binary logical operation FT_LogicalAND, FT_LogicalOR or FT_Undefined (must be for the last criterion of all criteria) |
Tolerance | the tolerance used by FT_BelongToGeom, FT_BelongToSurface, FT_LyingOnGeom, FT_CoplanarFaces criteria |
References smesh.GetFilter(), and smesh.GetName().
def smesh.GetFilter | ( | self, | |
elementType, | |||
CritType = FT_Undefined , |
|||
Compare = FT_EqualTo , |
|||
Threshold = "" , |
|||
UnaryOp = FT_Undefined , |
|||
Tolerance = 1e-07 |
|||
) |
Creates a filter with the given parameters.
elementType | the type of elements in the group |
CritType | the type of criterion ( FT_Taper, FT_Area, FT_RangeOfIds, FT_LyingOnGeom etc. ) |
Compare | belongs to {FT_LessThan, FT_MoreThan, FT_EqualTo} |
Threshold | the threshold value (range of id ids as string, shape, numeric) |
UnaryOp | FT_LogicalNOT or FT_Undefined |
Tolerance | the tolerance used by FT_BelongToGeom, FT_BelongToSurface, FT_LyingOnGeom, FT_CoplanarFaces and FT_EqualNodes criteria |
def smesh.GetFilterFromCriteria | ( | self, | |
criteria | |||
) |
Creates a filter from criteria.
criteria | a list of criteria |
def smesh.GetFunctor | ( | self, | |
theCriterion | |||
) |
Creates a numerical functor by its type.
theCriterion | FT_...; functor type |
def GetIdsFromFilter | ( | self, | |
theFilter | |||
) |
Passes mesh elements through the given filter and return IDs of fitting elements.
theFilter | SMESH_Filter |
References Mesh.mesh.
def GetFreeBorders | ( | self | ) |
Verifies whether a 2D mesh element has free edges (edges connected to one face only)
Returns a list of special structures (borders).
References Mesh.mesh.