diff --git a/BGL/doc/BGL/BGL.txt b/BGL/doc/BGL/BGL.txt index bb4c6a4b5c5..54ab9e0ae06 100644 --- a/BGL/doc/BGL/BGL.txt +++ b/BGL/doc/BGL/BGL.txt @@ -522,7 +522,7 @@ a `double` value to the halfedges of a graph. \subsection BGLGraphIO Graph I/O Using a common graph concept enables having common input/output functions for all the models -of this concept. A number of file formats are supported for models of `FaceGraph`: +of this concept. The following file formats are supported for models of `FaceGraph`: - \ref IOStreamOFF (`.off`) - \ref IOStreamOBJ (`.obj`) - \ref IOStreamSTL (`.stl`) @@ -530,7 +530,7 @@ of this concept. A number of file formats are supported for models of `FaceGraph - \ref IOStreamGocad (`.ts`) - \ref IOStreamVTK (`.vtp`) -See the page \ref PkgBGLIOFct for an exhaustive description of the functions. +See the page \ref PkgBGLIOFct for an exhaustive description of the I/O functions of this package. \section BGLEulerOperations Euler Operations diff --git a/BGL/doc/BGL/PackageDescription.txt b/BGL/doc/BGL/PackageDescription.txt index 6114ce60bd5..d258161d36d 100644 --- a/BGL/doc/BGL/PackageDescription.txt +++ b/BGL/doc/BGL/PackageDescription.txt @@ -468,21 +468,37 @@ the requirement for traversal of all faces in a graph. /// \ingroup PkgBGLRef /// \defgroup PkgBGLIoFuncsSTL STL I/O Functions +/// I/O Functions for \ref IOStreamSTL /// \ingroup PkgBGLIOFct + /// \defgroup PkgBGLIoFuncsPLY PLY I/O Functions +/// I/O Functions for \ref IOStreamPLY /// \ingroup PkgBGLIOFct + /// \defgroup PkgBGLIoFuncsOBJ OBJ I/O Functions +/// I/O Functions for \ref IOStreamOBJ /// \ingroup PkgBGLIOFct + /// \defgroup PkgBGLIoFuncsOFF OFF I/O Functions +/// I/O Functions for \ref IOStreamOFF /// \ingroup PkgBGLIOFct + /// \defgroup PkgBGLIoFuncsVTP VTP I/O Functions +/// I/O Functions for \ref IOStreamVTK /// \ingroup PkgBGLIOFct + /// \defgroup PkgBGLIoFuncsGOCAD GOCAD I/O Functions +/// I/O Functions for \ref IOStreamGocad /// \ingroup PkgBGLIOFct + /// \defgroup PkgBGLIoFuncsWRL WRL I/O Functions +/// I/O Functions for \ref IOStreamWRL /// \ingroup PkgBGLIOFct + /// \defgroup PkgBGLIOFuncs3MF 3MF I/O Functions +/// I/O Functions for \ref IOStream3MF /// \ingroup PkgBGLIOFct + /// \defgroup PkgBGLIOFctDeprecated I/O Functions (Deprecated) /// \ingroup PkgBGLIOFct @@ -741,19 +757,14 @@ user might encounter. \cgalCRPSection{I/O Functions} - `CGAL::read_polygon_mesh()` - `CGAL::write_polygon_mesh()` -- `CGAL::read_OFF()` -- `CGAL::write_OFF()` -- `CGAL::read_OBJ()` -- `CGAL::write_OBJ()` -- `CGAL::read_STL()` -- `CGAL::write_STL()` -- `CGAL::read_VTP()` -- `CGAL::write_VTP()` -- `CGAL::read_GOCAD()` -- `CGAL::write_GOCAD()` -- `CGAL::write_3MF()` -- `CGAL::write_WRL()` - +- \link PkgBGLIoFuncsSTL I/O for STL files \endlink +- \link PkgBGLIoFuncsPLY I/O for PLY files \endlink +- \link PkgBGLIoFuncsOBJ I/O for OBJ files \endlink +- \link PkgBGLIoFuncsOFF I/O for OFF files \endlink +- \link PkgBGLIoFuncsGOCAD I/O for GOCAD files \endlink +- \link PkgBGLIoFuncsVTP I/O for VTP files \endlink +- \link PkgBGLIoFuncs3MF I/O for 3MF files \endlink +- \link PkgBGLIoFuncsWRL I/O for WRL files \endlink */ /*! diff --git a/BGL/include/CGAL/boost/graph/IO/WRL.h b/BGL/include/CGAL/boost/graph/IO/WRL.h index 3780ad599bb..49746514a0f 100644 --- a/BGL/include/CGAL/boost/graph/IO/WRL.h +++ b/BGL/include/CGAL/boost/graph/IO/WRL.h @@ -22,6 +22,11 @@ #include #include +#ifdef DOXYGEN_RUNNING +#define CGAL_BGL_NP_TEMPLATE_PARAMETERS NamedParameters +#define CGAL_BGL_NP_CLASS NamedParameters +#endif + namespace CGAL { //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/BGL/include/CGAL/boost/graph/IO/polygon_mesh_io.h b/BGL/include/CGAL/boost/graph/IO/polygon_mesh_io.h index f2777aa5b1b..623d287b42c 100644 --- a/BGL/include/CGAL/boost/graph/IO/polygon_mesh_io.h +++ b/BGL/include/CGAL/boost/graph/IO/polygon_mesh_io.h @@ -110,7 +110,7 @@ bool read_polygon_mesh(std::istream& is, * \cgalParamDescription{indicates whether data should be read in binary (`true`) or in ASCII (`false`)} * \cgalParamType{Boolean} * \cgalParamDefault{`true`} - * \cgalParamExtra{This applies only the \ref IOStreamPLY file format. } + * \cgalParamExtra{This applies only to the \ref IOStreamPLY file format. } * \cgalParamNEnd * \cgalNamedParamsEnd * @@ -208,7 +208,7 @@ bool read_polygon_mesh(const char* fname, Graph& g) * \cgalParamDescription{indicates whether data should be written in binary (`true`) or in ASCII (`false`)} * \cgalParamType{Boolean} * \cgalParamDefault{`true`} - * \cgalParamExtra{This applies only the \ref IOStreamPLY file format. } + * \cgalParamExtra{This applies only to the \ref IOStreamPLY file format. } * \cgalParamNEnd * * \cgalParamNBegin{vertex_point_map} diff --git a/Documentation/doc/Documentation/Tutorials/Tutorial_reconstruction.txt b/Documentation/doc/Documentation/Tutorials/Tutorial_reconstruction.txt index 4f80cd33642..8f3b226a177 100644 --- a/Documentation/doc/Documentation/Tutorials/Tutorial_reconstruction.txt +++ b/Documentation/doc/Documentation/Tutorials/Tutorial_reconstruction.txt @@ -244,8 +244,7 @@ through the points. Each of these methods produce a triangle mesh stored in different ways. If this output mesh is hampered by defects such as holes or self-intersections, \cgal provide several algorithms to post-process -it (hole filling, remeshing, etc.) in the package \ref -Chapter_PolygonMeshProcessing "Polygon Mesh Processing". +it (hole filling, remeshing, etc.) in the package \ref PkgPolygonMeshProcessing "Polygon Mesh Processing". We do not discuss these functions here as there are many postprocessing possibilities whose relevance strongly depends on the @@ -283,7 +282,7 @@ The following figure an example of a full reconstruction pipeline applied to a bear statue (courtesy _EPFL Computer Graphics and Geometry Laboratory_ \cgalCite{cgal:e-esmr}). Two mesh processing algorithms (hole filling and isotropic remeshing) are also applied -(refer to the chapter \ref Chapter_PolygonMeshProcessing "Polygon Mesh Processing" +(refer to the chapter \ref PkgPolygonMeshProcessing "Polygon Mesh Processing" for more information). \cgalFigureBegin{TutorialsReconstructionFigFull, reconstruction_pipeline.png} diff --git a/Point_set_3/doc/Point_set_3/PackageDescription.txt b/Point_set_3/doc/Point_set_3/PackageDescription.txt index 9734072a042..5647f437edc 100644 --- a/Point_set_3/doc/Point_set_3/PackageDescription.txt +++ b/Point_set_3/doc/Point_set_3/PackageDescription.txt @@ -29,6 +29,22 @@ /// For a complete documentation of these functions, please refer to the /// \ref PkgPointSetProcessing3Ref manual. +/// \defgroup PkgPointSet3IOLAS Input/Output (LAS) +/// I/O Functions for \ref IOStreamLAS +/// \ingroup PkgPointSet3IO + +/// \defgroup PkgPointSet3IOOFF Input/Output (OFF) +/// I/O Functions for \ref IOStreamOFF +/// \ingroup PkgPointSet3IO + +/// \defgroup PkgPointSet3IOPLY Input/Output (PLY) +/// I/O Functions for \ref IOStreamPLY +/// \ingroup PkgPointSet3IO + +/// \defgroup PkgPointSet3IOXYZ Input/Output (XYZ) +/// I/O Functions for \ref IOStreamXYZ +/// \ingroup PkgPointSet3IO + /// \defgroup PkgPointSet3IODeprecated Input/Output (Deprecated) /// \ingroup PkgPointSet3IO /// These I/O functions are deprecated and newer versions should be used. @@ -68,13 +84,9 @@ to handle manually property maps and iterators. - `CGAL::read_point_set()` - `CGAL::write_point_set()` -- \link PkgPointSet3IO `CGAL::read_LAS()` \endlink -- \link PkgPointSet3IO `CGAL::write_LAS()` \endlink -- \link PkgPointSet3IO `CGAL::read_OFF()` \endlink -- \link PkgPointSet3IO `CGAL::write_OFF()` \endlink -- \link PkgPointSet3IO `CGAL::read_PLY()` \endlink -- \link PkgPointSet3IO `CGAL::write_PLY()` \endlink -- \link PkgPointSet3IO `CGAL::read_XYZ()` \endlink -- \link PkgPointSet3IO `CGAL::write_XYZ()` \endlink +- \link PkgPointSet3IOLAS I/O for `LAS` files \endlink +- \link PkgPointSet3IOOFF I/O for `OFF` files \endlink +- \link PkgPointSet3IOPLY I/O for `PLY` files \endlink +- \link PkgPointSet3IOXYZ I/O for `XYZ` files \endlink */ diff --git a/Point_set_3/include/CGAL/Point_set_3/IO/LAS.h b/Point_set_3/include/CGAL/Point_set_3/IO/LAS.h index c4a2e977045..d048f5f8a14 100644 --- a/Point_set_3/include/CGAL/Point_set_3/IO/LAS.h +++ b/Point_set_3/include/CGAL/Point_set_3/IO/LAS.h @@ -58,7 +58,7 @@ void check_if_property_is_used(PointSet& point_set, } // namespace internal /*! - \ingroup PkgPointSet3IO + \ingroup PkgPointSet3IOLAS \brief reads the content of an intput stream in the \ref IOStreamLAS into a point set. @@ -152,7 +152,7 @@ bool read_LAS(std::istream& is, } /*! - \ingroup PkgPointSet3IO + \ingroup PkgPointSet3IOLAS \brief reads the content of an intput stream in the \ref IOStreamLAS into a point set. @@ -199,7 +199,7 @@ CGAL_DEPRECATED bool read_las_point_set(std::istream& is, ///< input stream. // Write /*! - \ingroup PkgPointSet3IO + \ingroup PkgPointSet3IOLAS \brief writes the content of a point set into an output stream in the \ref IOStreamLAS. @@ -402,7 +402,7 @@ bool write_LAS(std::ostream& os, CGAL::Point_set_3& point_set) } /*! - \ingroup PkgPointSet3IO + \ingroup PkgPointSet3IOLAS \brief writes the content of a point set into an output file in the \ref IOStreamLAS. diff --git a/Point_set_3/include/CGAL/Point_set_3/IO/OFF.h b/Point_set_3/include/CGAL/Point_set_3/IO/OFF.h index ec17c26215f..570b0f0d1e5 100644 --- a/Point_set_3/include/CGAL/Point_set_3/IO/OFF.h +++ b/Point_set_3/include/CGAL/Point_set_3/IO/OFF.h @@ -39,7 +39,7 @@ class Point_set_3; // Read /*! - \ingroup PkgPointSet3IO + \ingroup PkgPointSet3IOOFF \brief reads the content of an intput stream in the \ref IOStreamOFF into a point set. @@ -78,7 +78,7 @@ bool read_OFF(std::istream& is, } /*! - \ingroup PkgPointSet3IO + \ingroup PkgPointSet3IOOFF \brief reads the content of an input file in the \ref IOStreamOFF into a point set. @@ -125,7 +125,7 @@ CGAL_DEPRECATED bool read_off_point_set(std::istream& is, ///< input stream. // Write /*! - \ingroup PkgPointSet3IO + \ingroup PkgPointSet3IOOFF \brief writes the content of a point set into an output stream in the \ref IOStreamOFF. @@ -168,7 +168,7 @@ bool write_OFF(std::ostream& os, const CGAL::Point_set_3& point_s } /*! - \ingroup PkgPointSet3IO + \ingroup PkgPointSet3IOOFF \brief writes the content of a point set into an output file in the \ref IOStreamOFF. diff --git a/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h b/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h index 923698848af..bdf187124a7 100644 --- a/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h +++ b/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h @@ -222,7 +222,7 @@ public: // Read /*! - \ingroup PkgPointSet3IO + \ingroup PkgPointSet3IOPLY \brief reads a point set with properties from an input stream in ASCII or Binary \ref IOStreamPLY. @@ -307,7 +307,7 @@ bool read_PLY(std::istream& is, CGAL::Point_set_3& point_set) } /*! - \ingroup PkgPointSet3IO + \ingroup PkgPointSet3IOPLY \brief reads a point set with properties from an input stream in ASCII or Binary \ref IOStreamPLY. @@ -446,7 +446,7 @@ CGAL_DEPRECATED bool read_ply_point_set(std::istream& is, ///< input stream. // Write /*! - \ingroup PkgPointSet3IO + \ingroup PkgPointSet3IOPLY \brief writes a point set with properties in an output stream in the \ref IOStreamPLY. @@ -713,7 +713,7 @@ bool write_PLY(std::ostream& os, const CGAL::Point_set_3& point_s } /*! - \ingroup PkgPointSet3IO + \ingroup PkgPointSet3IOPLY \brief writes a point set with properties in an output stream in the \ref IOStreamPLY. @@ -734,11 +734,17 @@ bool write_PLY(std::ostream& os, const CGAL::Point_set_3& point_s \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below \cgalNamedParamsBegin - \cgalParamNBegin{stream_precision} - \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} + \cgalParamNBegin{use_binary_mode} + \cgalParamDescription{indicates whether data should be read in binary (`true`) or in ASCII (`false`)} + \cgalParamType{Boolean} + \cgalParamDefault{`true`} + \cgalParamNEnd + + \cgalParamNBegin{stream_precision} + \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} \cgalParamType{int} - \cgalParamDefault{`6`} - \cgalParamNEnd + \cgalParamDefault{`6`} + \cgalParamNEnd \cgalNamedParamsEnd \return `true` if the reading was successful, `false` otherwise. diff --git a/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h b/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h index 85bbb918510..9e495e8b6dc 100644 --- a/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h +++ b/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h @@ -38,7 +38,7 @@ class Point_set_3; // Read /*! - \ingroup PkgPointSet3IO + \ingroup PkgPointSet3IOXYZ \brief reads the content of an intput stream in the \ref IOStreamXYZ into a point set. @@ -77,7 +77,7 @@ bool read_XYZ(std::istream& is, } /*! - \ingroup PkgPointSet3IO + \ingroup PkgPointSet3IOXYZ \brief reads the content of an input file in the the \ref IOStreamXYZ into a point set. @@ -123,7 +123,7 @@ CGAL_DEPRECATED bool read_xyz_point_set(std::istream& is, CGAL::Point_set_3& point_s } /*! - \ingroup PkgPointSet3IO + \ingroup PkgPointSet3IOXYZ \brief writes the content of a point set into an output file in the \ref IOStreamXYZ. diff --git a/Point_set_processing_3/include/CGAL/IO/read_las_points.h b/Point_set_processing_3/include/CGAL/IO/read_las_points.h index ede86a5ecc4..de8e00052f5 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_las_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_las_points.h @@ -445,6 +445,7 @@ bool read_LAS_with_properties(std::istream& is, \cgalNamedParamsEnd \return `true` on success. + \sa \ref IOStreamLAS */ template bool read_polygon_mesh(const char* fname, diff --git a/Polyhedron/doc/Polyhedron/CGAL/IO/Polyhedron_iostream.h b/Polyhedron/doc/Polyhedron/CGAL/IO/Polyhedron_iostream.h index 3434ef53179..ee2def4101b 100644 --- a/Polyhedron/doc/Polyhedron/CGAL/IO/Polyhedron_iostream.h +++ b/Polyhedron/doc/Polyhedron/CGAL/IO/Polyhedron_iostream.h @@ -18,7 +18,7 @@ format automatically and can read both. \sa `CGAL::Polyhedron_incremental_builder_3` \sa \link PkgPolyhedronIOFunc `operator<<(std::ostream&, Polyhedron_3&)`\endlink -This function overloads the generic function \link PkgBGLIOFct `read_OFF(std::istream&, FaceGraph)`\endlink. +This function overloads the generic function \link PkgBGLIoFuncsOFF `read_OFF(std::istream&, FaceGraph)`\endlink. \cgalHeading{Implementation} @@ -69,7 +69,7 @@ to allow for (a few) structuring comments in the output. Otherwise, the output would be free of comments. The default for writing is ASCII without comments. -This function overloads the generic function \link PkgBGLIOFct `write_OFF(std::istream&,FaceGraph)` \endlink. +This function overloads the generic function \link PkgBGLIoFuncsOFF `write_OFF(std::istream&,FaceGraph)` \endlink. \sa `CGAL::Polyhedron_3` \sa `CGAL::Polyhedron_incremental_builder_3` diff --git a/Polyhedron/include/CGAL/IO/Polyhedron_OFF_iostream.h b/Polyhedron/include/CGAL/IO/Polyhedron_OFF_iostream.h index 1d718bbab0f..ba59a5e0861 100644 --- a/Polyhedron/include/CGAL/IO/Polyhedron_OFF_iostream.h +++ b/Polyhedron/include/CGAL/IO/Polyhedron_OFF_iostream.h @@ -61,6 +61,7 @@ bool read_OFF(std::istream& in, using parameters::choose_parameter; using parameters::get_parameter; using parameters::is_default_parameter; + if(!(is_default_parameter(get_parameter(np, internal_np::vertex_color_map))) || !(is_default_parameter(get_parameter(np, internal_np::face_color_map))) || !(is_default_parameter(get_parameter(np, internal_np::vertex_normal_map))) || diff --git a/Stream_support/doc/Stream_support/IOstream.txt b/Stream_support/doc/Stream_support/IOstream.txt index b0200acd541..c899d7a0638 100644 --- a/Stream_support/doc/Stream_support/IOstream.txt +++ b/Stream_support/doc/Stream_support/IOstream.txt @@ -255,14 +255,45 @@ the state is inactive, nothing happens. \section IOstreamSupportedFormats Importing and Exporting Data using Standard Formats Although there is a large number of different types of input data structures in \cgal algorithms, -some common data structures such as point sets or polygon meshes appear more often. These +some common data structures such as point sets or polygon meshes appear often. These traditional data structures have long been used and specific standards have been created -to facilite information exchange. In the following section, supported file formats are listed +to facilite data exchange. In the following section, the file formats supported in \cgal are listed for the most common data structures used in \cgal. A reverse viewpoint, listing the data structures -which can be used for a specific file format is available on \ref IOStreamSupportedFileFormats. +which can be used for a specific file format is available on the page: \ref IOStreamSupportedFileFormats. \subsection IOstreamPointSetIO Point Set IO -The class `CGAL::Point_set_3` is the data structure used in \cgal to represent point sets. +A set of points is the basic input of many algorithms. The following table shows which file formats +can be read from and written to for basic point ranges. + + + + + + + + + + + + + + + + + + + + + + + + + + +
Generic\ref IOStreamOFF "OFF"\ref IOStreamXYZ "XYZ"\ref IOStreamPLY "PLY"\ref IOStreamPLY "LAS"
Inputread_points()\link PkgPointSetProcessing3IOOff `read_OFF()` \endlink\link PkgPointSetProcessing3IOXyz `read_XYZ()` \endlink\link PkgPointSetProcessing3IOPly `read_PLY()` \endlink\link PkgPointSetProcessing3IOLas `read_LAS()` \endlink
Outputwrite_points()\link PkgPointSetProcessing3IOOff `write_OFF()` \endlink\link PkgPointSetProcessing3IOXyz `write_XYZ()` \endlink\link PkgPointSetProcessing3IOPly `write_PLY()` \endlink\link PkgPointSetProcessing3IOLas `write_LAS()` \endlink
+ + +The class `CGAL::Point_set_3` is the data structure used in \cgal. It is a vector-based data structure that contains a default property (named point) for the coordinates of the points, and is able to work with dynamic properties. The file formats supported for `CGAL::Point_set_3` are detailed in the table below. @@ -274,44 +305,23 @@ The file formats supported for `CGAL::Point_set_3` are detailed in the table bel \ref IOStreamOFF "OFF" \ref IOStreamXYZ "XYZ" \ref IOStreamPLY "PLY" + \ref IOStreamLAS "LAS" Input read_point_set() - read_OFF() - read_XYZ() - read_PLY() + \link PkgPointSet3IOOFF `read_OFF()` \endlink + \link PkgPointSet3IOXYZ `read_XYZ()` \endlink + \link PkgPointSet3IOPLY `read_PLY()` \endlink + \link PkgPointSet3IOLAS `read_LAS()` \endlink Output write_point_set() - write_OFF() - write_XYZ() - write_PLY() - - - - - - - - - - - - - - - - - - - - - - - - + + + +
Generic\ref IOStreamOFF "OFF"\ref IOStreamXYZ "XYZ"\ref IOStreamPLY "PLY"
Inputread_points()read_OFF()read_XYZ()read_PLY()
Outputwrite_points()write_OFF()write_XYZ()write_PLY()\link PkgPointSet3IOOFF `write_OFF()` \endlink\link PkgPointSet3IOXYZ `write_XYZ()` \endlink\link PkgPointSet3IOPLY `write_PLY()` \endlink\link PkgPointSet3IOLAS `write_LAS()` \endlink
@@ -325,25 +335,37 @@ their indices per face (i.e a vector of 3 integers represent a triangle face). Generic \ref IOStreamOFF "OFF" - \ref IOStreamSTL "STL" \ref IOStreamOBJ "OBJ" + \ref IOStreamSTL "STL" \ref IOStreamPLY "PLY" + \ref IOStreamVTP "VTP" + \ref IOStreamGOCAD "GOCAD" + \ref IOStreamWKT "WKT" + \ref IOStream3MF "3MF" Input read_polygon_soup() - read_OFF() - read_STL() - read_OBJ() - read_PLY() + \link PkgStreamSupportIoFuncsOFF `read_OFF()` \endlink + \link PkgStreamSupportIoFuncsOBJ `read_OBJ()` \endlink + \link PkgStreamSupportIoFuncsSTL `read_STL()` \endlink + \link PkgStreamSupportIoFuncsPLY `read_PLY()` \endlink + \link PkgStreamSupportIoFuncsVTP `read_VTP()` \endlink + \link PkgStreamSupportIoFuncsGOCAD `read_GOCAD()` \endlink + \link PkgStreamSupportIoFuncsWKT `read_WKT()` \endlink + \link PkgStreamSupportIoFuncs3MF `read_triangle_soups_from_3mf()` \endlink Output write_polygon_soup() - write_OFF() - write_STL() - - - write_PLY() + \link PkgStreamSupportIoFuncsOFF `write_OFF()` \endlink + \link PkgStreamSupportIoFuncsOBJ `write_OBJ()` \endlink + \link PkgStreamSupportIoFuncsSTL `write_STL()` \endlink + \link PkgStreamSupportIoFuncsPLY `write_PLY()` \endlink + \link PkgStreamSupportIoFuncsVTP `write_VTP()` \endlink + \link PkgStreamSupportIoFuncsGOCAD `write_GOCAD()` \endlink + \link PkgStreamSupportIoFuncsWKT `write_WKT()` \endlink + \link PkgStreamSupportIoFuncs3MF `write_triangle_soups_to_3mf()` \endlink diff --git a/Stream_support/doc/Stream_support/PackageDescription.txt b/Stream_support/doc/Stream_support/PackageDescription.txt index f2805e0227d..e7d684eb329 100644 --- a/Stream_support/doc/Stream_support/PackageDescription.txt +++ b/Stream_support/doc/Stream_support/PackageDescription.txt @@ -5,20 +5,35 @@ /// \ingroup PkgStreamSupportRef /// \defgroup PkgStreamSupportIoFuncsSTL STL I/O Functions +/// I/O Functions for \ref IOStreamSTL /// \ingroup IOstreamFunctions + /// \defgroup PkgStreamSupportIoFuncsPLY PLY I/O Functions +/// I/O Functions for \ref IOStreamPLY /// \ingroup IOstreamFunctions + /// \defgroup PkgStreamSupportIoFuncsOBJ OBJ I/O Functions +/// I/O Functions for \ref IOStreamOBJ /// \ingroup IOstreamFunctions + /// \defgroup PkgStreamSupportIoFuncsOFF OFF I/O Functions +/// I/O Functions for \ref IOStreamOFF /// \ingroup IOstreamFunctions + /// \defgroup PkgStreamSupportIoFuncsVTP VTP I/O Functions +/// I/O Functions for \ref IOStreamVTK /// \ingroup IOstreamFunctions + /// \defgroup PkgStreamSupportIoFuncsGOCAD GOCAD I/O Functions +/// I/O Functions for \ref IOStreamGocad /// \ingroup IOstreamFunctions + /// \defgroup PkgStreamSupportIoFuncsWKT WKT I/O Functions +/// I/O Functions for \ref IOStreamWKT /// \ingroup IOstreamFunctions + /// \defgroup PkgStreamSupportIoFuncs3MF 3MF I/O Functions +/// I/O Functions for \ref IOStream3MF /// \ingroup IOstreamFunctions /// \defgroup PkgStreamSupportEnumRef I/O Enums @@ -49,7 +64,15 @@ the printing mode. \cgalClassifedRefPages \cgalCRPSection{Enum} -- `CGAL::IO::Mode` +- \link PkgStreamSupportEnumRef `CGAL::IO::Mode` \endlink + +\cgalCRPSection{Classes} +- `CGAL::Color` +- `CGAL::Istream_iterator` +- `CGAL::Ostream_iterator` +- `CGAL::Verbose_ostream` +- `CGAL::Input_rep` +- `CGAL::Output_rep` \cgalCRPSection{Functions} - `CGAL::get_mode()` @@ -66,8 +89,8 @@ the printing mode. - `CGAL::oformat()` \cgalCRPSection{I/O Functions} -- `GCAL::read_polygon_soup()` -- `GCAL::write_polygon_soup()` +- `CGAL::read_polygon_soup()` +- `CGAL::write_polygon_soup()` - \link PkgStreamSupportIoFuncsSTL I/O for STL files \endlink - \link PkgStreamSupportIoFuncsPLY I/O for PLY files \endlink - \link PkgStreamSupportIoFuncsOBJ I/O for OBJ files \endlink @@ -75,28 +98,7 @@ the printing mode. - \link PkgStreamSupportIoFuncsGOCAD I/O for GOCAD files \endlink - \link PkgStreamSupportIoFuncsVTP I/O for VTP files \endlink - \link PkgStreamSupportIoFuncs3MF I/O for 3MF files \endlink +- \link PkgStreamSupportIoFuncsWKT I/O for WKT files \endlink -\cgalCRPSection{I/O Functions (WKT)} -- `GCAL::read_WKT()` -- `CGAL::read_point_WKT()` -- `GCAL::read_multi_point_WKT()` -- `GCAL::read_linestring_WKT()` -- `GCAL::read_multi_linestring_WKT()` -- `GCAL::read_polygon_WKT()` -- `GCAL::read_multi_polygon_WKT()` -- `CGAL::write_point_WKT()` -- `CGAL::write_polygon_WKT()` -- `CGAL::write_linestring_WKT()` -- `CGAL::write_multi_point_WKT()` -- `CGAL::write_multi_polygon_WKT()` -- `CGAL::write_multi_linestring_WKT()` - -\cgalCRPSection{Classes} -- `CGAL::Color` -- `CGAL::Istream_iterator` -- `CGAL::Ostream_iterator` -- `CGAL::Verbose_ostream` -- `CGAL::Input_rep` -- `CGAL::Output_rep` */ diff --git a/Surface_mesh/doc/Surface_mesh/PackageDescription.txt b/Surface_mesh/doc/Surface_mesh/PackageDescription.txt index f85b321c688..f882bb15535 100644 --- a/Surface_mesh/doc/Surface_mesh/PackageDescription.txt +++ b/Surface_mesh/doc/Surface_mesh/PackageDescription.txt @@ -11,6 +11,14 @@ /// \defgroup PkgSurfaceMeshIOFunc I/O Functions /// \ingroup PkgSurface_mesh +/// \defgroup PkgSurfaceMeshIOFuncOFF I/O Functions (OFF) +/// I/O Functions for \ref IOStreamOFF +/// \ingroup PkgSurfaceMeshIOFunc + +/// \defgroup PkgSurfaceMeshIOFuncPLY I/O Functions (PLY) +/// I/O Functions for \ref IOStreamPLY +/// \ingroup PkgSurfaceMeshIOFunc + /// \defgroup PkgSurfaceMeshIOFuncDeprecated I/O Functions (Deprecated) /// \ingroup PkgSurfaceMeshIOFunc @@ -46,10 +54,8 @@ and faces is much simpler and can be used at runtime and not at compile time.} - \link PkgDrawSurfaceMesh CGAL::draw() \endlink \cgalCRPSection{I/O Functions} +- \link PkgSurfaceMeshIOFuncOFF I/O for `OFF` files \endlink +- \link PkgSurfaceMeshIOFuncPLY I/O for `PLY` files \endlink - `read_3MF()` -- \link PkgSurfaceMeshIOFunc `read_OFF()` \endlink -- \link PkgSurfaceMeshIOFunc `write_OFF()` \endlink -- \link PkgSurfaceMeshIOFunc `read_PLY()` \endlink -- \link PkgSurfaceMeshIOFunc `write_PLY()` \endlink */ diff --git a/Surface_mesh/include/CGAL/Surface_mesh/IO/OFF.h b/Surface_mesh/include/CGAL/Surface_mesh/IO/OFF.h index 82752a18096..effe258945c 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/IO/OFF.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/IO/OFF.h @@ -255,7 +255,7 @@ bool read_OFF_with_or_without_vnormals(std::istream& is, } // namespace IO } // namespace internal -/// \ingroup PkgSurfaceMeshIOFunc +/// \ingroup PkgSurfaceMeshIOFuncOFF /// /// \brief extracts the surface mesh from an input stream in ASCII OFF, COFF, NOFF, CNOFF /// format and appends it to the surface mesh `sm`. @@ -491,11 +491,11 @@ bool write_OFF_with_or_without_vnormals(std::ostream& os, } // namespace internal } // namespace IO -/// \ingroup PkgSurfaceMeshIOFunc +/// \ingroup PkgSurfaceMeshIOFuncOFF /// /// \brief writes the surface mesh `sm` in the output stream, using the \ref IOStreamOFF. /// -/// This overload of \link PkgBGLIOFct `read_OFF(std::ostream&, const Graph&)` \endlink will also output +/// This overload of \link PkgBGLIOFct `write_OFF(std::ostream&, const Graph&)` \endlink will also output /// the following property maps internal to the surface mesh, if they exist and if they are not /// already present in the named parameters: /// @@ -576,12 +576,6 @@ bool write_OFF(std::ostream& os, return IO::internal::write_OFF_with_or_without_vnormals(os, sm, np.vertex_point_map(get_const_property_map(CGAL::vertex_point, sm))); } -template -bool write_OFF(std::ostream& os, const Surface_mesh& sm) -{ - return write_OFF(os, sm, parameters::all_default()); -} - #ifndef CGAL_NO_DEPRECATED_CODE /*! diff --git a/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h b/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h index aa07e79016d..302e5dc47b2 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h @@ -711,7 +711,7 @@ void fill_header(std::ostream& os, const Surface_mesh& sm, } // namespace internal } // namespace IO -/// \ingroup PkgSurfaceMeshIOFunc +/// \ingroup PkgSurfaceMeshIOFuncPLY /// /// \brief extracts the surface mesh from an input stream in ASCII or Binary PLY format /// and appends it to the surface mesh `sm`. @@ -745,6 +745,8 @@ void fill_header(std::ostream& os, const Surface_mesh& sm, /// \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. /// +/// \attention Be mindful of the flag `std::ios::binary` flag when creating the `ifstream` when reading a binary file +/// /// \return `true` on success. template bool read_PLY(std::istream& is, @@ -864,7 +866,7 @@ CGAL_DEPRECATED bool read_ply(std::istream& is, Surface_mesh

& sm, std::string //////////////////////////////////////////////////////////////////////////////////////////////////// // Write -/// \ingroup PkgSurfaceMeshIOFunc +/// \ingroup PkgSurfaceMeshIOFuncPLY /// /// \brief inserts the surface mesh in an output stream in PLY format. /// @@ -894,6 +896,8 @@ CGAL_DEPRECATED bool read_ply(std::istream& is, Surface_mesh

& sm, std::string /// \cgalParamNEnd /// \cgalNamedParamsEnd /// +/// \attention Be mindful of the flag `std::ios::binary` flag when creating the `ofstream` when writing a binary file +/// /// \returns `true` if writing was successful. template