
7 Mar
2022
7 Mar
'22
4:20 a.m.
Pretty much the title. I am trying to clip a mesh against a plane, to that effect i need to check each face against the plane and either delete the face or modify it introducing new vertices. I am trying this to access the vertices: ```cpp MyMesh::FaceIter f_it, v_end(mesh.faces_end()); uint count = 0; for (f_it=mesh.faces_begin(); f_it!=v_end;) { auto old_it = f_it; MyMesh::FaceVertexCCWIter fv_iter = mesh.fv_ccwiter(old_it); std::vector< MyMesh::VertexIter > new_face_verts; for (; fv_iter.is_valid(); ++fv_iter) { mesh.point(fv_iter); } ++f_it; mesh.delete_face(*old_it, true); } mesh.garbage_collection(); ``` But this is apparently invalid. As no method in the mesh accepts that iterator.