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 08:14:33 +0000 (08:14 +0000)
committerakl <akl@opencascade.com>
Fri, 1 Aug 2008 08:14:33 +0000 (08:14 +0000)
src/OBJECT/SMESH_Actor.cxx
src/OBJECT/SMESH_Object.cxx
src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx
src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx

index b54b4df79e4eafbf014174fcd00c2b4ed6324634..b229191242b66fed56e432d2040e98c6ef6021f8 100644 (file)
@@ -167,6 +167,7 @@ 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
@@ -1054,6 +1055,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 95aa3f8e978b59137fb6b9f04af2d6b2ed548ddd..cc2e4b16f8e59d1521f38ad64402d01d5da3763a 100644 (file)
@@ -222,8 +222,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;
@@ -238,9 +238,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 0013564ffacd10c8d7ca3d2fed4d698fb2e340e6..b6f52b58a7690cbf4f2649b9da7e71b552eee507 100644 (file)
@@ -136,7 +136,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;