return SMESH::FT_Length;
}
+/*
+ Class : Length2D_i
+ Description : Functor for calculating length of edge
+*/
+Length2D_i::Length2D_i()
+{
+ myNumericalFunctorPtr.reset( new Controls::Length2D() );
+ myFunctorPtr = myNumericalFunctorPtr;
+}
+
+FunctorType Length2D_i::GetFunctorType()
+{
+ return SMESH::FT_Length2D;
+}
+
+SMESH::Length2D::Values* Length2D_i::GetValues()
+{
+ INFOS("Length2D_i::GetValues");
+ SMESH::Controls::Length2D::TValues aValues;
+ myLength2DPtr->GetValues( aValues );
+
+ long i = 0, iEnd = aValues.size();
+
+ SMESH::Length2D::Values_var aResult = new SMESH::Length2D::Values(iEnd);
+
+ SMESH::Controls::Length2D::TValues::const_iterator anIter;
+ for ( anIter = aValues.begin() ; anIter != aValues.end(); anIter++, i++ )
+ {
+ const SMESH::Controls::Length2D::Value& aVal = *anIter;
+ SMESH::Length2D::Value &aValue = aResult[ i ];
+
+ aValue.myLength = aVal.myLength;
+ aValue.myPnt1 = aVal.myPntId[ 0 ];
+ aValue.myPnt2 = aVal.myPntId[ 1 ];
+
+ }
+
+ INFOS("Length2D_i::GetValuess~");
+ return aResult._retn();
+}
+
/*
Class : MultiConnection_i
Description : Functor for calculating number of faces conneted to the edge
return anObj._retn();
}
+Length2D_ptr FilterManager_i::CreateLength2D()
+{
+ SMESH::Length2D_i* aServant = new SMESH::Length2D_i();
+ SMESH::Length2D_var anObj = aServant->_this();
+ return anObj._retn();
+}
MultiConnection_ptr FilterManager_i::CreateMultiConnection()
{
case SMESH::FT_Length:
aFunctor = aFilterMgr->CreateLength();
break;
+ case SMESH::FT_Length2D:
+ aFunctor = aFilterMgr->CreateLength2D();
+ break;
case SMESH::FT_AspectRatio:
aFunctor = aFilterMgr->CreateAspectRatio();
break;
case FT_FreeEdges : return "Free edges";
case FT_MultiConnection : return "Borders at multi-connections";
case FT_Length : return "Length";
+ case FT_Length2D : return "Length2D";
case FT_LessThan : return "Less than";
case FT_MoreThan : return "More than";
case FT_EqualTo : return "Equal to";
FunctorType GetFunctorType();
};
+/*
+ Class : Length2D_i
+ Description : Functor for calculating length of edge
+*/
+class Length2D_i: public virtual POA_SMESH::Length2D,
+ public virtual NumericalFunctor_i
+{
+public:
+ Length2D_i();
+ SMESH::Length2D::Values* GetValues();
+ FunctorType GetFunctorType();
+
+protected:
+ Controls::Length2DPtr myLength2DPtr;
+};
+
/*
Class : MultiConnection_i
Skew_ptr CreateSkew();
Area_ptr CreateArea();
Length_ptr CreateLength();
+ Length2D_ptr CreateLength2D();
MultiConnection_ptr CreateMultiConnection();
BelongToGeom_ptr CreateBelongToGeom();