Salome HOME
Fix pyramids orientation in GMF import/export cbr/fix_import_gmf_pyramids_orientation
authorChristophe Bourcier <christophe.bourcier@cea.fr>
Thu, 24 Nov 2016 07:39:01 +0000 (08:39 +0100)
committerChristophe Bourcier <christophe.bourcier@cea.fr>
Thu, 24 Nov 2016 07:39:01 +0000 (08:39 +0100)
src/DriverGMF/DriverGMF_Read.cxx
src/DriverGMF/DriverGMF_Write.cxx

index f1b9d4a184dccefa984440c0674eaf962df65ff6..54edf6a9c8413a0ab6f1e40bd62caa89026769f3 100644 (file)
@@ -299,7 +299,7 @@ Driver_Mesh::Status DriverGMF_Read::Perform()
     for ( int i = 1; i <= nbPyr; ++i )
     {
       GmfGetLin(meshID, GmfPyramids, &iN[0], &iN[1], &iN[2], &iN[3], &iN[4], &ref);
-      if ( !myMesh->AddVolumeWithID( iN[0], iN[2], iN[1], iN[3], iN[4], pyrIDShift + i ))
+      if ( !myMesh->AddVolumeWithID( iN[3], iN[2], iN[1], iN[0], iN[4], pyrIDShift + i ))
         status = storeBadNodeIds( "GmfPyramids",i, 5, iN[0], iN[1],iN[2], iN[3], iN[4] );
     }
   }
index 27f1ce065ed78601161ebf50301f8e0c9feb8dc1..723f73d321f6c07b7da5ee52c89f5873cdf3c7c9 100644 (file)
@@ -204,10 +204,10 @@ Driver_Mesh::Status DriverGMF_Write::Perform()
 
   // pyramids
   BEGIN_ELEM_WRITE( SMDSEntity_Pyramid, GmfPyramids, pyra )
-    node2IdMap[ pyra->GetNode( 0 )],
+    node2IdMap[ pyra->GetNode( 3 )],
     node2IdMap[ pyra->GetNode( 2 )],
     node2IdMap[ pyra->GetNode( 1 )],
-    node2IdMap[ pyra->GetNode( 3 )],
+    node2IdMap[ pyra->GetNode( 0 )],
     node2IdMap[ pyra->GetNode( 4 )],
     END_ELEM_WRITE( pyra );