Commit 18df3bda authored by untereiner's avatar untereiner

correct bug IHM2Adapt

parent d916df01
......@@ -352,7 +352,7 @@ unsigned int IHM2<PFP>::subdivideFace(Dart d, bool triQuad, bool OneLevelDiffere
unsigned int fLevel = faceLevel(d) ;
Dart old = faceOldestDart(d) ;
std::cout << "faceLevel = " << fLevel << std::endl;
//std::cout << "faceLevel = " << fLevel << std::endl;
unsigned int cur = m_map.getCurrentLevel() ;
m_map.setCurrentLevel(fLevel) ; // go to the level of the face to subdivide its edges
......@@ -378,7 +378,7 @@ unsigned int IHM2<PFP>::subdivideFace(Dart d, bool triQuad, bool OneLevelDiffere
m_map.setCurrentLevel(fLevel + 1) ; // go to the next level to perform face subdivision
if(triQuad && (degree == 3)) // if subdividing a triangle
if((degree == 3) && triQuad) // if subdividing a triangle
{
Dart dd = m_map.phi1(old) ;
Dart e = m_map.phi1(dd) ;
......@@ -386,16 +386,18 @@ unsigned int IHM2<PFP>::subdivideFace(Dart d, bool triQuad, bool OneLevelDiffere
e = m_map.phi1(e) ;
m_map.splitFace(dd, e) ; // insert a new edge
unsigned int id = m_map.getNewEdgeId() ;
m_map.setEdgeId(m_map.phi_1(dd), id) ; // set the edge id of the inserted
m_map.setEdgeId(m_map.phi_1(e), id) ; // edge to the next available id
// unsigned int id = m_map.getNewEdgeId() ;
unsigned int id = m_map.getTriRefinementEdgeId(m_map.phi_1(dd));
m_map.setEdgeId(m_map.phi_1(dd), id) ; // set the edge id of the inserted
m_map.setEdgeId(m_map.phi_1(e), id) ; // edge to the next available id
dd = e ;
e = m_map.phi1(dd) ;
(*vertexVertexFunctor)(e) ;
e = m_map.phi1(e) ;
m_map.splitFace(dd, e) ;
id = m_map.getNewEdgeId() ;
//id = m_map.getNewEdgeId() ;
id = m_map.getTriRefinementEdgeId(m_map.phi_1(dd));
m_map.setEdgeId(m_map.phi_1(dd), id) ;
m_map.setEdgeId(m_map.phi_1(e), id) ;
......@@ -404,7 +406,8 @@ unsigned int IHM2<PFP>::subdivideFace(Dart d, bool triQuad, bool OneLevelDiffere
(*vertexVertexFunctor)(e) ;
e = m_map.phi1(e) ;
m_map.splitFace(dd, e) ;
id = m_map.getNewEdgeId() ;
//id = m_map.getNewEdgeId() ;
id = m_map.getTriRefinementEdgeId(m_map.phi_1(dd));
m_map.setEdgeId(m_map.phi_1(dd), id) ;
m_map.setEdgeId(m_map.phi_1(e), id) ;
}
......@@ -419,10 +422,12 @@ unsigned int IHM2<PFP>::subdivideFace(Dart d, bool triQuad, bool OneLevelDiffere
Dart ne2 = m_map.phi2(ne) ;
m_map.cutEdge(ne) ; // cut the new edge to insert the central vertex
unsigned int id = m_map.getNewEdgeId() ;
//unsigned int id = m_map.getNewEdgeId() ;
unsigned int id = m_map.getQuadRefinementEdgeId(m_map.phi2(ne));
m_map.setEdgeId(ne, id) ;
m_map.setEdgeId(m_map.phi2(ne), id) ; // set the edge id of the inserted
id = m_map.getNewEdgeId() ;
//id = m_map.getNewEdgeId() ;
id = m_map.getQuadRefinementEdgeId(ne2);
m_map.setEdgeId(ne2, id) ; // edges to the next available ids
m_map.setEdgeId(m_map.phi2(ne2), id) ;
......@@ -433,7 +438,8 @@ unsigned int IHM2<PFP>::subdivideFace(Dart d, bool triQuad, bool OneLevelDiffere
{ // linked to the central vertex
m_map.splitFace(m_map.phi1(ne), dd) ;
Dart nne = m_map.alpha1(dd) ;
id = m_map.getNewEdgeId() ;
//id = m_map.getNewEdgeId() ;
id = m_map.getQuadRefinementEdgeId(m_map.phi2(nne));
m_map.setEdgeId(nne, id) ;
m_map.setEdgeId(m_map.phi2(nne), id) ;
dd = m_map.phi1(dd) ;
......
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