From 06040acbb0c01dd6d68b03401af353f0a16c3e79 Mon Sep 17 00:00:00 2001 From: cignoni Date: Sun, 12 Jul 2015 10:44:55 +0000 Subject: [PATCH] Corrected small bug in compacting arrays after a torus creation. Also faces must be compacted... --- vcg/complex/algorithms/create/platonic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcg/complex/algorithms/create/platonic.h b/vcg/complex/algorithms/create/platonic.h index 3dd500d5..84a70c28 100644 --- a/vcg/complex/algorithms/create/platonic.h +++ b/vcg/complex/algorithms/create/platonic.h @@ -603,7 +603,7 @@ void Torus(MeshType &m, float hRingRadius, float vRingRadius, int hRingDiv=24, i } FaceGrid(m,vRingDiv+1,hRingDiv+1); tri::Clean::RemoveDuplicateVertex(m); - tri::Allocator::CompactVertexVector(m); + tri::Allocator::CompactEveryVector(m); } @@ -764,7 +764,7 @@ void FaceGrid(MeshType & in, int w, int h) template void FaceGrid(MeshType & in, const std::vector &grid, int w, int h) { - assert(in.vn == (int)in.vert.size()); // require a compact vertex vector + tri::RequireCompactness(in); assert(in.vn <= w*h); // the number of vertices should match the number of expected grid vertices // V0 V1