diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Parameterization_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Parameterization_plugin.cpp index 9f0d3aed363..186c01e9dfd 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Parameterization_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Parameterization_plugin.cpp @@ -618,7 +618,7 @@ void Polyhedron_demo_parameterization_plugin::parameterize(const Parameterizatio // Next is the gathering of the border halfedges of the connected component. // It is wrong to pass the underlying mesh tMesh: a sphere split in half does - // not have any border according if border_halfedges() is run with tMesh. + // not have any border if border_halfedges() is run with tMesh. // // The proper way would be to completely redesign the plugin to use Seam meshes // everywhere. But that's not worth it. Instead, we abuse the fact that faces @@ -786,9 +786,10 @@ void Polyhedron_demo_parameterization_plugin::parameterize(const Parameterizatio typedef boost::unordered_map Cones; Cones cmap; - SMP::internal::locate_unordered_cones, - Cones>(sMesh, unordered_cones, cmap); + if(!SMP::internal::locate_unordered_cones, + Cones>(sMesh, unordered_cones, cmap)) + return; // vimap and uvmap typedef boost::unordered_map Indices; diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/orbifold.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/orbifold.cpp index 24ae85c1e28..29229b30ba9 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/orbifold.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/orbifold.cpp @@ -108,9 +108,9 @@ int main(int argc, char * argv[]) // Mark the cones in the seam mesh typedef boost::unordered_map Cones; Cones cmap; - SMP::internal::locate_cones(mesh, cone_sm_vds, cmap); + bool locate_status = SMP::internal::locate_cones(mesh, cone_sm_vds, cmap); // The 2D points of the uv parametrisation will be written into this map // Note that this is a halfedge property map, and that uv values diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/MVC_post_processor_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/MVC_post_processor_3.h index 0bfb78d7f92..40636b8552b 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/MVC_post_processor_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/MVC_post_processor_3.h @@ -461,7 +461,7 @@ private: typename VertexUVMap, typename VertexIndexMap, typename VertexParameterizedMap> - void fill_linear_system_matrix_mvc_from_ct_face(const CT& ct, + void fill_linear_system_matrix_mvc_from_ct_face(const CT& CGAL_precondition_code(ct), typename CT::Finite_faces_iterator fh, const VertexUVMap uvmap, const VertexIndexMap vimap, diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/orbifold_cone_helper.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/orbifold_cone_helper.h index 9fd073d72fb..7417841398c 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/orbifold_cone_helper.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/orbifold_cone_helper.h @@ -399,7 +399,7 @@ Error_code read_cones(const TriangleMesh& pm, const char* filename, template -void locate_cones(const SeamMesh& mesh, +bool locate_cones(const SeamMesh& mesh, const Cones_in_pmesh_vector& cone_tm_vds, ConeMap& cones) { @@ -438,7 +438,7 @@ void locate_cones(const SeamMesh& mesh, } } - check_input_validity(mesh, cones, cone_tm_vds); + return check_input_validity(mesh, cones, cone_tm_vds); } /// Same as above, but the cones are NOT ordered and we thus use seam mesh @@ -451,11 +451,12 @@ void locate_cones(const SeamMesh& mesh, template -void locate_unordered_cones(const SeamMesh& mesh, +bool locate_unordered_cones(const SeamMesh& mesh, const Cones_in_pmesh_set& cone_tm_vds, ConeMap& cones) { CGAL_precondition(cones.empty()); + CGAL_precondition(cone_tm_vds.size() == 3 || cone_tm_vds.size() == 4); typedef typename SeamMesh::TriangleMesh TriangleMesh; @@ -527,7 +528,7 @@ void locate_unordered_cones(const SeamMesh& mesh, } while(vertex_on_seam != end); - check_input_validity(mesh, cones, cone_tm_vds); + return check_input_validity(mesh, cones, cone_tm_vds); } } // namespace internal