Salome HOME
Fix a bug reported to SALOME Forum http://www.salome-platform.org/forum/forum_10...
[modules/smesh.git] / src / StdMeshers / StdMeshers_Penta_3D.cxx
index 7ae2e3a5400b2a8fcf0f2219d321d6ada5116e4e..9cfacf91efe4dd1184fbf10c57eeab42d73d3705 100644 (file)
@@ -1,24 +1,25 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2011  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
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU Lesser General Public
-//  License as published by the Free Software Foundation; either
-//  version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers_Penta_3D implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Penta_3D.cxx
 //  Module : SMESH
@@ -234,7 +235,7 @@ void StdMeshers_Penta_3D::MakeNodes()
       //
       if ( SMESH_Block::IsEdgeID (aSID)) {
         const SMDS_EdgePosition* epos =
-          static_cast<const SMDS_EdgePosition*>(aNode->GetPosition().get());
+          static_cast<const SMDS_EdgePosition*>(aNode->GetPosition());
         myBlock.ComputeParameters( epos->GetUParameter(), aS, aCoords );
       }
       else {
@@ -675,22 +676,16 @@ void StdMeshers_Penta_3D::MakeVolumeMesh()
     if ( aN.size() < nbFaceNodes * 2 )
       aN.resize( nbFaceNodes * 2 );
     //
-    k=0;
-    aItNodes=pE0->nodesIterator();
-    while (aItNodes->more()) {
-      //const SMDS_MeshElement* pNode = aItNodes->next();
-      const SMDS_MeshNode* pNode =
-        static_cast<const SMDS_MeshNode*> (aItNodes->next());
-      if(myTool->IsMedium(pNode))
-        continue;
+    for ( k=0; k<nbFaceNodes; ++k ) {
+      const SMDS_MeshNode* pNode = pE0->GetNode(k);
+//       if(myTool->IsMedium(pNode))
+//         continue;
       aID0 = pNode->GetID();
       aJ[k] = GetIndexOnLayer(aID0);
       if (!myErrorStatus->IsOK()) {
         MESSAGE("StdMeshers_Penta_3D::MakeVolumeMesh");
         return;
       }
-      //
-      ++k;
     }
     //
     bool forward = true;
@@ -1470,7 +1465,7 @@ bool StdMeshers_Penta_3D::LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes,
     if(myTool->IsMedium(node))
       continue;
     const SMDS_EdgePosition* pos =
-      dynamic_cast<const SMDS_EdgePosition*>( node->GetPosition().get() );
+      dynamic_cast<const SMDS_EdgePosition*>( node->GetPosition() );
     if ( !pos ) {
       return false;
     }
@@ -1493,7 +1488,7 @@ bool StdMeshers_Penta_3D::LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes,
     if(myTool->IsMedium(node))
       continue;
     const SMDS_EdgePosition* pos =
-      dynamic_cast<const SMDS_EdgePosition*>( node->GetPosition().get() );
+      dynamic_cast<const SMDS_EdgePosition*>( node->GetPosition() );
     if ( !pos ) {
       return false;
     }