X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMDS%2FSMDS_Mesh.hxx;h=bc3c740126be2483e7172fa2c3ece994acf27cc8;hp=7e03612867568cae15b26cee5ed7b0cf55ef377f;hb=b22e182dd1a2c30be324b21074158390d00714b3;hpb=bd4e115a78b52e3fbc016e5e30bb0e19b2a9e7d6 diff --git a/src/SMDS/SMDS_Mesh.hxx b/src/SMDS/SMDS_Mesh.hxx index 7e0361286..bc3c74012 100644 --- a/src/SMDS/SMDS_Mesh.hxx +++ b/src/SMDS/SMDS_Mesh.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 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 @@ -6,7 +6,7 @@ // 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. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -170,6 +170,25 @@ public: const SMDS_MeshNode * n23, const SMDS_MeshNode * n31); + // 2d order triangle of 7 nodes + virtual SMDS_MeshFace* AddFaceWithID(int n1, int n2, int n3, + int n12,int n23,int n31, int nCenter, int ID); + virtual SMDS_MeshFace* AddFaceWithID(const SMDS_MeshNode * n1, + const SMDS_MeshNode * n2, + const SMDS_MeshNode * n3, + const SMDS_MeshNode * n12, + const SMDS_MeshNode * n23, + const SMDS_MeshNode * n31, + const SMDS_MeshNode * nCenter, + int ID); + virtual SMDS_MeshFace* AddFace(const SMDS_MeshNode * n1, + const SMDS_MeshNode * n2, + const SMDS_MeshNode * n3, + const SMDS_MeshNode * n12, + const SMDS_MeshNode * n23, + const SMDS_MeshNode * n31, + const SMDS_MeshNode * nCenter); + // 2d order quadrangle virtual SMDS_MeshFace* AddFaceWithID(int n1, int n2, int n3, int n4, int n12,int n23,int n34,int n41, int ID); @@ -557,14 +576,22 @@ public: virtual SMDS_MeshFace* AddPolygonalFace (const std::vector & nodes); + virtual SMDS_MeshFace* AddQuadPolygonalFaceWithID(const std::vector & nodes_ids, + const int ID); + + virtual SMDS_MeshFace* AddQuadPolygonalFaceWithID(const std::vector & nodes, + const int ID); + + virtual SMDS_MeshFace* AddQuadPolygonalFace(const std::vector & nodes); + virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID - (const std::vector & nodes_ids, - const std::vector & quantities, - const int ID); + (const std::vector & nodes_ids, + const std::vector & quantities, + const int ID); virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID - (const std::vector & nodes, - const std::vector & quantities, + (const std::vector & nodes, + const std::vector & quantities, const int ID); virtual SMDS_MeshVolume* AddPolyhedralVolume @@ -580,6 +607,7 @@ public: virtual SMDS_MeshFace* AddFaceFromVtkIdsWithID(const std::vector& vtkNodeIds, const int ID); + virtual void MoveNode(const SMDS_MeshNode *n, double x, double y, double z); virtual void RemoveElement(const SMDS_MeshElement * elem, std::list& removedElems, @@ -754,7 +782,7 @@ protected: bool registerElement(int ID, SMDS_MeshElement * element); void addChildrenWithNodes(std::set& setOfChildren, - const SMDS_MeshElement * element, + const SMDS_MeshElement * element, std::set& nodes); inline void adjustmyCellsCapacity(int ID) @@ -798,8 +826,8 @@ protected: //! SMDS_MeshCells refer to vtk cells (vtk id != index in myCells),store reference to this mesh, and sub-shape SetOfCells myCells; - //! for cells only: index = ID for SMDS users, value = ID in vtkUnstructuredGrid - //std::vector myCellIdSmdsToVtk; + //! a buffer to speed up elements addition by excluding some memory allocation + std::vector myNodeIds; //! for cells only: index = ID in vtkUnstructuredGrid, value = ID for SMDS users std::vector myCellIdVtkToSmds;