]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix of 20123 issue (EDF VISU 914 : Pyramids are not displayed for ELGA field).
authorakl <akl@opencascade.com>
Thu, 15 Jan 2009 13:32:20 +0000 (13:32 +0000)
committerakl <akl@opencascade.com>
Thu, 15 Jan 2009 13:32:20 +0000 (13:32 +0000)
src/VTKViewer/VTKViewer_GeometryFilter.cxx

index 1fbe9f74988c15c8b4738b9182a1b5c6984e32a0..c9f40a734dd00ac6d5490479762214f21dc7d7a6 100755 (executable)
@@ -477,6 +477,7 @@ VTKViewer_GeometryFilter
         case VTK_QUADRATIC_TETRA:
         case VTK_QUADRATIC_HEXAHEDRON:
         case VTK_QUADRATIC_WEDGE:
+        case VTK_QUADRATIC_PYRAMID:
          if(!myIsWireframeMode){
            input->GetCell(cellId,cell);
            vtkIdList *pts = vtkIdList::New();  
@@ -829,6 +830,85 @@ VTKViewer_GeometryFilter
              
              outputCD->CopyData(cd,cellId,newCellId);
              
+             break;
+           }
+           case VTK_QUADRATIC_PYRAMID: {
+             aCellType = VTK_POLYGON;
+             numFacePts = 6;
+             
+             //---------------------------------------------------------------
+             aNewPts[0] = pts[0];
+             aNewPts[1] = pts[8];
+             aNewPts[2] = pts[3];
+             aNewPts[3] = pts[12];
+             aNewPts[4] = pts[4];
+             aNewPts[5] = pts[9];
+             
+             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+             if(myStoreMapping)
+               myVTK2ObjIds.push_back(cellId);
+             
+             outputCD->CopyData(cd,cellId,newCellId);
+
+             //---------------------------------------------------------------
+             aNewPts[0] = pts[0];
+             aNewPts[1] = pts[9];
+             aNewPts[2] = pts[4];
+             aNewPts[3] = pts[10];
+             aNewPts[4] = pts[1];
+             aNewPts[5] = pts[5];
+             
+             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+             if(myStoreMapping)
+               myVTK2ObjIds.push_back(cellId);
+             
+             outputCD->CopyData(cd,cellId,newCellId);
+
+             //---------------------------------------------------------------
+             aNewPts[0] = pts[1];
+             aNewPts[1] = pts[10];
+             aNewPts[2] = pts[4];
+             aNewPts[3] = pts[11];
+             aNewPts[4] = pts[2];
+             aNewPts[5] = pts[6];
+             
+             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+             if(myStoreMapping)
+               myVTK2ObjIds.push_back(cellId);
+             
+             outputCD->CopyData(cd,cellId,newCellId);
+
+             //---------------------------------------------------------------
+             aNewPts[0] = pts[2];
+             aNewPts[1] = pts[11];
+             aNewPts[2] = pts[4];
+             aNewPts[3] = pts[12];
+             aNewPts[4] = pts[3];
+             aNewPts[5] = pts[7];
+             
+             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+             if(myStoreMapping)
+               myVTK2ObjIds.push_back(cellId);
+             
+             outputCD->CopyData(cd,cellId,newCellId);
+
+             //---------------------------------------------------------------
+              numFacePts = 8;
+             aNewPts[0] = pts[0];
+             aNewPts[1] = pts[5];
+             aNewPts[2] = pts[1];
+             aNewPts[3] = pts[6];
+             aNewPts[4] = pts[2];
+             aNewPts[5] = pts[7];
+             aNewPts[6] = pts[3];
+             aNewPts[7] = pts[8];
+             
+             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+             if(myStoreMapping)
+               myVTK2ObjIds.push_back(cellId);
+             
+             outputCD->CopyData(cd,cellId,newCellId);
+
              break;
            }}
          }