From 580dfddb7206f6832a4c7aa05a801692f400cee3 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 16 May 2013 16:11:35 +0000 Subject: [PATCH] 0022100: EDF 2413 SMESH: Take into account TRIA7 --- src/SMDS/SMDS_MeshCell.cxx | 9 ++++++++- src/SMDS/SMDS_UnstructuredGrid.cxx | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/SMDS/SMDS_MeshCell.cxx b/src/SMDS/SMDS_MeshCell.cxx index d1c8f3462..04e843490 100644 --- a/src/SMDS/SMDS_MeshCell.cxx +++ b/src/SMDS/SMDS_MeshCell.cxx @@ -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& 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& 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: diff --git a/src/SMDS/SMDS_UnstructuredGrid.cxx b/src/SMDS/SMDS_UnstructuredGrid.cxx index 5a541c8fe..6d16a9dd0 100644 --- a/src/SMDS/SMDS_UnstructuredGrid.cxx +++ b/src/SMDS/SMDS_UnstructuredGrid.cxx @@ -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); -- 2.39.2