Salome HOME
0022523: [CEA 1096] Add a colomn "biquadratic" in "Mesh Information"
[modules/smesh.git] / src / SMDS / SMDS_MeshCell.cxx
index 521c976ffbc4d6656252086f3ca83e7a4b7c9c61..fe15abccad5c57ecdb80f1833c8c6944274aad7a 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -51,6 +51,7 @@ VTKCellType SMDS_MeshCell::toVtkType (SMDSAbs_EntityType smdsType)
     vtkTypes[ SMDSEntity_Quad_Edge ]         = VTK_QUADRATIC_EDGE;
     vtkTypes[ SMDSEntity_Triangle ]          = VTK_TRIANGLE;
     vtkTypes[ SMDSEntity_Quad_Triangle ]     = VTK_QUADRATIC_TRIANGLE;
+    vtkTypes[ SMDSEntity_BiQuad_Triangle ]   = VTK_BIQUADRATIC_TRIANGLE;
     vtkTypes[ SMDSEntity_Quadrangle ]        = VTK_QUAD;
     vtkTypes[ SMDSEntity_Quad_Quadrangle ]   = VTK_QUADRATIC_QUAD;
     vtkTypes[ SMDSEntity_BiQuad_Quadrangle ] = VTK_BIQUADRATIC_QUAD;
@@ -198,6 +199,10 @@ const std::vector<int>& SMDS_MeshCell::reverseSmdsOrder(SMDSAbs_EntityType smdsT
       const int ids[] = {0,2,1,5,4,3};
       reverseInterlaces[SMDSEntity_Quad_Triangle].assign( &ids[0], &ids[0]+6 );
     }
+    {
+      const int ids[] = {0,2,1,5,4,3,6};
+      reverseInterlaces[SMDSEntity_BiQuad_Triangle].assign( &ids[0], &ids[0]+7 );
+    }
     {
       const int ids[] = {0,3,2,1};
       reverseInterlaces[SMDSEntity_Quadrangle].assign( &ids[0], &ids[0]+4 );
@@ -272,8 +277,9 @@ const std::vector<int>& SMDS_MeshCell::interlacedSmdsOrder(SMDSAbs_EntityType sm
       interlace[SMDSEntity_Quad_Edge].assign( &ids[0], &ids[0]+3 );
     }
     {
-      const int ids[] = {0,3,1,4,2,5};
+      const int ids[] = {0,3,1,4,2,5,6};
       interlace[SMDSEntity_Quad_Triangle].assign( &ids[0], &ids[0]+6 );
+      interlace[SMDSEntity_BiQuad_Triangle].assign( &ids[0], &ids[0]+7 );
     }
     {
       const int ids[] = {0,4,1,5,2,6,3,7,8};
@@ -351,6 +357,7 @@ SMDSAbs_ElementType SMDS_MeshCell::toSmdsType(SMDSAbs_EntityType entityType)
 
   case SMDSEntity_Triangle:
   case SMDSEntity_Quad_Triangle:
+  case SMDSEntity_BiQuad_Triangle:
   case SMDSEntity_Quadrangle:
   case SMDSEntity_Quad_Quadrangle:
   case SMDSEntity_BiQuad_Quadrangle: