Back to index

salome-smesh  6.5.0
Namespaces | Defines | Functions
SMESH_Filter_i.cxx File Reference
#include "SMESH_Filter_i.hxx"
#include "SMESH_Gen_i.hxx"
#include "SMESH_PythonDump.hxx"
#include "SMDS_Mesh.hxx"
#include "SMDS_MeshNode.hxx"
#include "SMDS_MeshElement.hxx"
#include "SMDS_ElemIterator.hxx"
#include "SMESHDS_Mesh.hxx"
#include <BRep_Tool.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <Geom_Plane.hxx>
#include <LDOMParser.hxx>
#include <LDOMString.hxx>
#include <LDOM_Document.hxx>
#include <LDOM_Element.hxx>
#include <LDOM_Node.hxx>
#include <LDOM_XmlWriter.hxx>
#include <Precision.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <TColStd_ListIteratorOfListOfReal.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TColStd_ListOfReal.hxx>
#include <TColStd_SequenceOfHAsciiString.hxx>
#include <TCollection_HAsciiString.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>

Go to the source code of this file.

Namespaces

namespace  SMESH

Defines

#define ATTR_TYPE   "type"
#define ATTR_COMPARE   "compare"
#define ATTR_THRESHOLD   "threshold"
#define ATTR_UNARY   "unary"
#define ATTR_BINARY   "binary"
#define ATTR_THRESHOLD_STR   "threshold_str"
#define ATTR_TOLERANCE   "tolerance"
#define ATTR_ELEMENT_TYPE   "ElementType"

Functions

Predicate_i * SMESH::GetPredicate (Predicate_ptr thePredicate)
static bool IsSubShape (const TopTools_IndexedMapOfShape &theMap, const TopoDS_Shape &theShape)
static bool IsContains (const SMESHDS_Mesh *theMeshDS, const TopoDS_Shape &theShape, const SMDS_MeshElement *theElem, TopAbs_ShapeEnum theFindShapeEnum, TopAbs_ShapeEnum theAvoidShapeEnum=TopAbs_SHAPE)
const SMDS_Mesh * MeshPtr2SMDSMesh (SMESH_Mesh_ptr theMesh)
SMESH::long_arraytoArray (const TColStd_ListOfInteger &aList)
SMESH::double_arraytoArray (const TColStd_ListOfReal &aList)
static SMESH::Filter::Criterion createCriterion ()
static TopoDS_Shape getShapeByName (const char *theName)
static TopoDS_Shape getShapeByID (const char *theID)
static std::string getShapeNameByID (const char *theID)
template<class TElement , class TIterator , class TPredicate >
static void collectMeshInfo (const TIterator &theItr, TPredicate &thePred, SMESH::long_array &theRes)
static bool getCriteria (Predicate_i *thePred, SMESH::Filter::Criteria_out theCriteria)
static LDOMString toString (CORBA::Boolean val)
static bool toBool (const LDOMString &theStr)
static LDOMString toString (CORBA::Double val)
static double toDouble (const LDOMString &theStr)
static LDOMString toString (CORBA::Long theType)
static SMESH::FunctorType toFunctorType (const LDOMString &theStr)
static SMESH::ElementType toElementType (const LDOMString &theStr)
static LDOMString toString (const SMESH::ElementType theType)
static LDOM_Element findFilter (const char *theFilterName, const LDOM_Document &theDoc, LDOM_Node *theParent=0)
static const char * getSectionName (const ElementType theType)
static LDOM_Node getSection (const ElementType theType, LDOM_Document &theDoc, const bool toCreate=false)
static LDOM_Element createFilterItem (const char *theName, SMESH::Filter_ptr theFilter, LDOM_Document &theDoc)
static const char ** getFunctNames ()
 Return an array of strings corresponding to items of enum FunctorType.

Define Documentation

#define ATTR_BINARY   "binary"

Definition at line 3173 of file SMESH_Filter_i.cxx.

#define ATTR_COMPARE   "compare"

Definition at line 3170 of file SMESH_Filter_i.cxx.

#define ATTR_ELEMENT_TYPE   "ElementType"

Definition at line 3176 of file SMESH_Filter_i.cxx.

#define ATTR_THRESHOLD   "threshold"

Definition at line 3171 of file SMESH_Filter_i.cxx.

#define ATTR_THRESHOLD_STR   "threshold_str"

Definition at line 3174 of file SMESH_Filter_i.cxx.

#define ATTR_TOLERANCE   "tolerance"

Definition at line 3175 of file SMESH_Filter_i.cxx.

#define ATTR_TYPE   "type"

Definition at line 3169 of file SMESH_Filter_i.cxx.

#define ATTR_UNARY   "unary"

Definition at line 3172 of file SMESH_Filter_i.cxx.


Function Documentation

template<class TElement , class TIterator , class TPredicate >
static void collectMeshInfo ( const TIterator &  theItr,
TPredicate &  thePred,
SMESH::long_array theRes 
) [static]

Definition at line 2468 of file SMESH_Filter_i.cxx.

{         
  if (!theItr)
    return;
  while (theItr->more()) {
    const SMDS_MeshElement* anElem = theItr->next();
    if ( thePred->IsSatisfy( anElem->GetID() ) )
      theRes[ anElem->GetEntityType() ]++;
  }
}

Definition at line 468 of file SMESH_Filter_i.cxx.

{
  SMESH::Filter::Criterion aCriterion;

  aCriterion.Type          = FT_Undefined;
  aCriterion.Compare       = FT_Undefined;
  aCriterion.Threshold     = 0;
  aCriterion.UnaryOp       = FT_Undefined;
  aCriterion.BinaryOp      = FT_Undefined;
  aCriterion.ThresholdStr  = "";
  aCriterion.ThresholdID   = "";
  aCriterion.Tolerance     = Precision::Confusion();
  aCriterion.TypeOfElement = SMESH::ALL;
  aCriterion.Precision     = -1;

  return aCriterion;
}

Here is the caller graph for this function:

static LDOM_Element createFilterItem ( const char *  theName,
SMESH::Filter_ptr  theFilter,
LDOM_Document &  theDoc 
) [static]

Definition at line 3451 of file SMESH_Filter_i.cxx.

{
  // create new filter in document
  LDOM_Element aFilterItem = theDoc.createElement( "filter" );
  aFilterItem.setAttribute( "name", theName );

  // save filter criterions
  SMESH::Filter::Criteria_var aCriteria = new SMESH::Filter::Criteria;

  if ( !theFilter->GetCriteria( aCriteria ) )
    return LDOM_Element();

  for ( CORBA::ULong i = 0, n = aCriteria->length(); i < n; i++ )
  {
    LDOM_Element aCriterionItem = theDoc.createElement( "criterion" );
    
    aCriterionItem.setAttribute( ATTR_TYPE         , toString(  aCriteria[ i ].Type) );
    aCriterionItem.setAttribute( ATTR_COMPARE      , toString(  aCriteria[ i ].Compare ) );
    aCriterionItem.setAttribute( ATTR_THRESHOLD    , toString(  aCriteria[ i ].Threshold ) );
    aCriterionItem.setAttribute( ATTR_UNARY        , toString(  aCriteria[ i ].UnaryOp ) );
    aCriterionItem.setAttribute( ATTR_BINARY       , toString(  aCriteria[ i ].BinaryOp ) );

    aCriterionItem.setAttribute( ATTR_THRESHOLD_STR, (const char*)aCriteria[ i ].ThresholdStr );
    aCriterionItem.setAttribute( ATTR_TOLERANCE    , toString( aCriteria[ i ].Tolerance ) );
    aCriterionItem.setAttribute( ATTR_ELEMENT_TYPE ,
      toString( (SMESH::ElementType)aCriteria[ i ].TypeOfElement ) );

    aFilterItem.appendChild( aCriterionItem );
  }

  return aFilterItem;
}

Here is the call graph for this function:

static LDOM_Element findFilter ( const char *  theFilterName,
const LDOM_Document &  theDoc,
LDOM_Node *  theParent = 0 
) [static]

Definition at line 3355 of file SMESH_Filter_i.cxx.

{
  LDOM_Element aRootElement = theDoc.getDocumentElement();
  if ( aRootElement.isNull() || !aRootElement.hasChildNodes() )
    return LDOM_Element();

  for ( LDOM_Node aTypeNode = aRootElement.getFirstChild();
        !aTypeNode.isNull(); aTypeNode = aTypeNode.getNextSibling() )
  {
    for ( LDOM_Node aFilter = aTypeNode.getFirstChild();
          !aFilter.isNull(); aFilter = aFilter.getNextSibling() )
    {
      LDOM_Element* anElem = ( LDOM_Element* )&aFilter;
      if ( anElem->getTagName().equals( LDOMString( "filter" ) ) &&
           anElem->getAttribute( "name" ).equals( LDOMString( theFilterName ) ) )
      {
        if ( theParent != 0  )
          *theParent = aTypeNode;
        return (LDOM_Element&)aFilter;
      }
    }
  }
  return LDOM_Element();
}
static bool getCriteria ( Predicate_i *  thePred,
SMESH::Filter::Criteria_out  theCriteria 
) [inline, static]

Definition at line 2584 of file SMESH_Filter_i.cxx.

{
  int aFType = thePred->GetFunctorType();

  switch ( aFType )
  {
  case FT_FreeBorders:
  case FT_FreeEdges:
  case FT_FreeFaces:
  case FT_LinearOrQuadratic:
  case FT_FreeNodes:
  case FT_EqualEdges:
  case FT_EqualFaces:
  case FT_EqualVolumes:
  case FT_BadOrientedVolume:
  case FT_BareBorderVolume:
  case FT_BareBorderFace:
  case FT_OverConstrainedVolume:
  case FT_OverConstrainedFace:
    {
      CORBA::ULong i = theCriteria->length();
      theCriteria->length( i + 1 );

      theCriteria[ i ] = createCriterion();

      theCriteria[ i ].Type = aFType;
      theCriteria[ i ].TypeOfElement = thePred->GetElementType();
      return true;
    }
  case FT_BelongToGeom:
    {
      BelongToGeom_i* aPred = dynamic_cast<BelongToGeom_i*>( thePred );

      CORBA::ULong i = theCriteria->length();
      theCriteria->length( i + 1 );

      theCriteria[ i ] = createCriterion();

      theCriteria[ i ].Type          = FT_BelongToGeom;
      theCriteria[ i ].ThresholdStr  = aPred->GetShapeName();
      theCriteria[ i ].ThresholdID   = aPred->GetShapeID();
      theCriteria[ i ].TypeOfElement = aPred->GetElementType();
      theCriteria[ i ].Tolerance     = aPred->GetTolerance();

      return true;
    }
  case FT_BelongToPlane:
  case FT_BelongToCylinder:
  case FT_BelongToGenSurface:
    {
      BelongToSurface_i* aPred = dynamic_cast<BelongToSurface_i*>( thePred );

      CORBA::ULong i = theCriteria->length();
      theCriteria->length( i + 1 );

      theCriteria[ i ] = createCriterion();

      theCriteria[ i ].Type          = aFType;
      theCriteria[ i ].ThresholdStr  = aPred->GetShapeName();
      theCriteria[ i ].ThresholdID   = aPred->GetShapeID();
      theCriteria[ i ].TypeOfElement = aPred->GetElementType();
      theCriteria[ i ].Tolerance     = aPred->GetTolerance();

      return true;
    }
   case FT_LyingOnGeom:
    {
      LyingOnGeom_i* aPred = dynamic_cast<LyingOnGeom_i*>( thePred );

      CORBA::ULong i = theCriteria->length();
      theCriteria->length( i + 1 );

      theCriteria[ i ] = createCriterion();

      theCriteria[ i ].Type          = FT_LyingOnGeom;
      theCriteria[ i ].ThresholdStr  = aPred->GetShapeName();
      theCriteria[ i ].ThresholdID   = aPred->GetShapeID();
      theCriteria[ i ].TypeOfElement = aPred->GetElementType();
      theCriteria[ i ].Tolerance     = aPred->GetTolerance();

      return true;
    }
   case FT_CoplanarFaces:
    {
      CoplanarFaces_i* aPred = dynamic_cast<CoplanarFaces_i*>( thePred );

      CORBA::ULong i = theCriteria->length();
      theCriteria->length( i + 1 );

      theCriteria[ i ] = createCriterion();
      CORBA::String_var faceId = aPred->GetFaceAsString();

      theCriteria[ i ].Type          = FT_CoplanarFaces;
      theCriteria[ i ].ThresholdID   = faceId;
      theCriteria[ i ].Tolerance     = aPred->GetTolerance();

      return true;
    }
  case FT_EqualNodes:
    {
      EqualNodes_i* aPred = dynamic_cast<EqualNodes_i*>( thePred );

      CORBA::ULong i = theCriteria->length();
      theCriteria->length( i + 1 );

      theCriteria[ i ] = createCriterion();

      theCriteria[ i ].Type          = FT_EqualNodes;
      theCriteria[ i ].Tolerance     = aPred->GetTolerance();

      return true;
    }
  case FT_RangeOfIds:
    {
      RangeOfIds_i* aPred = dynamic_cast<RangeOfIds_i*>( thePred );

      CORBA::ULong i = theCriteria->length();
      theCriteria->length( i + 1 );

      theCriteria[ i ] = createCriterion();

      theCriteria[ i ].Type          = FT_RangeOfIds;
      theCriteria[ i ].ThresholdStr  = aPred->GetRangeStr();
      theCriteria[ i ].TypeOfElement = aPred->GetElementType();

      return true;
    }
  case FT_LessThan:
  case FT_MoreThan:
  case FT_EqualTo:
    {
      Comparator_i* aCompar = dynamic_cast<Comparator_i*>( thePred );

      CORBA::ULong i = theCriteria->length();
      theCriteria->length( i + 1 );

      theCriteria[ i ] = createCriterion();

      theCriteria[ i ].Type      = aCompar->GetNumFunctor_i()->GetFunctorType();
      theCriteria[ i ].Compare   = aFType;
      theCriteria[ i ].Threshold = aCompar->GetMargin();
      theCriteria[ i ].TypeOfElement = aCompar->GetElementType();

      if ( aFType == FT_EqualTo )
      {
        EqualTo_i* aCompar = dynamic_cast<EqualTo_i*>( thePred );
        theCriteria[ i ].Tolerance = aCompar->GetTolerance();
      }
    }
    return true;

  case FT_LogicalNOT:
    {
      Predicate_i* aPred = ( dynamic_cast<LogicalNOT_i*>( thePred ) )->GetPredicate_i();
      getCriteria( aPred, theCriteria );
      theCriteria[ theCriteria->length() - 1 ].UnaryOp = FT_LogicalNOT;
    }
    return true;

  case FT_LogicalAND:
  case FT_LogicalOR:
    {
      Predicate_i* aPred1 = ( dynamic_cast<LogicalBinary_i*>( thePred ) )->GetPredicate1_i();
      Predicate_i* aPred2 = ( dynamic_cast<LogicalBinary_i*>( thePred ) )->GetPredicate2_i();
      if ( !getCriteria( aPred1, theCriteria ) )
        return false;
      theCriteria[ theCriteria->length() - 1 ].BinaryOp = aFType;
      return getCriteria( aPred2, theCriteria );
    }
  case FT_GroupColor:
    {
      CORBA::ULong i = theCriteria->length();
      theCriteria->length( i + 1 );

      theCriteria[ i ] = createCriterion();

      GroupColor_i* aPred = dynamic_cast<GroupColor_i*>( thePred );
      theCriteria[ i ].Type          = aFType;
      theCriteria[ i ].TypeOfElement = aPred->GetElementType();
      theCriteria[ i ].ThresholdStr  = aPred->GetColorStr();

      return true;
    }
  case FT_ElemGeomType:
    {
      CORBA::ULong i = theCriteria->length();
      theCriteria->length( i + 1 );

      theCriteria[ i ] = createCriterion();

      ElemGeomType_i* aPred = dynamic_cast<ElemGeomType_i*>( thePred );
      theCriteria[ i ].Type          = aFType;
      theCriteria[ i ].TypeOfElement = aPred->GetElementType();
      theCriteria[ i ].Threshold     = (double)aPred->GetGeometryType();
      return true;
    }

  case FT_Undefined:
    return false;
  default:
    return false;
  }
}

Here is the call graph for this function:

static const char** getFunctNames ( ) [static]

Return an array of strings corresponding to items of enum FunctorType.

Definition at line 3838 of file SMESH_Filter_i.cxx.

{
  static const char* functName[ SMESH::FT_Undefined + 1 ] = {
    // IT's necessary to update this array according to enum FunctorType (SMESH_Filter.idl)
    // The order is IMPORTANT !!!
    "FT_AspectRatio", "FT_AspectRatio3D", "FT_Warping", "FT_MinimumAngle",
    "FT_Taper", "FT_Skew", "FT_Area", "FT_Volume3D", "FT_MaxElementLength2D",
    "FT_MaxElementLength3D", "FT_FreeBorders", "FT_FreeEdges", "FT_FreeNodes",
    "FT_FreeFaces","FT_EqualNodes","FT_EqualEdges","FT_EqualFaces","FT_EqualVolumes",
    "FT_MultiConnection", "FT_MultiConnection2D", "FT_Length",
    "FT_Length2D", "FT_BelongToGeom", "FT_BelongToPlane", "FT_BelongToCylinder",
    "FT_BelongToGenSurface", "FT_LyingOnGeom", "FT_RangeOfIds", "FT_BadOrientedVolume",
    "FT_BareBorderVolume", "FT_BareBorderFace", "FT_OverConstrainedVolume",
    "FT_OverConstrainedFace", "FT_LinearOrQuadratic", "FT_GroupColor", "FT_ElemGeomType",
    "FT_CoplanarFaces", "FT_LessThan", "FT_MoreThan", "FT_EqualTo", "FT_LogicalNOT",
    "FT_LogicalAND", "FT_LogicalOR", "FT_Undefined" };
  return functName;
}

Here is the caller graph for this function:

static LDOM_Node getSection ( const ElementType  theType,
LDOM_Document &  theDoc,
const bool  toCreate = false 
) [static]

Definition at line 3403 of file SMESH_Filter_i.cxx.

{
  LDOM_Element aRootElement = theDoc.getDocumentElement();
  if ( aRootElement.isNull() )
    return LDOM_Node();

  // Find section
  bool anExist = false;
  const char* aSectionName = getSectionName( theType );
  if ( strcmp( aSectionName, "" ) == 0 )
    return LDOM_Node();

  LDOM_NodeList aSections = theDoc.getElementsByTagName( "section" );
  LDOM_Node aNode;
  for ( int i = 0, n = aSections.getLength(); i < n; i++ )
  {
    aNode = aSections.item( i );
    LDOM_Element& anItem = ( LDOM_Element& )aNode;
    if ( anItem.getAttribute( "name" ).equals( LDOMString( aSectionName ) ) )
    {
      anExist = true;
      break;
    }
  }

  // Create new section if necessary
  if ( !anExist )
  {
    if ( toCreate )
    {
      LDOM_Element aNewItem = theDoc.createElement( "section" );
      aNewItem.setAttribute( "name", aSectionName );
      aRootElement.appendChild( aNewItem );
      return aNewItem;
    }
    else
      return LDOM_Node();
  }
  return
    aNode;
}

Here is the call graph for this function:

static const char* getSectionName ( const ElementType  theType) [static]

Definition at line 3386 of file SMESH_Filter_i.cxx.

{
  switch ( theType )
  {
    case SMESH::NODE   : return "Filters for nodes";
    case SMESH::EDGE   : return "Filters for edges";
    case SMESH::FACE   : return "Filters for faces";
    case SMESH::VOLUME : return "Filters for volumes";
    case SMESH::ALL    : return "Filters for elements";
    default            : return "";
  }
}

Here is the caller graph for this function:

static TopoDS_Shape getShapeByID ( const char *  theID) [static]

Definition at line 506 of file SMESH_Filter_i.cxx.

{
  if ( theID && strlen( theID ) > 0 ) {
    SMESH_Gen_i*     aSMESHGen = SMESH_Gen_i::GetSMESHGen();
    SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy();
    if ( !aStudy->_is_nil() ) {
      SALOMEDS::SObject_var aSObj = aStudy->FindObjectID(theID);
      if ( !aSObj->_is_nil() ) {
        CORBA::Object_var          obj = aSObj->GetObject();
        GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(obj);
        return aSMESHGen->GeomObjectToShape( aGeomObj );
      }
    }
  }
  return TopoDS_Shape();
}
static TopoDS_Shape getShapeByName ( const char *  theName) [static]

Definition at line 486 of file SMESH_Filter_i.cxx.

{
  if ( theName != 0 )
  {
    SMESH_Gen_i* aSMESHGen     = SMESH_Gen_i::GetSMESHGen();
    SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy();
    if ( !aStudy->_is_nil() )
    {
      SALOMEDS::Study::ListOfSObject_var aList = aStudy->FindObjectByName( theName, "GEOM" );
      if ( aList->length() > 0 )
      {
        CORBA::Object_var        anObj = aList[ 0 ]->GetObject();
        GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow( anObj );
        return aSMESHGen->GeomObjectToShape( aGeomObj );
      }
    }
  }
  return TopoDS_Shape();
}
static std::string getShapeNameByID ( const char *  theID) [static]

Definition at line 523 of file SMESH_Filter_i.cxx.

{
  if ( theID && strlen( theID ) > 0 ) {
    SMESH_Gen_i*     aSMESHGen = SMESH_Gen_i::GetSMESHGen();
    SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy();
    if ( !aStudy->_is_nil() ) {
      SALOMEDS::SObject_var aSObj = aStudy->FindObjectID(theID);
      if ( !aSObj->_is_nil() ) {
        CORBA::String_var name = aSObj->GetName();
        return name.in();
      }
    }
  }
  return "";
}
static bool IsContains ( const SMESHDS_Mesh *  theMeshDS,
const TopoDS_Shape &  theShape,
const SMDS_MeshElement *  theElem,
TopAbs_ShapeEnum  theFindShapeEnum,
TopAbs_ShapeEnum  theAvoidShapeEnum = TopAbs_SHAPE 
) [static]

Definition at line 148 of file SMESH_Filter_i.cxx.

{
  TopExp_Explorer anExp( theShape,theFindShapeEnum,theAvoidShapeEnum );

  while( anExp.More() )
  {
    const TopoDS_Shape& aShape = anExp.Current();
    if( SMESHDS_SubMesh* aSubMesh = theMeshDS->MeshElements( aShape ) ){
      if( aSubMesh->Contains( theElem ) )
        return true;
    }
    anExp.Next();
  }
  return false;
}
static bool IsSubShape ( const TopTools_IndexedMapOfShape &  theMap,
const TopoDS_Shape &  theShape 
) [static]

Definition at line 102 of file SMESH_Filter_i.cxx.

{
  if (theMap.Contains(theShape)) return true;

  if (theShape.ShapeType() == TopAbs_COMPOUND ||
      theShape.ShapeType() == TopAbs_COMPSOLID)
  {
    TopoDS_Iterator anIt (theShape, Standard_True, Standard_True);
    for (; anIt.More(); anIt.Next())
    {
      if (!IsSubShape(theMap, anIt.Value())) {
        return false;
      }
    }
    return true;
  }

  return false;
}

Here is the caller graph for this function:

const SMDS_Mesh* MeshPtr2SMDSMesh ( SMESH_Mesh_ptr  theMesh) [inline]

Definition at line 434 of file SMESH_Filter_i.cxx.

{
  SMESH_Mesh_i* anImplPtr = DownCast<SMESH_Mesh_i*>(theMesh);
  return anImplPtr ? anImplPtr->GetImpl().GetMeshDS() : 0;
}
SMESH::long_array* toArray ( const TColStd_ListOfInteger &  aList) [inline]

Definition at line 442 of file SMESH_Filter_i.cxx.

{
  SMESH::long_array_var anArray = new SMESH::long_array;
  anArray->length( aList.Extent() );
  TColStd_ListIteratorOfListOfInteger anIter( aList );
  int i = 0;
  for( ; anIter.More(); anIter.Next() )
    anArray[ i++ ] = anIter.Value();

  return anArray._retn();
}
SMESH::double_array* toArray ( const TColStd_ListOfReal &  aList) [inline]

Definition at line 456 of file SMESH_Filter_i.cxx.

{
  SMESH::double_array_var anArray = new SMESH::double_array;
  anArray->length( aList.Extent() );
  TColStd_ListIteratorOfListOfReal anIter( aList );
  int i = 0;
  for( ; anIter.More(); anIter.Next() )
    anArray[ i++ ] = anIter.Value();

  return anArray._retn();
}
static bool toBool ( const LDOMString &  theStr) [inline, static]

Definition at line 3191 of file SMESH_Filter_i.cxx.

{
  return theStr.equals( "logical not" );
}
static double toDouble ( const LDOMString &  theStr) [inline, static]

Definition at line 3211 of file SMESH_Filter_i.cxx.

{
  return atof( theStr.GetString() );
}
static SMESH::ElementType toElementType ( const LDOMString &  theStr) [inline, static]

Definition at line 3325 of file SMESH_Filter_i.cxx.

{
  if      ( theStr.equals( "NODE"   ) ) return SMESH::NODE;
  else if ( theStr.equals( "EDGE"   ) ) return SMESH::EDGE;
  else if ( theStr.equals( "FACE"   ) ) return SMESH::FACE;
  else if ( theStr.equals( "VOLUME" ) ) return SMESH::VOLUME;
  else                                  return SMESH::ALL;
}
static SMESH::FunctorType toFunctorType ( const LDOMString &  theStr) [inline, static]

Definition at line 3274 of file SMESH_Filter_i.cxx.

{
  if      ( theStr.equals( "Aspect ratio"                 ) ) return FT_AspectRatio;
  else if ( theStr.equals( "Warping"                      ) ) return FT_Warping;
  else if ( theStr.equals( "Minimum angle"                ) ) return FT_MinimumAngle;
  else if ( theStr.equals( "Taper"                        ) ) return FT_Taper;
  else if ( theStr.equals( "Skew"                         ) ) return FT_Skew;
  else if ( theStr.equals( "Area"                         ) ) return FT_Area;
  else if ( theStr.equals( "Volume3D"                     ) ) return FT_Volume3D;
  else if ( theStr.equals( "Max element length 2D"        ) ) return FT_MaxElementLength2D;
  else if ( theStr.equals( "Max element length 3D"        ) ) return FT_MaxElementLength3D;
  else if ( theStr.equals( "Belong to Geom"               ) ) return FT_BelongToGeom;
  else if ( theStr.equals( "Belong to Plane"              ) ) return FT_BelongToPlane;
  else if ( theStr.equals( "Belong to Cylinder"           ) ) return FT_BelongToCylinder;
  else if ( theStr.equals( "Belong to Generic Surface"    ) ) return FT_BelongToGenSurface;
  else if ( theStr.equals( "Lying on Geom"                ) ) return FT_LyingOnGeom;
  else if ( theStr.equals( "Free borders"                 ) ) return FT_FreeBorders;
  else if ( theStr.equals( "Free edges"                   ) ) return FT_FreeEdges;
  else if ( theStr.equals( "Free faces"                   ) ) return FT_FreeFaces;
  else if ( theStr.equals( "Free nodes"                   ) ) return FT_FreeNodes;
  else if ( theStr.equals( "Equal nodes"                  ) ) return FT_EqualNodes;
  else if ( theStr.equals( "Equal edges"                  ) ) return FT_EqualEdges;
  else if ( theStr.equals( "Equal faces"                  ) ) return FT_EqualFaces;
  else if ( theStr.equals( "Equal volumes"                ) ) return FT_EqualVolumes;
  else if ( theStr.equals( "Borders at multi-connections" ) ) return FT_MultiConnection;
  //  else if ( theStr.equals( "Borders at multi-connections 2D" ) ) return FT_MultiConnection2D;
  else if ( theStr.equals( "Length"                       ) ) return FT_Length;
  //  else if ( theStr.equals( "Length2D"                     ) ) return FT_Length2D;
  else if ( theStr.equals( "Range of IDs"                 ) ) return FT_RangeOfIds;
  else if ( theStr.equals( "Bad Oriented Volume"          ) ) return FT_BadOrientedVolume;
  else if ( theStr.equals( "Volumes with bare border"     ) ) return FT_BareBorderVolume;
  else if ( theStr.equals( "Faces with bare border"       ) ) return FT_BareBorderFace;
  else if ( theStr.equals( "Over-constrained Volumes"     ) ) return FT_OverConstrainedVolume;
  else if ( theStr.equals( "Over-constrained Faces"       ) ) return FT_OverConstrainedFace;
  else if ( theStr.equals( "Less than"                    ) ) return FT_LessThan;
  else if ( theStr.equals( "More than"                    ) ) return FT_MoreThan;
  else if ( theStr.equals( "Equal to"                     ) ) return FT_EqualTo;
  else if ( theStr.equals( "Not"                          ) ) return FT_LogicalNOT;
  else if ( theStr.equals( "And"                          ) ) return FT_LogicalAND;
  else if ( theStr.equals( "Or"                           ) ) return FT_LogicalOR;
  else if ( theStr.equals( "Color of Group"               ) ) return FT_GroupColor;
  else if ( theStr.equals( "Linear or Quadratic"          ) ) return FT_LinearOrQuadratic;
  else if ( theStr.equals( "Element geomtry type"         ) ) return FT_ElemGeomType;
  else if ( theStr.equals( ""                             ) ) return FT_Undefined;
  else  return FT_Undefined;
}
static LDOMString toString ( CORBA::Boolean  val) [inline, static]

Definition at line 3182 of file SMESH_Filter_i.cxx.

{
  return val ? "logical not" : "";
}

Here is the caller graph for this function:

static LDOMString toString ( CORBA::Double  val) [inline, static]

Definition at line 3200 of file SMESH_Filter_i.cxx.

{
  char a[ 255 ];
  sprintf( a, "%e", val );
  return LDOMString( a );
}
static LDOMString toString ( CORBA::Long  theType) [inline, static]

Definition at line 3220 of file SMESH_Filter_i.cxx.

{
  switch ( theType )
  {
    case FT_AspectRatio     : return "Aspect ratio";
    case FT_Warping         : return "Warping";
    case FT_MinimumAngle    : return "Minimum angle";
    case FT_Taper           : return "Taper";
    case FT_Skew            : return "Skew";
    case FT_Area            : return "Area";
    case FT_Volume3D        : return "Volume3D";
    case FT_MaxElementLength2D: return "Max element length 2D";
    case FT_MaxElementLength3D: return "Max element length 3D";
    case FT_BelongToGeom    : return "Belong to Geom";
    case FT_BelongToPlane   : return "Belong to Plane";
    case FT_BelongToCylinder: return "Belong to Cylinder";
    case FT_BelongToGenSurface: return "Belong to Generic Surface";
    case FT_LyingOnGeom     : return "Lying on Geom";
    case FT_BadOrientedVolume:return "Bad Oriented Volume";
    case FT_BareBorderVolume: return "Volumes with bare border";
    case FT_BareBorderFace  : return "Faces with bare border";
    case FT_OverConstrainedVolume: return "Over-constrained Volumes";
    case FT_OverConstrainedFace  : return "Over-constrained Faces";
    case FT_RangeOfIds      : return "Range of IDs";
    case FT_FreeBorders     : return "Free borders";
    case FT_FreeEdges       : return "Free edges";
    case FT_FreeFaces       : return "Free faces";
    case FT_FreeNodes       : return "Free nodes";
    case FT_EqualNodes      : return "Equal nodes";
    case FT_EqualEdges      : return "Equal edges";
    case FT_EqualFaces      : return "Equal faces";
    case FT_EqualVolumes    : return "Equal volumes";
    case FT_MultiConnection : return "Borders at multi-connections";
    case FT_MultiConnection2D:return "Borders at multi-connections 2D";
    case FT_Length          : return "Length";
    case FT_Length2D        : return "Length 2D";
    case FT_LessThan        : return "Less than";
    case FT_MoreThan        : return "More than";
    case FT_EqualTo         : return "Equal to";
    case FT_LogicalNOT      : return "Not";
    case FT_LogicalAND      : return "And";
    case FT_LogicalOR       : return "Or";
    case FT_GroupColor      : return "Color of Group";
    case FT_LinearOrQuadratic : return "Linear or Quadratic";
    case FT_ElemGeomType    : return "Element geomtry type";
    case FT_Undefined       : return "";
    default                 : return "";
  }
}
static LDOMString toString ( const SMESH::ElementType  theType) [inline, static]

Definition at line 3338 of file SMESH_Filter_i.cxx.

{
  switch ( theType )
  {
    case SMESH::NODE   : return "NODE";
    case SMESH::EDGE   : return "EDGE";
    case SMESH::FACE   : return "FACE";
    case SMESH::VOLUME : return "VOLUME";
    case SMESH::ALL    : return "ALL";
    default            : return "";
  }
}