]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0022100: EDF 2413 SMESH: Take into account TRIA7
authoreap <eap@opencascade.com>
Thu, 16 May 2013 16:11:35 +0000 (16:11 +0000)
committereap <eap@opencascade.com>
Thu, 16 May 2013 16:11:35 +0000 (16:11 +0000)
src/SMDS/SMDS_MeshCell.cxx
src/SMDS/SMDS_UnstructuredGrid.cxx

index d1c8f346233dadbdf52546ea634fa7c8a0e31f54..04e843490b443886011d2d462a9668a66253fed5 100644 (file)
@@ -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:
index 5a541c8fe34592ef811bb354b7cefcf46526eb25..6d16a9dd03b37665df49c6c5a1e8924f5a806795 100644 (file)
@@ -402,6 +402,7 @@ void SMDS_UnstructuredGrid::BuildDownwardConnectivity(bool withEdges)
   _downArray[VTK_QUADRATIC_EDGE]          = new SMDS_DownQuadEdge(this);
   _downArray[VTK_TRIANGLE]                = new SMDS_DownTriangle(this);
   _downArray[VTK_QUADRATIC_TRIANGLE]      = new SMDS_DownQuadTriangle(this);
+  _downArray[VTK_BIQUADRATIC_TRIANGLE]    = new SMDS_DownQuadTriangle(this);
   _downArray[VTK_QUAD]                    = new SMDS_DownQuadrangle(this);
   _downArray[VTK_QUADRATIC_QUAD]          = new SMDS_DownQuadQuadrangle(this);
   _downArray[VTK_BIQUADRATIC_QUAD]        = new SMDS_DownQuadQuadrangle(this);
@@ -442,6 +443,7 @@ void SMDS_UnstructuredGrid::BuildDownwardConnectivity(bool withEdges)
   GuessSize[VTK_QUADRATIC_EDGE]          = nbQuadEdgeGuess;
   GuessSize[VTK_TRIANGLE]                = nbLinTriaGuess;
   GuessSize[VTK_QUADRATIC_TRIANGLE]      = nbQuadTriaGuess;
+  GuessSize[VTK_BIQUADRATIC_TRIANGLE]    = nbQuadTriaGuess;
   GuessSize[VTK_QUAD]                    = nbLinQuadGuess;
   GuessSize[VTK_QUADRATIC_QUAD]          = nbQuadQuadGuess;
   GuessSize[VTK_BIQUADRATIC_QUAD]        = nbQuadQuadGuess;
@@ -460,6 +462,7 @@ void SMDS_UnstructuredGrid::BuildDownwardConnectivity(bool withEdges)
   _downArray[VTK_QUADRATIC_EDGE]         ->allocate(nbQuadEdgeGuess);
   _downArray[VTK_TRIANGLE]               ->allocate(nbLinTriaGuess);
   _downArray[VTK_QUADRATIC_TRIANGLE]     ->allocate(nbQuadTriaGuess);
+  _downArray[VTK_BIQUADRATIC_TRIANGLE]   ->allocate(nbQuadTriaGuess);
   _downArray[VTK_QUAD]                   ->allocate(nbLinQuadGuess);
   _downArray[VTK_QUADRATIC_QUAD]         ->allocate(nbQuadQuadGuess);
   _downArray[VTK_BIQUADRATIC_QUAD]       ->allocate(nbQuadQuadGuess);