Search code examples
openmesh

How to delete triangles from an openmesh without creating polygons?


When I call mesh.delete_face(face_handle) in an OpenMesh using OpenMesh::TriMesh_ArrayKernelT<> I get somehow faces with more than 3 vertices, possibly a polygon around the hole created by deleted faces.

How can I avoid this to just get a boundary around the hole but no polygon? I am a bit surprised that a TriMesh can contain polygonal faces.


Solution

  • Calling garbage collection fixes this.

    I am a bit surprised as I would have thought you need to call garbage collection after removing and adding faces so you do not delete intermediate configurations possibly losing some objects your handles are pointing to.