Commit 76341350 authored by Mike Kremer's avatar Mike Kremer

Fixed bug in HalfEdgeCellIter

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@267 66977474-1d4b-4f09-8fe9-267525286df2
parent 37fe921b
......@@ -315,18 +315,18 @@ cur_index_(0) {
// collect cell handles
const std::vector<HalfFaceHandle>& incidentHalffaces = BaseIter::mesh()->incident_hfs_per_he_[_ref_h.idx()];
std::set<CellHandle> cells;
for (unsigned int i = 0; i < incidentHalffaces.size(); ++i)
{
CellHandle ch = getCellHandle(i);
if (ch.is_valid())
cells_.push_back(ch);
if (ch.is_valid()) {
if(cells.count(ch) == 0) {
cells_.push_back(ch);
}
cells.insert(ch);
}
}
// Remove all duplicate entries
std::sort(cells_.begin(), cells_.end());
cells_.resize(std::unique(cells_.begin(), cells_.end()) - cells_.begin());
BaseIter::valid(cells_.size() > 0);
if(BaseIter::valid()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment