diff --git a/vcg/complex/trimesh/crease_cut.h b/vcg/complex/trimesh/crease_cut.h index 0132bd8d..572ea229 100644 --- a/vcg/complex/trimesh/crease_cut.h +++ b/vcg/complex/trimesh/crease_cut.h @@ -68,7 +68,7 @@ void CreaseCut(MESH_TYPE &m, float angleRad) tri::UpdateNormals::NormalizeFace(m); - assert(m.HasFFTopology()); + assert(tri::HasFFAdjacency(m)); typename MESH_TYPE::ScalarType cosangle=math::Cos(angleRad); tri::UpdateFlags::VertexClearV(m); @@ -145,57 +145,3 @@ void CreaseCut(MESH_TYPE &m, float angleRad) } // end namespace vcg #endif -/* - face::Pos startPos=iPos; - const FaceType * nextf; - - do{ - size_t faceInd = Index(m,iPos.f); - assert(iPos.f->V(iPos.VInd()) ==iPos.v); - qDebug("Face %2i:%i - v%2i -- %2i",faceInd,iPos.VInd(),Index(m,iPos.v),curVertexCounter); - indVec[faceInd*3+ iPos.VInd()] = curVertexCounter; - - nextf=iPos.FFlip(); - ScalarType dotProd=nextf->cN() * iPos.f->N(); - iPos.FlipF(); - iPos.FlipE(); - if(dotProd::AddVertices(m,newVertexCounter-m.vn); - - tri::UpdateFlags::VertexClearV(m); - for(fi=m.face.begin();fi!=m.face.end();++fi) - for(int j=0;j<3;++j) // foreach unvisited vertex - { - size_t faceInd = Index(m, *fi); - size_t vertInd = Index(m, (*fi).V(j)); - int curVertexInd = indVec[faceInd*3+ j]; - qDebug("Setting Face %2i vert %2i : %2i -> %2i",faceInd,j,vertInd,curVertexInd); - assert(curVertexInd != -1); - assert(curVertexInd < m.vn); - if(curVertexInd < startVn) assert(curVertexInd == vertInd); - if(curVertexInd >= startVn) - { - //m.vert[curVertexInd].ImportData(*((*fi).V(j))); - tri::Append::ImportVertex(m.vert[curVertexInd],*((*fi).V(j))); - (*fi).V(j) = & m.vert[curVertexInd]; - } - } - -*/