bool ON_Mesh::DeleteFace( int meshfi ) { // Do NOT add a call Compact() in this function. // Compact() is slow and this function may be called // many times in sequence. // It is the callers responsibility to call Compact() // when it is needed. bool rc = false; if ( meshfi >= 0 && meshfi < m_F.Count() ) { if ( m_top.m_topf.Count() > 0 ) { DestroyTopology(); } DestroyPartition(); DestroyTree(); if ( m_FN.Count() == m_F.Count() ) { m_FN.Remove(meshfi); } m_F.Remove(meshfi); // 6 Mar 2010 S. Baer // Invalidate the cached IsClosed flag. This forces the mesh to // recompute IsClosed the next time it is called SetClosed(-1); rc = true; } return rc; }
bool ON_Mesh::DeleteFace( int meshfi ) { // Do NOT add a call Compact() in this function. // Compact() is slow and this function may be called // many times in sequence. // It is the callers responsibility to call Compact() // when it is needed. bool rc = false; if ( meshfi >= 0 && meshfi < m_F.Count() ) { if ( m_top.m_topf.Count() > 0 ) { DestroyTopology(); } DestroyPartition(); DestroyTree(); if ( m_FN.Count() == m_F.Count() ) { m_FN.Remove(meshfi); } m_F.Remove(meshfi); rc = true; } return rc; }