From 46f8492f051cc03dd4a58f9c5a580752a457b304 Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Mon, 8 Feb 2016 13:41:33 +0000 Subject: [PATCH] added check on number of borders --- vcg/complex/algorithms/parametrization/poisson_solver.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vcg/complex/algorithms/parametrization/poisson_solver.h b/vcg/complex/algorithms/parametrization/poisson_solver.h index e9009403..a67d02dc 100644 --- a/vcg/complex/algorithms/parametrization/poisson_solver.h +++ b/vcg/complex/algorithms/parametrization/poisson_solver.h @@ -331,7 +331,7 @@ class PoissonSolver b[3] = scaled_Kimag * neg_t[1]; b[4] = scaled_Kreal * neg_t[2]; b[5] = scaled_Kimag * neg_t[2]; - ////fine codice mio + } ///return the LHS and RHS for a given face @@ -556,6 +556,9 @@ public: printf("Non Manifold Vertices \n"); return false; } + int H=tri::Clean::CountHoles(mesh); + if (H==0)return false; + int G=tri::Clean::MeshGenus(mesh); if (G!=0) { @@ -627,7 +630,7 @@ public: assert(0); } v0->T().P()=Point2(0,0); - v1->T().P()=Point2(1,0); + v1->T().P()=Point2(1,1); to_fix.push_back(v0); to_fix.push_back(v1); return;