From: rnv Date: Thu, 12 Jan 2012 11:41:41 +0000 (+0000) Subject: Implementation of the X-Git-Tag: V6_main_20120113~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4f22670036a39645f2fa04e3cd33e00a67168a11;p=modules%2Fvisu.git Implementation of the 1) 0021347: [CEA 497] Visualisation into SMESH and VISU of hexagonal prism cells (MED_OCTA12). 2) 0021380: EDF 1937 SMESH: Take into account QUAD9 and HEXA27. in the POST-PRO and SMESH modules. --- diff --git a/src/CONVERTOR/VISU_ConvertorDef.hxx b/src/CONVERTOR/VISU_ConvertorDef.hxx index dc0eabfc..cc71569c 100644 --- a/src/CONVERTOR/VISU_ConvertorDef.hxx +++ b/src/CONVERTOR/VISU_ConvertorDef.hxx @@ -44,9 +44,9 @@ namespace VISU //--------------------------------------------------------------- //! Defines VISU enumeration of geometrical types enum EGeometry {ePOINT1=1, eSEG2=102, eSEG3=103, eTRIA3=203, - eQUAD4=204, eTRIA6=206,eQUAD8=208, eTETRA4=304, - ePYRA5=305, ePENTA6=306, eHEXA8=308, eTETRA10=310, - ePYRA13=313, ePENTA15=315, eHEXA20=320, + eQUAD4=204, eTRIA6=206,eQUAD8=208, eQUAD9=209, eTETRA4=304, + ePYRA5=305, ePENTA6=306, eHEXA8=308, eOCTA12=312, eTETRA10=310, + ePYRA13=313, ePENTA15=315, eHEXA20=320, eHEXA27=327, ePOLYGONE=400, ePOLYEDRE=500, eNONE=-1}; diff --git a/src/CONVERTOR/VISU_ConvertorUtils.cxx b/src/CONVERTOR/VISU_ConvertorUtils.cxx index ab8088d6..13048209 100644 --- a/src/CONVERTOR/VISU_ConvertorUtils.cxx +++ b/src/CONVERTOR/VISU_ConvertorUtils.cxx @@ -68,10 +68,14 @@ namespace VISU return 3; case VISU::eQUAD8: return 4; + case VISU::eQUAD9: + return 4; case VISU::eTETRA10: return 4; case VISU::eHEXA20: return 8; + case VISU::eHEXA27: + return 8; case VISU::ePENTA15: return 6; case VISU::ePYRA13: @@ -107,7 +111,8 @@ namespace VISU return VTK_WEDGE; case VISU::ePYRA5: return VTK_PYRAMID; - + case VISU::eOCTA12: + return VTK_HEXAGONAL_PRISM; case VISU::ePOLYGONE: return VTK_POLYGON; case VISU::ePOLYEDRE: @@ -120,10 +125,14 @@ namespace VISU return VTK_TRIANGLE; case VISU::eQUAD8: return VTK_QUAD; + case VISU::eQUAD9: + return VTK_QUAD; case VISU::eTETRA10: return VTK_TETRA; case VISU::eHEXA20: return VTK_HEXAHEDRON; + case VISU::eHEXA27: + return VTK_TRIQUADRATIC_HEXAHEDRON; case VISU::ePENTA15: return VTK_WEDGE; case VISU::ePYRA13: @@ -152,6 +161,13 @@ namespace VISU return VTK_POLYGON; #endif + case VISU::eQUAD9: +#if defined(VISU_USE_VTK_QUADRATIC) + return VTK_BIQUADRATIC_QUAD; +#else + return VTK_POLYGON; +#endif + case VISU::eTETRA10: #if defined(VISU_USE_VTK_QUADRATIC) return VTK_QUADRATIC_TETRA; @@ -166,6 +182,13 @@ namespace VISU return VTK_CONVEX_POINT_SET; #endif + case VISU::eHEXA27: +#if defined(VISU_USE_VTK_QUADRATIC) + return VTK_TRIQUADRATIC_HEXAHEDRON; +#else + return VTK_CONVEX_POINT_SET; +#endif + case VISU::ePENTA15: #if defined(VISU_USE_VTK_QUADRATIC) return VTK_QUADRATIC_WEDGE; diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index 8801b54d..2f2cc48c 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -101,8 +101,11 @@ namespace case MED::eSEG3: return VISU::eSEG3; case MED::eTRIA6: return VISU::eTRIA6; case MED::eQUAD8: return VISU::eQUAD8; + case MED::eQUAD9: return VISU::eQUAD9; + case MED::eOCTA12: return VISU::eOCTA12; case MED::eTETRA10: return VISU::eTETRA10; case MED::eHEXA20: return VISU::eHEXA20; + case MED::eHEXA27: return VISU::eHEXA27; case MED::ePENTA15: return VISU::ePENTA15; case MED::ePYRA13: return VISU::ePYRA13; @@ -130,8 +133,11 @@ namespace case VISU::eSEG3: return MED::eSEG3; case VISU::eTRIA6: return MED::eTRIA6; case VISU::eQUAD8: return MED::eQUAD8; + case VISU::eQUAD9: return MED::eQUAD9; + case VISU::eOCTA12: return MED::eOCTA12; case VISU::eTETRA10: return MED::eTETRA10; case VISU::eHEXA20: return MED::eHEXA20; + case VISU::eHEXA27: return MED::eHEXA27; case VISU::ePENTA15: return MED::ePENTA15; case VISU::ePYRA13: return MED::ePYRA13; @@ -2619,6 +2625,20 @@ VISU_MedConvertor anArray[7] = aConnect[7]; break; #endif +#if !(defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC) + case MED::eQUAD9: + anArray[0] = aConnect[0]; + anArray[2] = aConnect[1]; + anArray[4] = aConnect[2]; + anArray[6] = aConnect[3]; + + anArray[1] = aConnect[4]; + anArray[3] = aConnect[5]; + anArray[5] = aConnect[6]; + anArray[7] = aConnect[7]; + anArray[8] = aConnect[8]; + break; +#endif #if (defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC) case MED::eTETRA10: anArray[0] = aConnect[0]; @@ -2644,6 +2664,7 @@ VISU_MedConvertor #if (defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC) case MED::ePYRA13: anArray[0] = aConnect[0]; + anArray[1] = aConnect[3]; anArray[2] = aConnect[2]; anArray[3] = aConnect[1]; @@ -2667,6 +2688,43 @@ VISU_MedConvertor anArray[3] = aConnect[1]; anArray[4] = aConnect[4]; break; +#if (defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC) + case MED::eHEXA27: + anArray[0] = aConnect[0]; + anArray[1] = aConnect[3]; + anArray[2] = aConnect[2]; + anArray[3] = aConnect[1]; + + anArray[4] = aConnect[4]; + anArray[5] = aConnect[7]; + anArray[6] = aConnect[6]; + anArray[7] = aConnect[5]; + + anArray[8] = aConnect[11]; + anArray[9] = aConnect[10]; + anArray[10] = aConnect[9]; + anArray[11] = aConnect[8]; + + anArray[12] = aConnect[15]; + anArray[13] = aConnect[14]; + anArray[14] = aConnect[13]; + anArray[15] = aConnect[12]; + + anArray[16] = aConnect[16]; + anArray[17] = aConnect[19]; + anArray[18] = aConnect[18]; + anArray[19] = aConnect[17]; + + anArray[20] = aConnect[21]; + anArray[21] = aConnect[23]; + anArray[22] = aConnect[24]; + anArray[23] = aConnect[22]; + + anArray[24] = aConnect[20]; + anArray[25] = aConnect[25]; + anArray[26] = aConnect[26]; + break; +#endif default: for(int iNode = 0; iNode < aVNbNodes; iNode++) anArray[iNode] = aConnect[iNode]; diff --git a/src/CONVERTOR/VISU_MeshValue.cxx b/src/CONVERTOR/VISU_MeshValue.cxx index 123194f1..851aaa7f 100644 --- a/src/CONVERTOR/VISU_MeshValue.cxx +++ b/src/CONVERTOR/VISU_MeshValue.cxx @@ -773,6 +773,20 @@ namespace VISU anArray[5] = 6; anArray[7] = 7; break; +#endif +#if !(defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC) + case eQUAD9: + anArray[0] = 0; + anArray[2] = 1; + anArray[4] = 2; + anArray[6] = 3; + + anArray[1] = 4; + anArray[3] = 5; + anArray[5] = 6; + anArray[7] = 7; + anArray[8] = 8; + break; #endif case eTETRA4: anArray[0] = 0; @@ -822,6 +836,43 @@ namespace VISU anArray[11] = 11; anArray[12] = 10; break; +#endif +#if (defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC) + case eHEXA27: + anArray[0] = 0; + anArray[1] = 3; + anArray[2] = 2; + anArray[3] = 1; + + anArray[4] = 4; + anArray[5] = 7; + anArray[6] = 6; + anArray[7] = 5; + + anArray[8] = 11; + anArray[9] = 10; + anArray[10] = 9; + anArray[11] = 8; + + anArray[12] = 15; + anArray[13] = 14; + anArray[14] = 13; + anArray[15] = 12; + + anArray[16] = 16; + anArray[17] = 19; + anArray[18] = 18; + anArray[19] = 17; + + anArray[20] = 21; + anArray[21] = 23; + anArray[22] = 24; + anArray[23] = 22; + + anArray[24] = 20; + anArray[25] = 25; + anArray[26] = 26; + break; #endif default: for(int i=0;i