Skip to content

Commit

Permalink
- added try catch construct in order to prevent crash in case of a me…
Browse files Browse the repository at this point in the history
…sh containing non manifold edges
  • Loading branch information
granzuglia committed Dec 19, 2018
1 parent 42ef8f6 commit 48663dc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/meshlabplugins/filter_meshing/meshfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,8 +958,16 @@ switch(ID(filter))

lastisor_FeatureDeg = par.getFloat("FeatureDeg");

tri::IsotropicRemeshing<CMeshO>::Do(m.cm, toProjectCopy, params, cb);

try
{
tri::IsotropicRemeshing<CMeshO>::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);
Expand Down

0 comments on commit 48663dc

Please sign in to comment.