Reconstruct mesh regions after deleting scan artifacts

Hi,

I am trying to repair a mesh with local artifacts. The artifacts appear as small “pockets” or folded mesh regions. So far i can detect these regions quite reliable.

My current workflow is:

1: Detect problematic regions using mesh ray intersections

2: Identify the corresponding mesh faces

3: Expand the detected region by including neighboring faces (currently using a custom Python script)

4: Delete the faces

This works surprisingly well and removes the unwanted pocket geometry. The challenge is reconstructing the missing area. For one mesh i can reconstruct the area by extracting the naked edge loop and triangulating them

for others it doesn’t work…

After some debugging I found that:

  • The problematic naked edge loop is closed

  • The loop contains several self-intersections

  • Rhino reports multiple curve self-intersection points

  • I tried shattering the curve at the self-intersection locations and rejoining the resulting segments, but I still cannot generate a valid triangulation for that region

  • Rhino’s “Fill Mesh Holes” command closes some holes successfully but leaves this particular region open

repair_mesh_fold.gh (972.2 KB)

Any suggestions how i can close the mesh would be greatly appreciated.

Thanks

Have you tried the shrinkwrap component?

repair_mesh_fold_shrinkwrap_mrtn.gh (1019.8 KB)

Here with a slightly better quad mesh:

repair_mesh_fold_shrinkwrap_quadremesh_guidecurve_mrtn.gh (1.0 MB)

Also about scan artefacts… I own an Artec Leo and I tend to do all mesh cleaning in Artec Studio because it is really good at it. I’m usually inserting exported meshes which works quite efficiently with Grasshopper.

Thanks! I had tried ShrinkWrap before, but directly on the open mesh.

The trick of first extruding the boundary, capping it, and then running ShrinkWrap seems to make a big difference. The results are much better than my previous attempts.

I’ll test it on a few more scans, but so far it looks very promising