]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMDS/SMDS_QuadraticFaceOfNodes.cxx
Salome HOME
EDF 1575 SMESH: Filters and precision preferences
[modules/smesh.git] / src / SMDS / SMDS_QuadraticFaceOfNodes.cxx
index b981bd92f68be7168097e340fda17f730aaf9a21..6b69227ced5ca29d46399a2f91ce7fff8be371f8 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 // File:      SMDS_QuadraticFaceOfNodes.cxx
 // Created:   16.01.06 17:12:58
@@ -255,7 +256,7 @@ public:
   _MyEdgeIterator(const SMDS_QuadraticFaceOfNodes* face):myIndex(0) {
     myElems.reserve( face->NbNodes() );
     SMDS_ElemIteratorPtr nIt = face->interlacedNodesElemIterator();
-    const SMDS_MeshNode* n0 = face->GetNode( -1 );
+    const SMDS_MeshNode* n0 = face->GetNodeWrap( -1 );
     while ( nIt->more() ) {
       const SMDS_MeshNode* n1 = static_cast<const SMDS_MeshNode*>( nIt->next() );
       const SMDS_MeshElement* edge = SMDS_Mesh::FindEdge( n0, n1 );
@@ -300,11 +301,13 @@ SMDS_ElemIteratorPtr SMDS_QuadraticFaceOfNodes::elementsIterator
  * \brief Return node by its index
  * \param ind - node index
  * \retval const SMDS_MeshNode* - the node
- * 
- * Index is wrapped if it is out of a valid range
  */
 const SMDS_MeshNode* SMDS_QuadraticFaceOfNodes::GetNode(const int ind) const
 {
-  return myNodes[ WrappedIndex( ind )];
+  return myNodes[ ind ];
 }
 
+SMDSAbs_EntityType SMDS_QuadraticFaceOfNodes::GetEntityType() const
+{
+  return NbNodes() == 6 ? SMDSEntity_Quad_Triangle : SMDSEntity_Quad_Quadrangle;
+}