Commit ae1d8557 authored by Kenneth Vanhoey's avatar Kenneth Vanhoey

Correct Normal Area Selector

parent 46808bde
......@@ -826,28 +826,42 @@ void EdgeSelector_NormalArea<PFP>::updateBeforeCollapse(Dart d)
MAP& m = this->m_map ;
assert(!m.isBoundaryEdge(d));
EdgeInfo& edgeE = edgeInfo[d] ;
if(edgeE.valid)
{ edges.erase(edgeE.it) ; edgeE.valid = false;}
EdgeInfo* edgeE = &(edgeInfo[d]) ;
if(edgeE->valid)
{
edges.erase(edgeE->it) ;
edgeE->valid = false;
}
edgeE = edgeInfo[m.phi1(d)] ;
if(edgeE.valid) // remove all
{ edges.erase(edgeE.it) ; edgeE.valid = false;}
edgeE = &(edgeInfo[m.phi1(d)]) ;
if(edgeE->valid) // remove all
{
edges.erase(edgeE->it) ;
edgeE->valid = false;
}
edgeE = &(edgeInfo[m.phi_1(d)]) ; // the concerned edges
if(edgeE->valid)
{
edges.erase(edgeE->it) ;
edgeE->valid = false;
}
edgeE = edgeInfo[m.phi_1(d)] ; // the concerned edges
if(edgeE.valid)
{ edges.erase(edgeE.it) ; edgeE.valid = false;}
// from the multimap
Dart dd = m.phi2(d) ;
edgeE = edgeInfo[m.phi1(dd)] ;
if(edgeE.valid)
{ edges.erase(edgeE.it) ; edgeE.valid = false;}
edgeE = edgeInfo[m.phi_1(dd)] ;
if(edgeE.valid)
{ edges.erase(edgeE.it) ; edgeE.valid = false;}
edgeE = &(edgeInfo[m.phi1(dd)]) ;
if(edgeE->valid)
{
edges.erase(edgeE->it) ;
edgeE->valid = false;
}
edgeE = &(edgeInfo[m.phi_1(dd)]) ;
if(edgeE->valid)
{
edges.erase(edgeE->it) ;
edgeE->valid = false;
}
}
......@@ -907,6 +921,7 @@ void EdgeSelector_NormalArea<PFP>::updateEdgeInfo(Dart d)
if(einfo.valid)
edges.erase(einfo.it) ; // remove the edge from the multimap
if(m.edgeCanCollapse(d))
computeEdgeInfo(d, einfo) ;
else
......
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