Skip to content

Issue: localFixSelfIntersections does not fully resolve self-intersections and alters geometry #5923

@JEELGANDHI21

Description

@JEELGANDHI21

Description

When using mrmeshpy.localFixSelfIntersections() with CutAndFill method, the function does not completely resolve all self-intersections. Additionally, it modifies the mesh geometry (face count changes and residual artifacts remain), which is undesirable for precision-sensitive workflows like 3D printing.

Steps to Reproduce

Load an STL mesh
Run:
findSelfCollidingTrianglesBS
localFixSelfIntersections with CutAndFill
Re-run self-intersection detection and compare mesh statistics

settings = mrmeshpy.SelfIntersections.Settings()
settings.method = mrmeshpy.SelfIntersections.Settings.Method.CutAndFill
settings.maxExpand = 1
settings.touchIsIntersection = False
mrmeshpy.localFixSelfIntersections(mesh, settings)

Observed Behavior
Self-intersections are only partially resolved:
Before: 389
After: 74 remaining
Geometry is modified:
Faces reduced from 79276 → 79216
Zero-area faces still remain (51 → 44)

Mesh still has:
Multiple connected components (12)
Residual degeneracies

Original File
Image

After Repairing Self Intersection
Image
Image

Also tried to repair using Python Script available in Repository
There is a visible geometry change.

Image

Possible Improvement Suggestions

  • Provide a stricter mode for full self-intersection resolution
  • Add controls to limit geometry deviation
  • Improve handling of dense/self-overlapping regions
  • Provide diagnostics on why some intersections remain

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions