X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2FOBJECT%2FSMESH_Object.cxx;h=30544754989fdeb7b411fab88f64a64c9c5edfbb;hb=f94864f0a52c5d1e7e40fa29fc57dade13523fae;hp=9bdc652a09b9c260bf07555077489f601875a9c5;hpb=79b1ac2b6df9117f16f11d444b1f165d477a1813;p=modules%2Fsmesh.git diff --git a/src/OBJECT/SMESH_Object.cxx b/src/OBJECT/SMESH_Object.cxx index 9bdc652a0..305447549 100644 --- a/src/OBJECT/SMESH_Object.cxx +++ b/src/OBJECT/SMESH_Object.cxx @@ -1,30 +1,29 @@ -// SMESH OBJECT : interactive object for SMESH visualization +// Copyright (C) 2007-2008 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 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 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 -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// 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. // +// 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 +// +// SMESH OBJECT : interactive object for SMESH visualization // File : SMESH_Grid.cxx // Author : Nicolas REJNERI // Module : SMESH - +// #include "SMESH_ObjectDef.h" #include "SMESH_ActorUtils.h" @@ -112,7 +111,10 @@ static inline vtkIdType getCellType( const SMDSAbs_ElementType theType, else if ( theNbNodes == 20 ) { return VTK_QUADRATIC_HEXAHEDRON; } - else if ( theNbNodes==13 || theNbNodes==15 ) { + else if ( theNbNodes == 15 ) { + return VTK_QUADRATIC_WEDGE; + } + else if ( theNbNodes==13 ) { return VTK_CONVEX_POINT_SET; } else return VTK_EMPTY_CELL; @@ -142,22 +144,26 @@ SMESH_VisualObjDef::~SMESH_VisualObjDef() //================================================================================= vtkIdType SMESH_VisualObjDef::GetNodeObjId( int theVTKID ) { - return myVTK2SMDSNodes.find(theVTKID) == myVTK2SMDSNodes.end() ? -1 : myVTK2SMDSNodes[theVTKID]; + TMapOfIds::const_iterator i = myVTK2SMDSNodes.find(theVTKID); + return i == myVTK2SMDSNodes.end() ? -1 : i->second; } vtkIdType SMESH_VisualObjDef::GetNodeVTKId( int theObjID ) { - return mySMDS2VTKNodes.find(theObjID) == mySMDS2VTKNodes.end() ? -1 : mySMDS2VTKNodes[theObjID]; + TMapOfIds::const_iterator i = mySMDS2VTKNodes.find(theObjID); + return i == mySMDS2VTKNodes.end() ? -1 : i->second; } vtkIdType SMESH_VisualObjDef::GetElemObjId( int theVTKID ) { - return myVTK2SMDSElems.find(theVTKID) == myVTK2SMDSElems.end() ? -1 : myVTK2SMDSElems[theVTKID]; + TMapOfIds::const_iterator i = myVTK2SMDSElems.find(theVTKID); + return i == myVTK2SMDSElems.end() ? -1 : i->second; } vtkIdType SMESH_VisualObjDef::GetElemVTKId( int theObjID ) { - return mySMDS2VTKElems.find(theObjID) == mySMDS2VTKElems.end() ? -1 : mySMDS2VTKElems[theObjID]; + TMapOfIds::const_iterator i = mySMDS2VTKElems.find(theObjID); + return i == mySMDS2VTKElems.end() ? -1 : i->second; } //================================================================================= @@ -404,7 +410,8 @@ void SMESH_VisualObjDef::buildElemPrs() for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]); } else if (aNbNodes == 15) { - static int anIds[] = {0,2,1,3,5,4,8,7,6,11,10,9,12,14,13}; + //static int anIds[] = {0,2,1,3,5,4,8,7,6,11,10,9,12,14,13}; + static int anIds[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14}; for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]); //for (int k = 0; k < aNbNodes; k++) { // int nn = aConnectivities[k];