From: eap Date: Thu, 16 May 2013 16:16:22 +0000 (+0000) Subject: 0022100: EDF 2413 SMESH: Take into account TRIA7 X-Git-Tag: V7_3_0a1~476 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1267641d31cdd830c26d01f91dab0883774f0897;p=modules%2Fsmesh.git 0022100: EDF 2413 SMESH: Take into account TRIA7 Now SMDS_VtkCellIteratorToUNV inherits from SMDS_NodeIterator and hence next() returns a node -class SMDS_VtkCellIteratorToUNV: public SMDS_VtkCellIterator +class SMDS_VtkCellIteratorToUNV: public SMDS_NodeIterator, protected SMDS_VtkCellIterator { public: SMDS_VtkCellIteratorToUNV(SMDS_Mesh* mesh, int vtkCellId, SMDSAbs_EntityType aType); + virtual const SMDS_MeshNode* next(); + virtual bool more(); virtual ~SMDS_VtkCellIteratorToUNV(); }; --- diff --git a/src/SMDS/SMDS_VtkCellIterator.cxx b/src/SMDS/SMDS_VtkCellIterator.cxx index bf1988343..26229a4cf 100644 --- a/src/SMDS/SMDS_VtkCellIterator.cxx +++ b/src/SMDS/SMDS_VtkCellIterator.cxx @@ -81,9 +81,11 @@ SMDS_VtkCellIteratorToUNV::SMDS_VtkCellIteratorToUNV(SMDS_Mesh* mesh, int vtkCel break; } case SMDSEntity_Quad_Triangle: + case SMDSEntity_BiQuad_Triangle: { static int id[] = { 0, 3, 1, 4, 2, 5 }; ids = id; + _nbNodes = 6; break; } case SMDSEntity_Quad_Quadrangle: @@ -146,6 +148,16 @@ SMDS_VtkCellIteratorToUNV::SMDS_VtkCellIteratorToUNV(SMDS_Mesh* mesh, int vtkCel _vtkIdList->SetId(i, pts[i]); } +bool SMDS_VtkCellIteratorToUNV::more() +{ + return SMDS_VtkCellIterator::more(); +} + +const SMDS_MeshNode* SMDS_VtkCellIteratorToUNV::next() +{ + return static_cast< const SMDS_MeshNode* >( SMDS_VtkCellIterator::next() ); +} + SMDS_VtkCellIteratorToUNV::~SMDS_VtkCellIteratorToUNV() { } diff --git a/src/SMDS/SMDS_VtkCellIterator.hxx b/src/SMDS/SMDS_VtkCellIterator.hxx index 740bbf614..c9994853c 100644 --- a/src/SMDS/SMDS_VtkCellIterator.hxx +++ b/src/SMDS/SMDS_VtkCellIterator.hxx @@ -52,10 +52,12 @@ protected: vtkIdList* _vtkIdList; }; -class SMDS_VtkCellIteratorToUNV: public SMDS_VtkCellIterator +class SMDS_VtkCellIteratorToUNV: public SMDS_NodeIterator, protected SMDS_VtkCellIterator { public: SMDS_VtkCellIteratorToUNV(SMDS_Mesh* mesh, int vtkCellId, SMDSAbs_EntityType aType); + virtual const SMDS_MeshNode* next(); + virtual bool more(); virtual ~SMDS_VtkCellIteratorToUNV(); };