X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2FMEDMEM%2FMESHconnectivities.cxx;h=1580d640f305a73100a50ae3347e64029731f4b1;hb=refs%2Ftags%2FT3_2_0b2;hp=b36510db7071312108538bf641a3bebe76a04f87;hpb=7b31dae4a98f70eefe76927a14dc8b09cc275f54;p=tools%2Fmedcoupling.git diff --git a/doc/MEDMEM/MESHconnectivities.cxx b/doc/MEDMEM/MESHconnectivities.cxx index b36510db7..1580d640f 100644 --- a/doc/MEDMEM/MESHconnectivities.cxx +++ b/doc/MEDMEM/MESHconnectivities.cxx @@ -1,30 +1,17 @@ // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ -// #include "MEDMEM_Mesh.hxx" -#include "MEDMEM_CellModel.hxx" using namespace MEDMEM ; using namespace MED_EN ; int main (int argc, char ** argv) { +// const string MedFile = "polyedres.med" ; +// const string MeshName = "Erreur orientation" ; +// const string MedFile = "polygones.med" ; +// const string MeshName = "Bord" ; const string MedFile = "pointe.med" ; const string MeshName = "maa1" ; MESH myMesh(MED_DRIVER,MedFile,MeshName) ; @@ -34,16 +21,15 @@ int main (int argc, char ** argv) { // we get all type for cell entity : int NumberOfTypes = myMesh.getNumberOfTypes(MED_CELL) ; - const CELLMODEL * Types = myMesh.getCellsTypes(MED_CELL) ; - cout << "Show Connectivity (Nodal) :" << endl ; - // this example use access with a specified medGeometryElement through - // CELLMODEL class + // this example use access with a specified medGeometryElement array + const medGeometryElement * Types = myMesh.getTypes(MED_CELL); + string * cellTypeNames = myMesh.getCellTypeNames(MED_CELL); for (int i=0; i 0 ) + { + cout << "Show Connectivity (Nodal) of POLYGONS:" << endl ; + const int* Connectivity = myMesh.getPolygonsConnectivity(MED_NODAL,MED_CELL); + const int* ConnectivityIndex = myMesh.getPolygonsConnectivityIndex(MED_NODAL,MED_CELL); + for (int j=0; j 0 ) + { + cout << "Show Connectivity (Nodal) of POLYHEDRONS:" << endl ; + const int* Connectivity = myMesh.getPolyhedronConnectivity(MED_NODAL); + const int* FaceIndex = myMesh.getPolyhedronFacesIndex(); + const int* Index = myMesh.getPolyhedronIndex(MED_NODAL); + for (int j=0; j