X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMDS%2FSMDS_VolumeOfFaces.cxx;h=2d1dc94e6f5a98835f700c8115a1c42395f62ad3;hp=c221452ba711c42c8ab15a756d3feb81b296f841;hb=c63ee099ad2b149bd70136839c973e8910137bc5;hpb=8d51808a8fa523dc3a98e8eeebea02a28b112f82 diff --git a/src/SMDS/SMDS_VolumeOfFaces.cxx b/src/SMDS/SMDS_VolumeOfFaces.cxx index c221452ba..2d1dc94e6 100644 --- a/src/SMDS/SMDS_VolumeOfFaces.cxx +++ b/src/SMDS/SMDS_VolumeOfFaces.cxx @@ -17,16 +17,23 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // // -// File : SMDS_MeshVolume.cxx +// File : SMDS_VolumeOfFaces.cxx // Author : Jean-Michel BOULCOURT // Module : SMESH +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + #include "SMDS_VolumeOfFaces.hxx" #include "SMDS_IteratorOfElements.hxx" + +using namespace std; + //======================================================================= //function : Print //purpose : @@ -36,74 +43,91 @@ void SMDS_VolumeOfFaces::Print(ostream & OS) const { OS << "volume <" << GetID() << "> : "; int i; - for (i = 0; i < myFaces.size()-1; ++i) OS << myFaces[i] << ","; + for (i = 0; i < NbFaces()-1; ++i) OS << myFaces[i] << ","; OS << myFaces[i]<< ") " << endl; } int SMDS_VolumeOfFaces::NbFaces() const { - return myFaces.size(); + return myNbFaces; } -SMDS_Iterator * SMDS_VolumeOfFaces:: - elementsIterator(SMDSAbs_ElementType type) const +class SMDS_VolumeOfFaces_MyIterator:public SMDS_ElemIterator { - class MyIterator:public SMDS_Iterator - { - const vector& mySet; - int index; - public: - MyIterator(const vector& s):mySet(s),index(0) - {} + const SMDS_MeshFace* const *mySet; + int myLength; + int index; + public: + SMDS_VolumeOfFaces_MyIterator(const SMDS_MeshFace* const *s, int l): + mySet(s),myLength(l),index(0) {} - bool more() - { - return index