Version: 6.5.0
Home
 All Data Structures Namespaces Files Functions Variables Groups
Functions
Quality controls and Filtering

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).

Detailed Description

Function Documentation

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.

Parameters
ccolor value (SALOMEDS.Color)
def smesh.GetEmptyCriterion (   self)

Creates an empty criterion.

Returns
SMESH.Filter.Criterion

References smesh.GetCriterion().

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)

Parameters
elementTypethe type of elements(NODE, EDGE, FACE, VOLUME)
CritTypethe type of criterion (FT_Taper, FT_Area, FT_RangeOfIds, FT_LyingOnGeom etc.)
Comparebelongs to {FT_LessThan, FT_MoreThan, FT_EqualTo}
Thresholdthe threshold value (range of ids as string, shape, numeric)
UnaryOpFT_LogicalNOT or FT_Undefined
BinaryOpa binary logical operation FT_LogicalAND, FT_LogicalOR or FT_Undefined (must be for the last criterion of all criteria)
Tolerancethe tolerance used by FT_BelongToGeom, FT_BelongToSurface, FT_LyingOnGeom, FT_CoplanarFaces criteria
Returns
SMESH.Filter.Criterion

Example of Criteria usage

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.

Parameters
elementTypethe type of elements in the group
CritTypethe type of criterion ( FT_Taper, FT_Area, FT_RangeOfIds, FT_LyingOnGeom etc. )
Comparebelongs to {FT_LessThan, FT_MoreThan, FT_EqualTo}
Thresholdthe threshold value (range of id ids as string, shape, numeric)
UnaryOpFT_LogicalNOT or FT_Undefined
Tolerancethe tolerance used by FT_BelongToGeom, FT_BelongToSurface, FT_LyingOnGeom, FT_CoplanarFaces and FT_EqualNodes criteria
Returns
SMESH_Filter

Example of Filters usage

def smesh.GetFilterFromCriteria (   self,
  criteria 
)

Creates a filter from criteria.

Parameters
criteriaa list of criteria
Returns
SMESH_Filter

Example of Filters usage

def smesh.GetFunctor (   self,
  theCriterion 
)

Creates a numerical functor by its type.

Parameters
theCriterionFT_...; functor type
Returns
SMESH_NumericalFunctor
def GetIdsFromFilter (   self,
  theFilter 
)

Passes mesh elements through the given filter and return IDs of fitting elements.

Parameters
theFilterSMESH_Filter
Returns
a list of ids

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).

Returns
a list of SMESH.FreeEdges.Border structure: edge id and ids of two its nodes.

References Mesh.mesh.

Copyright © 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS