From: eap Date: Tue, 14 Jun 2011 13:50:26 +0000 (+0000) Subject: 0020743: EDF 1271 SMESH : Create a mesh from a group / export groups X-Git-Tag: V6_4_0a1~217 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;ds=inline;h=77b26c3006271b04245a36403be11040d9e4b410;hp=c9ccfc74e0ad0568e8f42239ec680b0c6ad624f8;p=modules%2Fsmesh.git 0020743: EDF 1271 SMESH : Create a mesh from a group / export groups +protected: + inline void addWithPoly(const SMDS_MeshElement* el); --- 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; }