Merge branch 'fix-nonmanifold-no-collect' into 'master'

Not collecting failed faces but directly processing them

**Problem description:**

I encountered severe problems in my application because OpenMesh does not load attributes, such as face texture index, for failed faces (non-manifold geometry).
Instead of directly handling them, the Importer class defers the handling of failed faces to a post process - but at that point, the attribute information is not available any more, since it is read and applied in the reader, which only deals with the non-failed faces.


**Solution:**

My simple solution was to remove the list of failed faces and instead directly handle failed faces inside the "add_face" function of the Importer class.


**Discussion:**

I didn't see any drawback, compared to the previous code. It would be interesting to know why the list of failed faces was maintained - was this legacy code, or was there some idea to extend this concept, which was just  never realized? The only functional point that has changed is that I removed the code that adds degenerate faces to the mesh (line 129), since, in my opinion, this makes things just more complicated for some applications, and the benefit of being able to import degenerate faces seems marginal. But that's a design decision, it will be very easy to encapsulate the code that adds a separate face (line 140) into a separate function and use it also for degenerate faces.

It would be great to receive your feedback on this issue, and to know if it is possible to include this change (or something similar).

See merge request !51
This commit is contained in:
Jan Möbius
2016-04-14 10:56:45 +02:00
2 changed files with 34 additions and 50 deletions

View File

@@ -17,6 +17,7 @@
<b>IO</b>
<ul>
<li>Obj reader: added texCoord3d functions to objloader</li>
<li>Importer: Integrate non-manifold faces while importing and not at the end. Fixes missing properties on non-manifolds. (Thanks to Max Limper for the patch, Merge Request 51)<li>
</ul>
<b>VectorT</b>