From 77b26c3006271b04245a36403be11040d9e4b410 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 14 Jun 2011 13:50:26 +0000 Subject: [PATCH] 0020743: EDF 1271 SMESH : Create a mesh from a group / export groups +protected: + inline void addWithPoly(const SMDS_MeshElement* el); --- src/SMDS/SMDS_MeshInfo.hxx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/SMDS/SMDS_MeshInfo.hxx b/src/SMDS/SMDS_MeshInfo.hxx index 09e6d5863..54f1bfb27 100644 --- a/src/SMDS/SMDS_MeshInfo.hxx +++ b/src/SMDS/SMDS_MeshInfo.hxx @@ -55,6 +55,9 @@ public: inline int NbPrisms (SMDSAbs_ElementOrder order = ORDER_ANY) const; int NbPolyhedrons() const { return myNbPolyhedrons; } +protected: + inline void addWithPoly(const SMDS_MeshElement* el); + private: friend class SMDS_Mesh; @@ -176,6 +179,14 @@ inline void // add SMDS_MeshInfo::add(const SMDS_MeshElement* el) { ++(*myNb[ index(el->GetType(), el->NbNodes()) ]); } +inline void // addWithPoly +SMDS_MeshInfo::addWithPoly(const SMDS_MeshElement* el) +{ + if ( el->IsPoly() ) + ++( el->GetType()==SMDSAbs_Face ? myNbPolygons : myNbPolyhedrons ); + else + add(el); +} inline void // RemoveEdge SMDS_MeshInfo::RemoveEdge(const SMDS_MeshElement* el) { if ( el->IsQuadratic() ) --myNbQuadEdges; else --myNbEdges; } -- 2.39.2