GC reports nonmanifold mesh when mesh is just not oriented consistently

Open
#142 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Start by locating the GC validation that reports a mesh as nonmanifold and reproduce the case where the mesh is manifold but faces are inconsistently oriented. Decide whether the intended scope is revised error text, explicit orientation detection, or an orientFaces() method; done means the selected behavior distinguishes or resolves this case without misreporting it.

Written by the indexing model from the issue text.

Description

GC will report that a mesh is nonmanifold even in cases where it is manifold, but the faces are not consistently aligned.

Level 1 fix

A quick improvement would just be to change error reporting to something like:

Mesh is either nonmanifold, or faces are not oriented consistently.
Level 2 fix

A bigger fix would be to detect that faces are inconsistently oriented, and report this explicitly:

Mesh is manifold, but faces are not consistently oriented.
Level 3 fix

The ultimate fix would be to actually fix the normal orientation, if the mesh is manifold and orientable. There are some design decisions here (e.g., which of the two orientations should we pick?) but generally this should be pretty straightforward.

We could also implement this as a general-purpose method like orientFaces(), which is probably useful in its own right. Then the user can be asked to call this method explicitly:

Mesh is manifold, but faces are not consistently oriented.  Please call orientFaces() before trying to build a ManifoldSurfaceMesh.

This may be better than automatically orienting someone's faces, which might violate the principle of least surprise.

Dominant language
C++
Stars
1.3k
Forks
183
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nmwsharp/geometry-central

All issues in nmwsharp/geometry-central

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.