fillholes.py 377 B

12345678910
  1. """Identify and fill holes of an input mesh.
  2. Holes are identified by locating boundary edges, linking them
  3. together into loops, and then triangulating the resulting loops."""
  4. from vedo import Mesh, show, dataurl
  5. a = Mesh(dataurl+"bunny.obj").lw(1).bc('red')
  6. b = a.clone() # make a copy
  7. b.fill_holes(size=0.1).color("lb").bc('red5')
  8. show(a, b, __doc__, elevation=-40).close()