Fix #85: OBJ export: do not store halfedge texture coordinates of boundary halfedges

This commit is contained in:
Martin Heistermann
2023-03-01 10:42:50 +01:00
parent b1fddbcd77
commit cbf40b5c6b

View File

@@ -64,6 +64,7 @@
#include <OpenMesh/Core/Utils/GenProg.hh> #include <OpenMesh/Core/Utils/GenProg.hh>
#include <OpenMesh/Core/Utils/vector_cast.hh> #include <OpenMesh/Core/Utils/vector_cast.hh>
#include <OpenMesh/Core/Utils/color_cast.hh> #include <OpenMesh/Core/Utils/color_cast.hh>
#include <OpenMesh/Core/Utils/Predicates.hh>
#include <OpenMesh/Core/IO/exporter/BaseExporter.hh> #include <OpenMesh/Core/IO/exporter/BaseExporter.hh>
#include <OpenMesh/Core/IO/OMFormat.hh> #include <OpenMesh/Core/IO/OMFormat.hh>
@@ -300,10 +301,9 @@ public:
{ {
unsigned int count(0); unsigned int count(0);
_hehandles.clear(); _hehandles.clear();
for(typename Mesh::CHIter he_it=mesh_.halfedges_begin(); for(auto heh: mesh_.halfedges().filtered(!OpenMesh::Predicates::Boundary()))
he_it != mesh_.halfedges_end(); ++he_it)
{ {
_hehandles.push_back(vector_cast<Vec2f>(mesh_.texcoord2D( *he_it))); _hehandles.push_back(vector_cast<Vec2f>(mesh_.texcoord2D(heh)));
++count; ++count;
} }