From: Christophe Bourcier Date: Thu, 24 Nov 2016 07:39:01 +0000 (+0100) Subject: Fix pyramids orientation in GMF import/export X-Git-Tag: V8_2_0rc1~6^2~1^2^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5bca5c56b48adda65bb92d0041c1cf354d5e6018;p=modules%2Fsmesh.git Fix pyramids orientation in GMF import/export --- 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 );