Salome HOME
0020743: EDF 1271 SMESH : Create a mesh from a group / export groups
authoreap <eap@opencascade.com>
Tue, 14 Jun 2011 13:50:26 +0000 (13:50 +0000)
committereap <eap@opencascade.com>
Tue, 14 Jun 2011 13:50:26 +0000 (13:50 +0000)
+protected:
+  inline void addWithPoly(const SMDS_MeshElement* el);

src/SMDS/SMDS_MeshInfo.hxx

index 09e6d58637ea5d9a2e42a15640d57461c3a30857..54f1bfb2718e3892a94fca59d3ffce9ee0c2369f 100644 (file)
@@ -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; }