quick and dirty fix for polygon import from trimesh

This commit is contained in:
Luigi Malomo 2021-03-23 01:06:28 +01:00
parent 82ce871150
commit f83bdf0815
1 changed files with 2 additions and 1 deletions

View File

@ -141,7 +141,8 @@ namespace tri {
{
std::vector<typename TriMeshType::VertexPointer> vs;// vertices of the polygon
ExtractPolygon(&*tfi,vs);
std::reverse(vs.begin(),vs.end());
if (vs.size() > 3)
std::reverse(vs.begin(), vs.end());
//now vs contains all the vertices of the polygon (still in the trimesh)
if (vs.size()==0)continue;
typename PolyMeshType::FaceIterator pfi = tri::Allocator<PolyMeshType>::AddFaces(pm,1);