From e7a5c27693590c619d064bbfaf3c5f3e46b2f9db Mon Sep 17 00:00:00 2001 From: Paolo Cignoni Date: Wed, 2 Nov 2016 11:23:25 +0100 Subject: [PATCH] Added OnlyEdgeMesh precondition in MeshAssert --- vcg/complex/algorithms/mesh_assert.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vcg/complex/algorithms/mesh_assert.h b/vcg/complex/algorithms/mesh_assert.h index f469e38c..7f4d2d5c 100644 --- a/vcg/complex/algorithms/mesh_assert.h +++ b/vcg/complex/algorithms/mesh_assert.h @@ -104,6 +104,14 @@ public: } } + static void OnlyEdgeMesh(MeshType &m) + { + if(m.FN()>0) + throw vcg::MissingPreconditionException("Expecting a mesh composed only by edges (no faces needed or allowed)"); + } + } + + }; } // end namespace tri