diff --git a/Polyhedron/include/CGAL/IO/Polyhedron_builder_from_STL.h b/Polyhedron/include/CGAL/IO/Polyhedron_builder_from_STL.h index de3717e0063..6d611fca315 100644 --- a/Polyhedron/include/CGAL/IO/Polyhedron_builder_from_STL.h +++ b/Polyhedron/include/CGAL/IO/Polyhedron_builder_from_STL.h @@ -1,9 +1,9 @@ // Copyright (c) 2015 GeometryFactory // -// This file is part of CGAL (www.cgal.org); you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation; either version 3 of the License, -// or (at your option) any later version. +// This file is part of CGAL (www.cgal.org). +// You can redistribute it and/or modify it under the terms of the GNU +// General Public License as published by the Free Software Foundation, +// either version 3 of the License, or (at your option) any later version. // // Licensees holding a valid commercial license may use this file in // accordance with the commercial license agreement provided with the software. diff --git a/Stream_support/test/Stream_support/test_gocad.cpp b/Stream_support/test/Stream_support/test_gocad.cpp new file mode 100644 index 00000000000..e9d32a5fa83 --- /dev/null +++ b/Stream_support/test/Stream_support/test_gocad.cpp @@ -0,0 +1,88 @@ + +#include +#include +#include +#include +#include + +#include +#include +#include + +template +bool test_io() +{ + FaceGraph fg; + /*const char* tet = "GOCAD TSurf 1 \n" + "HEADER { \n" + "name:Tetrahedron \n" + "*border:on \n" + "*border*bstone:on \n" + "} \n" + "GOCAD_ORIGINAL_COORDINATE_SYSTEM\n" + "NAME Default \n" + "AXIS_NAME \"X\" \"Y\" \"Z\" \n" + "AXIS_UNIT \"m\" \"m\" \"m\" \n" + "ZPOSITIVE Elevation \n" + "END_ORIGINAL_COORDINATE_SYSTEM \n" + "TFACE \n" + "VRTX 0 0 0 0 \n" + "VRTX 1 1 0 0 \n" + "VRTX 2 0 1 0 \n" + "VRTX 3 0 0 1 \n" + "TRGL 0 2 1 \n" + "TRGL 2 0 3 \n" + "TRGL 1 2 3 \n" + "TRGL 0 1 3 \n" + "END \n";*/ + CGAL::make_tetrahedron(Point(0, 0, 0), Point(1, 1, 0), + Point(2, 0, 1), Point(3, 0, 0), fg); + std::ostringstream out; + out << fg; + if(out.fail()) + { + std::cerr<<"Tetrahedron writing failed."<> fg2; + + if(in.fail()){ + std::cerr<<"Tetrahedron reading failed."<, Epick::Point_3>()) + { + return 1; + } + if(!test_io,Epeck::Point_3>()) + { + return 1; + } + if(!test_io, Epick::Point_3>()) + { + return 1; + } + if(!test_io, Epeck::Point_3>()) + { + return 1; + } + return 0; +}