0022134: DriverGMF : reading quadratic meshes

+  inline int NbElements(SMDSAbs_EntityType   type) const { return NbEntities(type); }
+  inline int NbElements(SMDSAbs_GeometryType type) const { return NbElementsOfGeom(type); }
+  inline int NbElementsOfGeom(SMDSAbs_GeometryType geom) const;
This commit is contained in:
eap 2013-02-28 11:33:57 +00:00
parent 5baae36018
commit 2728268e48

View File

@ -40,7 +40,11 @@ public:
inline void Clear();
inline int NbElements(SMDSAbs_ElementType type=SMDSAbs_All) const;
inline int NbElements(SMDSAbs_EntityType type) const { return NbEntities(type); }
inline int NbElements(SMDSAbs_GeometryType type) const { return NbElementsOfGeom(type); }
inline int NbEntities(SMDSAbs_EntityType type) const;
inline int NbElementsOfGeom(SMDSAbs_GeometryType geom) const;
int NbNodes() const { return myNbNodes; }
int Nb0DElements() const { return myNb0DElements; }
@ -305,7 +309,7 @@ SMDS_MeshInfo::NbElements(SMDSAbs_ElementType type) const
return nb;
}
int // NbEntities
inline int // NbEntities
SMDS_MeshInfo::NbEntities(SMDSAbs_EntityType type) const
{
switch (type) {
@ -338,7 +342,44 @@ SMDS_MeshInfo::NbEntities(SMDSAbs_EntityType type) const
return 0;
}
void // set
inline int // NbElementsOfGeom
SMDS_MeshInfo::NbElementsOfGeom(SMDSAbs_GeometryType geom) const
{
switch ( geom ) {
// 0D:
case SMDSGeom_POINT: return myNb0DElements;
// 1D:
case SMDSGeom_EDGE: return (myNbEdges +
myNbQuadEdges);
// 2D:
case SMDSGeom_TRIANGLE: return (myNbTriangles +
myNbQuadTriangles);
case SMDSGeom_QUADRANGLE: return (myNbQuadrangles +
myNbQuadQuadrangles +
myNbBiQuadQuadrangles );
case SMDSGeom_POLYGON: return myNbPolygons;
// 3D:
case SMDSGeom_TETRA: return (myNbTetras +
myNbQuadTetras);
case SMDSGeom_PYRAMID: return (myNbPyramids +
myNbQuadPyramids);
case SMDSGeom_HEXA: return (myNbHexas +
myNbQuadHexas +
myNbTriQuadHexas);
case SMDSGeom_PENTA: return (myNbPrisms +
myNbQuadPrisms);
case SMDSGeom_HEXAGONAL_PRISM: return myNbHexPrism;
case SMDSGeom_POLYHEDRA: return myNbPolyhedrons;
// Discrete:
case SMDSGeom_BALL: return myNbBalls;
//
case SMDSGeom_NONE:
default:;
}
return 0;
}
inline void // setNb
SMDS_MeshInfo::setNb(const SMDSAbs_EntityType geomType, const int nb)
{
switch (geomType) {