Detecting local self intersections mesh offset

Hi everyone,

I am currently developing a Rhino / Grasshopper workflow (later integrated into a C# Rhino plugin) where I offset a mesh by moving vertices individually along their vertex normals.

The important part is: each vertex has an individual offset value → the values come from vertex colors,therefore I cannot simply use a standard global mesh offset or ShrinkWrap-only workflow

In generall it works really well, however for certain geometries (especially taller meshes with concave regions), I get local self intersections (e.g. picture. The white mesh is the original one; the red one is the offset mesh)

These problematic areas later cause unstable mesh booleans. The issue is NOT global. It only happens locally in small problematic regions.

I am specifically looking for a robust way to detect these local self intersections BEFORE offsetting the mesh.

Things I already tested:

  • Mesh repair approaches

  • MeshRay / MeshLine collision tests

  • Comparing old/new edge lengths

  • Testing offset rays against original mesh

I am now wondering:

  1. Is there a known robust strategy for detecting local self intersections?

  2. Has anyone implemented something similar in Grasshopper / RhinoCommon?

The solution ideally needs to work either in Grasshopper or RhinoCommon.

Any ideas, plugins, RhinoCommon methods, or computational geometry approaches would be hugely appreciated.

Thanks!

What is the topology of your meshes?

Looks like grid type in the screenshot.

You could create polylines by vertices in U and V on the original mesh-grid, offset these, and test for self intersection.

Hello,

1.Is there a known robust strategy for detecting local self intersections?

https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.mesh/getselfintersections