From: eap Date: Mon, 10 Oct 2005 14:43:58 +0000 (+0000) Subject: IMP 10199 (add Volume Control). Add Volume3D NumericalFunctor. X-Git-Tag: ForTest_3_1_0a2~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4f27e7392a109bdc465b943b8d92d969e93f129c;p=modules%2Fsmesh.git IMP 10199 (add Volume Control). Add Volume3D NumericalFunctor. --- diff --git a/src/SMESH_I/SMESH_Filter_i.cxx b/src/SMESH_I/SMESH_Filter_i.cxx index b53448c3f..2feeadf0a 100644 --- a/src/SMESH_I/SMESH_Filter_i.cxx +++ b/src/SMESH_I/SMESH_Filter_i.cxx @@ -565,6 +565,21 @@ FunctorType Area_i::GetFunctorType() return SMESH::FT_Area; } +/* + Class : Volume3D_i + Description : Functor for calculating volume of 3D element +*/ +Volume3D_i::Volume3D_i() +{ + myNumericalFunctorPtr.reset( new Controls::Volume() ); + myFunctorPtr = myNumericalFunctorPtr; +} + +FunctorType Volume3D_i::GetFunctorType() +{ + return SMESH::FT_Volume3D; +} + /* Class : Length_i Description : Functor for calculating length off edge @@ -1362,6 +1377,15 @@ Area_ptr FilterManager_i::CreateArea() } +Volume3D_ptr FilterManager_i::CreateVolume3D() +{ + SMESH::Volume3D_i* aServant = new SMESH::Volume3D_i(); + SMESH::Volume3D_var anObj = aServant->_this(); + TPythonDump()<CreateArea(); break; + case SMESH::FT_Volume3D: + aFunctor = aFilterMgr->CreateVolume3D(); + break; // Predicates @@ -2159,6 +2186,7 @@ static inline LDOMString toString( const long theType ) case FT_Taper : return "Taper"; case FT_Skew : return "Skew"; case FT_Area : return "Area"; + case FT_Volume3D : return "Volume3D"; case FT_BelongToGeom : return "Belong to Geom"; case FT_BelongToPlane : return "Belong to Plane"; case FT_BelongToCylinder: return "Belong to Cylinder"; @@ -2194,6 +2222,7 @@ static inline SMESH::FunctorType toFunctorType( const LDOMString& theStr ) 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( "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; diff --git a/src/SMESH_I/SMESH_Filter_i.hxx b/src/SMESH_I/SMESH_Filter_i.hxx index b634bfe9d..2e885b7fc 100644 --- a/src/SMESH_I/SMESH_Filter_i.hxx +++ b/src/SMESH_I/SMESH_Filter_i.hxx @@ -239,6 +239,19 @@ namespace SMESH }; + /* + Class : Volume3D_i + Description : Functor for calculating volume of 3D element + */ + class Volume3D_i: public virtual POA_SMESH::Volume3D, + public virtual NumericalFunctor_i + { + public: + Volume3D_i(); + FunctorType GetFunctorType(); + }; + + /* Class : Length_i Description : Functor for calculating length of edge @@ -739,6 +752,7 @@ namespace SMESH Taper_ptr CreateTaper(); Skew_ptr CreateSkew(); Area_ptr CreateArea(); + Volume3D_ptr CreateVolume3D(); Length_ptr CreateLength(); Length2D_ptr CreateLength2D(); MultiConnection_ptr CreateMultiConnection();