From 48663dc3fc59ab381cc95941cc6b0a61e73debf5 Mon Sep 17 00:00:00 2001 From: 133470 Date: Wed, 19 Dec 2018 16:48:06 +1100 Subject: [PATCH] - added try catch construct in order to prevent crash in case of a mesh containing non manifold edges --- src/meshlabplugins/filter_meshing/meshfilter.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/meshlabplugins/filter_meshing/meshfilter.cpp b/src/meshlabplugins/filter_meshing/meshfilter.cpp index c1fd22977f..2365262ba5 100644 --- a/src/meshlabplugins/filter_meshing/meshfilter.cpp +++ b/src/meshlabplugins/filter_meshing/meshfilter.cpp @@ -958,8 +958,16 @@ switch(ID(filter)) lastisor_FeatureDeg = par.getFloat("FeatureDeg"); - tri::IsotropicRemeshing::Do(m.cm, toProjectCopy, params, cb); - + try + { + tri::IsotropicRemeshing::Do(m.cm, toProjectCopy, params, cb); + } + catch(vcg::MissingPreconditionException& excp) + { + Log(excp.what()); + errorMessage = excp.what(); + return false; + } m.UpdateBoxAndNormals(); // m.clearDataMask(MeshModel::MM_GEOMETRY_AND_TOPOLOGY_CHANGE | MeshModel::MM_FACEFACETOPO | MeshModel::MM_VERTQUALITY | MeshModel::MM_FACEMARK | MeshModel::MM_FACEFLAG);