From 5bca5c56b48adda65bb92d0041c1cf354d5e6018 Mon Sep 17 00:00:00 2001 From: Christophe Bourcier Date: Thu, 24 Nov 2016 08:39:01 +0100 Subject: [PATCH] Fix pyramids orientation in GMF import/export --- src/DriverGMF/DriverGMF_Read.cxx | 2 +- src/DriverGMF/DriverGMF_Write.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DriverGMF/DriverGMF_Read.cxx b/src/DriverGMF/DriverGMF_Read.cxx index f1b9d4a18..54edf6a9c 100644 --- a/src/DriverGMF/DriverGMF_Read.cxx +++ b/src/DriverGMF/DriverGMF_Read.cxx @@ -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] ); } } diff --git a/src/DriverGMF/DriverGMF_Write.cxx b/src/DriverGMF/DriverGMF_Write.cxx index 27f1ce065..723f73d32 100644 --- a/src/DriverGMF/DriverGMF_Write.cxx +++ b/src/DriverGMF/DriverGMF_Write.cxx @@ -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 );