return myInfo.NbNodes();
}
+///////////////////////////////////////////////////////////////////////////////
+/// Return the number of elements
+///////////////////////////////////////////////////////////////////////////////
+int SMDS_Mesh::NbElements() const
+{
+ return myInfo.NbElements();
+}
///////////////////////////////////////////////////////////////////////////////
/// Return the number of 0D elements
///////////////////////////////////////////////////////////////////////////////
void SMDS_Mesh::RemoveFreeElement(const SMDS_MeshElement * elem)
{
int elemId = elem->GetID();
- int vtkId = elem->getVtkId();
+ int vtkId = elem->getVtkId();
SMDSAbs_ElementType aType = elem->GetType();
- SMDS_MeshElement* todest = (SMDS_MeshElement*)(elem);
- if (aType == SMDSAbs_Node) {
+ SMDS_MeshElement* todest = (SMDS_MeshElement*)(elem);
+ if ( aType == SMDSAbs_Node )
+ {
// only free node can be removed by this method
const SMDS_MeshNode* n = static_cast<SMDS_MeshNode*>(todest);
- SMDS_ElemIteratorPtr itFe = n->GetInverseElementIterator();
- if (!itFe->more()) { // free node
+ if ( n->NbInverseElements() == 0 ) { // free node
myNodes[elemId] = 0;
myInfo.myNbNodes--;
((SMDS_MeshNode*) n)->SetPosition(SMDS_SpacePosition::originSpacePosition());
myNodePool->destroy(static_cast<SMDS_MeshNode*>(todest));
myNodeIDFactory->ReleaseID(elemId, vtkId);
}
- } else {
+ }
+ else
+ {
if (hasConstructionEdges() || hasConstructionFaces())
// this methods is only for meshes without descendants
return;
}
//! get last modification timeStamp
-unsigned long SMDS_Mesh::GetMTime() const
+vtkMTimeType SMDS_Mesh::GetMTime() const
{
return this->myModifTime;
}