return SMESH::FT_Taper;
}
-
/*
Class : Skew_i
Description : Functor for calculating skew in degrees
return SMESH::FT_ElemGeomType;
}
+/*
+ Class : ElemEntityType_i
+ Description : Predicate check is element has indicated entity type
+*/
+ElemEntityType_i::ElemEntityType_i()
+{
+ myElemEntityTypePtr.reset(new Controls::ElemEntityType());
+ myFunctorPtr = myPredicatePtr = myElemEntityTypePtr;
+}
+
+void ElemEntityType_i::SetElementType(ElementType theType)
+{
+ myElemEntityTypePtr->SetType(SMDSAbs_ElementType(theType));
+ TPythonDump()<<this<<".SetElementType("<<theType<<")";
+}
+
+void ElemEntityType_i::SetEntityType(EntityType theEntityType)
+{
+ myElemEntityTypePtr->SetElemEntityType(SMDSAbs_EntityType (theEntityType));
+ TPythonDump()<<this<<".SetEntityType("<<theEntityType<<")";
+}
+EntityType ElemEntityType_i::GetEntityType() const
+{
+ return (EntityType) myElemEntityTypePtr->GetElemEntityType();
+}
+
+FunctorType ElemEntityType_i::GetFunctorType()
+{
+ return SMESH::FT_EntityType;
+}
+
/*
Class : CoplanarFaces_i
Description : Returns true if a mesh face is a coplanar neighbour to a given one
return anObj._retn();
}
+ElemEntityType_ptr FilterManager_i::CreateElemEntityType()
+{
+ SMESH::ElemEntityType_i* aServant = new SMESH::ElemEntityType_i();
+ SMESH::ElemEntityType_var anObj = aServant->_this();
+ TPythonDump()<<aServant<<" = "<<this<<".CreateElemEntityType()";
+ return anObj._retn();
+}
+
Filter_ptr FilterManager_i::CreateFilter()
{
SMESH::Filter_i* aServant = new SMESH::Filter_i();
theCriteria[ i ].Threshold = (double)aPred->GetGeometryType();
return true;
}
+ case FT_EntityType:
+ {
+ CORBA::ULong i = theCriteria->length();
+ theCriteria->length( i + 1 );
+
+ theCriteria[ i ] = createCriterion();
+
+ ElemEntityType_i* aPred = dynamic_cast<ElemEntityType_i*>( thePred );
+ theCriteria[ i ].Type = aFType;
+ theCriteria[ i ].Threshold = (double)aPred->GetEntityType();
+ return true;
+ }
case FT_Undefined:
return false;
aPredicate = tmpPred;
break;
}
+ case SMESH::FT_EntityType:
+ {
+ SMESH::ElemEntityType_ptr tmpPred = aFilterMgr->CreateElemEntityType();
+ tmpPred->SetElementType( aTypeOfElem );
+ tmpPred->SetEntityType( EntityType( (int (aThreshold + 0.5))));
+ aPredicate = tmpPred;
+ break;
+ }
case SMESH::FT_CoplanarFaces:
{
SMESH::CoplanarFaces_ptr tmpPred = aFilterMgr->CreateCoplanarFaces();
case FT_GroupColor : return "Color of Group";
case FT_LinearOrQuadratic : return "Linear or Quadratic";
case FT_ElemGeomType : return "Element geomtry type";
+ case FT_EntityType : return "Entity type";
case FT_Undefined : return "";
default : return "";
}
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( "Entity type" ) ) return FT_EntityType;
else if ( theStr.equals( "" ) ) return FT_Undefined;
else return FT_Undefined;
}
"FT_LinearOrQuadratic",
"FT_GroupColor",
"FT_ElemGeomType",
+ "FT_EntityType",
"FT_CoplanarFaces",
"FT_BallDiameter",
"FT_LessThan",
"FT_LogicalNOT",
"FT_LogicalAND",
"FT_LogicalOR",
- "FT_Undefined" };
+ "FT_Undefined"};
return functName;
}
Controls::Length2DPtr myLength2DPtr;
};
-
/*
Class : MultiConnection_i
Description : Functor for calculating number of faces conneted to the edge
OverConstrainedFace_i();
FunctorType GetFunctorType();
};
-
+
/*
Class : BelongToGeom_i
Description : Predicate for selection on geometrical support
private:
Controls::ElemGeomTypePtr myElemGeomTypePtr;
};
+
+ /*
+ Class : ElemEntityType_i
+ Description : Functor for check element entity type
+ */
+ class SMESH_I_EXPORT ElemEntityType_i: public virtual POA_SMESH::ElemEntityType,
+ public virtual Predicate_i
+ {
+ public:
+ ElemEntityType_i();
+ FunctorType GetFunctorType();
+
+ void SetElementType ( ElementType theType );
+ void SetEntityType( EntityType theEntityType );
+ EntityType GetEntityType() const;
+
+ private:
+ Controls::ElemEntityTypePtr myElemEntityTypePtr;
+ };
/*
Class : CoplanarFaces_i
LinearOrQuadratic_ptr CreateLinearOrQuadratic();
GroupColor_ptr CreateGroupColor();
ElemGeomType_ptr CreateElemGeomType();
+ ElemEntityType_ptr CreateElemEntityType();
CoplanarFaces_ptr CreateCoplanarFaces();
LessThan_ptr CreateLessThan();