-// 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
#define MYASSERT(val) if (!(val)) throw SALOME_Exception(LOCALIZED("assertion not verified"));
-class SMDS_EXPORT SMDS_Mesh:public SMDS_MeshObject
+class SMDS_EXPORT SMDS_Mesh : public SMDS_MeshObject
{
public:
friend class SMDS_MeshIDFactory;
virtual SMDS_MeshFace* AddPolygonalFace (const std::vector<const SMDS_MeshNode*> & nodes);
+ virtual SMDS_MeshFace* AddQuadPolygonalFaceWithID(const std::vector<int> & nodes_ids,
+ const int ID);
+
+ virtual SMDS_MeshFace* AddQuadPolygonalFaceWithID(const std::vector<const SMDS_MeshNode*> & nodes,
+ const int ID);
+
+ virtual SMDS_MeshFace* AddQuadPolygonalFace(const std::vector<const SMDS_MeshNode*> & nodes);
+
virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
- (const std::vector<int> & nodes_ids,
- const std::vector<int> & quantities,
- const int ID);
+ (const std::vector<int> & nodes_ids,
+ const std::vector<int> & quantities,
+ const int ID);
virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
- (const std::vector<const SMDS_MeshNode*> & nodes,
- const std::vector<int> & quantities,
+ (const std::vector<const SMDS_MeshNode*> & nodes,
+ const std::vector<int> & quantities,
const int ID);
virtual SMDS_MeshVolume* AddPolyhedralVolume
bool registerElement(int ID, SMDS_MeshElement * element);
void addChildrenWithNodes(std::set<const SMDS_MeshElement*>& setOfChildren,
- const SMDS_MeshElement * element,
+ const SMDS_MeshElement * element,
std::set<const SMDS_MeshElement*>& nodes);
inline void adjustmyCellsCapacity(int ID)
{
assert(ID >= 0);
myElementIDFactory->adjustMaxId(ID);
- if (ID >= myCells.size())
+ if (ID >= (int)myCells.size())
myCells.resize(ID+SMDS_Mesh::chunkSize,0);
}
//! 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<int> myCellIdSmdsToVtk;
+ //! a buffer to speed up elements addition by excluding some memory allocation
+ std::vector<vtkIdType> myNodeIds;
//! for cells only: index = ID in vtkUnstructuredGrid, value = ID for SMDS users
std::vector<int> myCellIdVtkToSmds;
SMDS_MeshElementIDFactory *myElementIDFactory;
SMDS_MeshInfo myInfo;
+ //! any add, remove or change of node or cell
+ bool myModified;
//! use a counter to keep track of modifications
unsigned long myModifTime, myCompactTime;
bool myHasConstructionFaces;
bool myHasInverseElements;
- //! any add, remove or change of node or cell
- bool myModified;
-
double xmin;
double xmax;
double ymin;