X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FDriverCGNS%2FDriverCGNS_Write.cxx;h=f83fe915e283cb75693c039c6f63f3717a4f8488;hb=7d08ac8481b4a92dcad8fe4a3ea88956856dea15;hp=1afa5423954d2fe1978d9b1e3dca416480e8dd1f;hpb=5d68554076bbca0e1e95fb0db215a6c2b84b6c54;p=modules%2Fsmesh.git diff --git a/src/DriverCGNS/DriverCGNS_Write.cxx b/src/DriverCGNS/DriverCGNS_Write.cxx index 1afa54239..f83fe915e 100644 --- a/src/DriverCGNS/DriverCGNS_Write.cxx +++ b/src/DriverCGNS/DriverCGNS_Write.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -147,6 +147,7 @@ namespace } { cgTypes[SMDSEntity_Polygon] = CGNS_ENUMV( NGON_n ); + cgTypes[SMDSEntity_Quad_Polygon] = CGNS_ENUMV( NGON_n ); cgTypes[SMDSEntity_Polyhedra] = CGNS_ENUMV( NFACE_n ); cgTypes[SMDSEntity_Hexagonal_Prism] = CGNS_ENUMV( NFACE_n ); } @@ -370,6 +371,21 @@ Driver_Mesh::Status DriverCGNS_Write::Perform() } while ( elem && elem->GetEntityType() == elemType ); + else if ( elemType == SMDSEntity_Quad_Polygon ) // QUADRATIC POLYGONS + do // write as linear NGON_n + { + elemData.push_back( elem->NbNodes() ); + interlace = & SMDS_MeshCell::interlacedSmdsOrder( SMDSEntity_Quad_Polygon, + elem->NbNodes() )[0]; + for ( int i = 0, nb = elem->NbNodes(); i < nb; ++i ) + elemData.push_back( cgnsID( elem->GetNode( interlace[i] ), n2cgID )); + if ( elem->GetID() != cgID ) + elem2cgID.insert( elem2cgID.end(), make_pair( elem, cgID )); + ++cgID; + elem = elemIt->more() ? elemIt->next() : 0; + } + while ( elem && elem->GetEntityType() == elemType ); + else if ( elemType == SMDSEntity_Polyhedra || elemType == SMDSEntity_Hexagonal_Prism) // POLYHEDRA {