From e6e0c11a170dd4e90255c9aae628049bd04be769 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 17 Jul 2017 15:04:11 +0200 Subject: [PATCH 1/2] Set the failbit instead of writing a warning message to std::cout --- Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h index 176fc819b73..f080b4d5993 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h @@ -2043,8 +2043,10 @@ private: //------------------------------------------------------- private data /// Extracts the surface mesh from an input stream in Ascii OFF, COFF, NOFF, CNOFF /// format and appends it to the surface mesh `sm`. /// The operator reads the point property as well as "v:normal", "v:color", and "f:color". - /// Vertex texture coordinates are ignored. + /// Vertex texture coordinates are ignored. The surface mesh `sm` is initially cleared. /// \pre `operator>>(std::istream&,const P&)` must be defined. + /// \pre The data in the stream must represent a two-manifold. If this is not the case + /// the `failbit` of `is` is set and the mesh cleared. template bool read_off(std::istream& is, Surface_mesh

& sm) @@ -2123,9 +2125,9 @@ private: //------------------------------------------------------- private data Face_index fi = sm.add_face(vr); if(fi == sm.null_face()) { - std::cout<< "Warning: Facets don't seem to be oriented. Loading a Soup of polygons instead."< Date: Tue, 18 Jul 2017 17:13:18 +0200 Subject: [PATCH 2/2] fix doc --- Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h index f080b4d5993..7855807fdac 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h @@ -2043,7 +2043,7 @@ private: //------------------------------------------------------- private data /// Extracts the surface mesh from an input stream in Ascii OFF, COFF, NOFF, CNOFF /// format and appends it to the surface mesh `sm`. /// The operator reads the point property as well as "v:normal", "v:color", and "f:color". - /// Vertex texture coordinates are ignored. The surface mesh `sm` is initially cleared. + /// Vertex texture coordinates are ignored. /// \pre `operator>>(std::istream&,const P&)` must be defined. /// \pre The data in the stream must represent a two-manifold. If this is not the case /// the `failbit` of `is` is set and the mesh cleared.