fix a bug where we were throwing a string instead of an exception

This commit is contained in:
papush! 2021-11-25 14:59:25 +01:00
parent 36891b7589
commit a15cb96e2e

View File

@ -54,7 +54,9 @@ QuadPatch Courbures::fit_quad(MyMesh::VertexHandle vh) {
static std::vector<MyMesh::VertexHandle> neigh;
neigh.clear();
get_two_neighborhood(neigh, vh);
if (neigh.size() < 5) throw "Quad fitting: not enough neighbors";
if (neigh.size() < 5) {
throw std::runtime_error("Quad fitting: not enough neighbors");
}
// Calcul de la matrice de changement de base
Eigen::Vector3d Oz(0,0,1);