]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0022100: EDF 2413 SMESH: Take into account TRIA7
authoreap <eap@opencascade.com>
Thu, 16 May 2013 16:16:22 +0000 (16:16 +0000)
committereap <eap@opencascade.com>
Thu, 16 May 2013 16:16:22 +0000 (16:16 +0000)
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();
 };

src/SMDS/SMDS_VtkCellIterator.cxx
src/SMDS/SMDS_VtkCellIterator.hxx

index bf198834306cef2f2194e36373b76c691bceff3c..26229a4cf885c8cd23cdaee7af08cbc0c0b9c55c 100644 (file)
@@ -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()
 {
 }
index 740bbf614185a1cffc492fb209dcc5d9a80c7519..c9994853cf78edfeb9126490bf54306be0ea80ed 100644 (file)
@@ -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();
 };