Salome HOME
Fix for issue 0019935: EDF 793 SMESH: Drawing of a line on a non-planar surface....
authorakl <akl@opencascade.com>
Fri, 1 Aug 2008 07:39:10 +0000 (07:39 +0000)
committerakl <akl@opencascade.com>
Fri, 1 Aug 2008 07:39:10 +0000 (07:39 +0000)
src/OBJECT/SMESH_Actor.cxx
src/OBJECT/SMESH_Object.cxx
src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx
src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx

index e51332050660a89063332e9cbd9f6d053b2bdbec..3c4f5c5b5b6d5c43d42796c972a826f5a629aaae 100644 (file)
@@ -168,7 +168,9 @@ SMESH_ActorDef::SMESH_ActorDef()
   aFilter->RegisterCellsWithType(VTK_PYRAMID);
   aFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
   aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
+  aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
   aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
+  
 
   //Definition 1D divice of the actor
   //---------------------------------
@@ -1055,6 +1057,7 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode){
     aFilter->RegisterCellsWithType(VTK_PYRAMID);
     aFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
     aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
+    aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
     aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
   }
   aFilter->Update();
index 9bdc652a09b9c260bf07555077489f601875a9c5..b05f519d1a04449398badef74295dcab85b9f21f 100644 (file)
@@ -112,7 +112,10 @@ static inline vtkIdType getCellType( const SMDSAbs_ElementType theType,
       else if ( theNbNodes == 20 )  {
         return VTK_QUADRATIC_HEXAHEDRON;
       }
-      else if ( theNbNodes==13 || theNbNodes==15 )  {
+      else if ( theNbNodes == 15 )  {
+        return VTK_QUADRATIC_WEDGE;
+      }
+      else if ( theNbNodes==13 )  {
         return VTK_CONVEX_POINT_SET;
       }
       else return VTK_EMPTY_CELL;
@@ -404,7 +407,8 @@ void SMESH_VisualObjDef::buildElemPrs()
            for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]);
          }
           else if (aNbNodes == 15) {
-           static int anIds[] = {0,2,1,3,5,4,8,7,6,11,10,9,12,14,13};
+            //static int anIds[] = {0,2,1,3,5,4,8,7,6,11,10,9,12,14,13};
+            static int anIds[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14};
            for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]);
            //for (int k = 0; k < aNbNodes; k++) {
             //  int nn = aConnectivities[k];
index 3cd1cc62025b0be526b085441c665620269c8bd6..e29b9111fbde43451581cfc5c9dd25f858f59d9a 100644 (file)
@@ -220,8 +220,8 @@ namespace SMESH {
         aType = VTK_CONVEX_POINT_SET;
         break;
       case QUAD_PENTAHEDRON:
-        //aType = VTK_QUADRATIC_WEDGE; // NOT SUPPORTED IN VTK4.2
-        aType = VTK_CONVEX_POINT_SET;
+        aType = VTK_QUADRATIC_WEDGE;
+        //aType = VTK_CONVEX_POINT_SET;
         break; 
       case QUAD_HEXAHEDRON:
         aType = VTK_QUADRATIC_HEXAHEDRON;
@@ -236,9 +236,13 @@ namespace SMESH {
       }
       else {
         // VTK cell connectivity opposites the MED one for volumic elements
-        if ( theIds.size() > 8 ? !theReverse : theReverse ) {
-          ReverseConnectivity( theIds, theType );
+        if( aType != VTK_QUADRATIC_WEDGE) {
+          if ( theIds.size() > 8 ? !theReverse : theReverse ) {
+            ReverseConnectivity( theIds, theType );
+          }
         }
+        else if(theReverse)
+          ReverseConnectivity( theIds, theType );          
       }
             
       myGrid->Reset();
index 61900244ee2f90206e0e3020c5fbab2e453fd084..f1895d3cc44911c887c2e0909615f69b196cd57c 100644 (file)
@@ -137,7 +137,10 @@ vtkIdType getCellType( const SMDSAbs_ElementType theType,
     else if ( theNbNodes == 20 )  {
       return VTK_QUADRATIC_HEXAHEDRON;
     }
-    else if ( theNbNodes==13 || theNbNodes==15 )  {
+    else if ( theNbNodes==15  )  {
+      return VTK_QUADRATIC_WEDGE;
+    }
+    else if ( theNbNodes==13  )  {
       return VTK_CONVEX_POINT_SET;
     }
     else return VTK_EMPTY_CELL;