From d57be1d856f1484ae628ee7133f9a6f56aeba48c Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 20 Jul 2017 13:45:21 +0200 Subject: [PATCH] Add documentation and update changes.html --- Installation/changes.html | 13 +++++- .../Mesh_3/CGAL/output_c3t3_to_facegraph.h | 16 ++++++++ Mesh_3/doc/Mesh_3/Mesh_3.txt | 6 +++ Mesh_3/doc/Mesh_3/PackageDescription.txt | 1 + Mesh_3/doc/Mesh_3/dependencies | 1 + ...omplex_3_in_triangulation_3_to_facegraph.h | 41 +++++++++++++++---- .../test/Mesh_3/test_c3t3_into_facegraph.cpp | 2 +- .../IO/output_surface_facets_to_facegraph.h | 25 +++++++++++ .../doc/Surface_mesher/PackageDescription.txt | 1 + .../doc/Surface_mesher/Surface_mesher.txt | 3 +- .../IO/output_surface_facets_to_facegraph.h | 34 +++++++++------ Three/doc/Three/PackageDescription.txt | 1 - 12 files changed, 119 insertions(+), 25 deletions(-) create mode 100644 Mesh_3/doc/Mesh_3/CGAL/output_c3t3_to_facegraph.h create mode 100644 Surface_mesher/doc/Surface_mesher/CGAL/IO/output_surface_facets_to_facegraph.h diff --git a/Installation/changes.html b/Installation/changes.html index bd49e80a74a..9bf2a8ea24e 100644 --- a/Installation/changes.html +++ b/Installation/changes.html @@ -147,6 +147,18 @@ and src/ directories). +

3D Surface Mesh Generation

+ +

3D Mesh Generation

+ @@ -166,7 +178,6 @@ and src/ directories). -

Release 4.11

Release date: September 2017

diff --git a/Mesh_3/doc/Mesh_3/CGAL/output_c3t3_to_facegraph.h b/Mesh_3/doc/Mesh_3/CGAL/output_c3t3_to_facegraph.h new file mode 100644 index 00000000000..e0bd691ba72 --- /dev/null +++ b/Mesh_3/doc/Mesh_3/CGAL/output_c3t3_to_facegraph.h @@ -0,0 +1,16 @@ +namespace CGAL { +//! \ingroup PkgMesh_3Functions +//! +//! Gets reconstructed surface out of a `MeshComplexWithFeatures_3InTriangulation_3` object. +//! +//! This variant exports the surface as a `FaceGraph` and appends it to `graph`, using +//! `orient_polygon_soup()`. +//! +//! @tparam C3T3 model of the `MeshComplexWithFeatures_3InTriangulation_3` concept. +//! @tparam FaceGraph a model of `FaceGraph`. +//! +//! @param c3t3 an instance of a `C3T3`. +//! @param graph an instance of `FaceGraph`. +template +void output_c3t3_to_facegraph(const C3T3& c3t3, FaceGraph& graph); +} diff --git a/Mesh_3/doc/Mesh_3/Mesh_3.txt b/Mesh_3/doc/Mesh_3/Mesh_3.txt index 715fc6b0321..d1a12a0168f 100644 --- a/Mesh_3/doc/Mesh_3/Mesh_3.txt +++ b/Mesh_3/doc/Mesh_3/Mesh_3.txt @@ -136,6 +136,12 @@ The resulting mesh is output as a subcomplex of a 3D Delaunay triangulation, in a class providing various iterators on mesh elements. +\subsection Mesh_3OutputFaceGraph Output FaceGraph + +This \cgal component also provides a function to convert the reconstructed mesh to a `FaceGraph`: + +- `output_c3t3_to_facegraph()` + The 3D triangulation provides approximations of the subdomains, surface patches and curve segments and corners, according to the restricted diff --git a/Mesh_3/doc/Mesh_3/PackageDescription.txt b/Mesh_3/doc/Mesh_3/PackageDescription.txt index 6abeaf6f52d..2a01e9991ae 100644 --- a/Mesh_3/doc/Mesh_3/PackageDescription.txt +++ b/Mesh_3/doc/Mesh_3/PackageDescription.txt @@ -113,6 +113,7 @@ and their associated classes: - `CGAL::perturb_mesh_3` - `CGAL::lloyd_optimize_mesh_3` - `CGAL::odt_optimize_mesh_3` +- `CGAL::output_c3t3_to_facegraph()` ## CGAL::parameters Functions ## diff --git a/Mesh_3/doc/Mesh_3/dependencies b/Mesh_3/doc/Mesh_3/dependencies index 24c894587cc..043085d19d1 100644 --- a/Mesh_3/doc/Mesh_3/dependencies +++ b/Mesh_3/doc/Mesh_3/dependencies @@ -10,3 +10,4 @@ TDS_3 Polyhedron Miscellany Mesh_2 +Polygon_mesh_processing diff --git a/Mesh_3/include/CGAL/IO/Complex_3_in_triangulation_3_to_facegraph.h b/Mesh_3/include/CGAL/IO/Complex_3_in_triangulation_3_to_facegraph.h index 316a2fd93cf..8d795015241 100644 --- a/Mesh_3/include/CGAL/IO/Complex_3_in_triangulation_3_to_facegraph.h +++ b/Mesh_3/include/CGAL/IO/Complex_3_in_triangulation_3_to_facegraph.h @@ -1,6 +1,27 @@ +// Copyright (c) 2009-2017 GeometryFactory (France). +// All rights reserved. +// +// 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. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// +// +// Author(s) : Maxime Gimeno + #ifndef CGAL_COMPLEX_3_IN_TRIANGULATION_3_TO_FACEGRAPH_H #define CGAL_COMPLEX_3_IN_TRIANGULATION_3_TO_FACEGRAPH_H + #include #include #include @@ -9,18 +30,20 @@ #include namespace CGAL { -//! Gets reconstructed surface out of a MeshComplexWithFeatures_3InTriangulation_3 object. +//! \ingroup PkgMesh_3Functions //! -//! This variant exports the surface as a FaceGraph and appends it to `graph`, using +//! Gets reconstructed surface out of a `MeshComplexWithFeatures_3InTriangulation_3` object. +//! +//! This variant exports the surface as a `FaceGraph` and appends it to `graph`, using //! `orient_polygon_soup()`. //! -//! @tparam C3T3 model of the MeshComplexWithFeatures_3InTriangulation_3 concept. -//! @tparam FaceGraph a model of FaceGraph. +//! @tparam C3T3 model of the `MeshComplexWithFeatures_3InTriangulation_3` concept. +//! @tparam FaceGraph a model of `FaceGraph`. //! -//! @param C3T3 an instance of a C3T3. -//! @param graph an instance of FaceGraph. +//! @param c3t3 an instance of a `C3T3`. +//! @param graph an instance of `FaceGraph`. template -void c3t3_to_facegraph(const C3T3& c3t3, FaceGraph& graph) //complexity nlogn(number of facets on surface) +void output_c3t3_to_facegraph(const C3T3& c3t3, FaceGraph& graph) //complexity nlogn(number of facets on surface) { typedef typename boost::property_map::type VertexPointMap; typedef typename boost::property_traits::value_type Point_3; @@ -106,8 +129,8 @@ void c3t3_to_facegraph(const C3T3& c3t3, FaceGraph& graph) //complexity nlogn(nu polygons.swap(valid_polygons); - CGAL_assertion(CGAL::Polygon_mesh_processing:: - orient_polygon_soup(points, polygons)); + CGAL::Polygon_mesh_processing:: + orient_polygon_soup(points, polygons); //add vertices typedef typename boost::property_map::type VPMap; diff --git a/Mesh_3/test/Mesh_3/test_c3t3_into_facegraph.cpp b/Mesh_3/test/Mesh_3/test_c3t3_into_facegraph.cpp index 51a082c0d39..d70d6fe0440 100644 --- a/Mesh_3/test/Mesh_3/test_c3t3_into_facegraph.cpp +++ b/Mesh_3/test/Mesh_3/test_c3t3_into_facegraph.cpp @@ -86,7 +86,7 @@ int main (int argc, char** argv){ } CGAL::Polyhedron_3 poly; - CGAL::c3t3_to_facegraph(c3t3, poly); + CGAL::output_c3t3_to_facegraph(c3t3, poly); CGAL_assertion(is_valid(poly)); return EXIT_SUCCESS; diff --git a/Surface_mesher/doc/Surface_mesher/CGAL/IO/output_surface_facets_to_facegraph.h b/Surface_mesher/doc/Surface_mesher/CGAL/IO/output_surface_facets_to_facegraph.h new file mode 100644 index 00000000000..de79b3ed0b4 --- /dev/null +++ b/Surface_mesher/doc/Surface_mesher/CGAL/IO/output_surface_facets_to_facegraph.h @@ -0,0 +1,25 @@ +namespace CGAL { + +/*! +\ingroup PkgSurfaceMesher3FunctionsIO + + Gets reconstructed surface out of a `SurfaceMeshComplex_2InTriangulation_3` object. + + This variant exports the surface as a `FaceGraph` and appends it to `graph`. + It must be manifold. For this purpose, you may call + `make_surface_mesh()` with `Manifold_tag` or + `Manifold_with_boundary_tag` parameter. + + @tparam C2T3 model of the `SurfaceMeshComplex_2InTriangulation_3` concept. + @tparam FaceGraph a model of `FaceGraph`. + + @param c2t3 an instance of a manifold `C2T3`. + @param graph an instance of `FaceGraph`. + +\sa `CGAL::output_surface_facets_to_off()` +*/ +template +void output_surface_facets_to_facegraph(const C2T3& c2t3, FaceGraph& graph); + +} /* namespace CGAL */ + diff --git a/Surface_mesher/doc/Surface_mesher/PackageDescription.txt b/Surface_mesher/doc/Surface_mesher/PackageDescription.txt index 9bc0d7cb8a9..3cb20347b0a 100644 --- a/Surface_mesher/doc/Surface_mesher/PackageDescription.txt +++ b/Surface_mesher/doc/Surface_mesher/PackageDescription.txt @@ -106,6 +106,7 @@ of the output mesh while avoiding an over-refinement of the mesh. ## Function Templates ## - `CGAL::make_surface_mesh()` - `CGAL::output_surface_facets_to_polyhedron()` +- `CGAL::output_surface_facets_to_facegraph()` */ diff --git a/Surface_mesher/doc/Surface_mesher/Surface_mesher.txt b/Surface_mesher/doc/Surface_mesher/Surface_mesher.txt index f67e8fd9150..659c364a6e6 100644 --- a/Surface_mesher/doc/Surface_mesher/Surface_mesher.txt +++ b/Surface_mesher/doc/Surface_mesher/Surface_mesher.txt @@ -291,10 +291,11 @@ guarantees nothing else. \section Surface_mesherOutput Output -This \cgal component also provides functions to write the reconstructed surface mesh to the %Object File Format (OFF) \cgalCite{cgal:p-gmgv16-96} and to convert it to a polyhedron (when it is manifold): +This \cgal component also provides functions to write the reconstructed surface mesh to the %Object File Format (OFF) \cgalCite{cgal:p-gmgv16-96} and to convert it to a `FaceGraph` (when it is manifold): - `output_surface_facets_to_off()` - `output_surface_facets_to_polyhedron()` +- `output_surface_facets_to_facegraph()` \section Surface_mesherUndocumented Undocumented Features Available in Demos diff --git a/Surface_mesher/include/CGAL/IO/output_surface_facets_to_facegraph.h b/Surface_mesher/include/CGAL/IO/output_surface_facets_to_facegraph.h index 06aaa68f441..31cfe26cc61 100644 --- a/Surface_mesher/include/CGAL/IO/output_surface_facets_to_facegraph.h +++ b/Surface_mesher/include/CGAL/IO/output_surface_facets_to_facegraph.h @@ -26,19 +26,27 @@ #include #include -//! Gets reconstructed surface out of a SurfaceMeshComplex_2InTriangulation_3 object. -//! -//! This variant exports the surface as a FaceGraph and appends it to `graph`. -//! It requires the surface to be manifold. For this purpose, -//! you may call make_surface_mesh() with Manifold_tag or Manifold_with_boundary_tag parameter. -//! -//! @tparam C2T3 model of the SurfaceMeshComplex_2InTriangulation_3 concept. -//! @tparam FaceGraph a model of FaceGraph. -//! -//! @param c2t3 an instance of a manifold C2T3. -//! @param graph an instance of FaceGraph. +namespace CGAL{ +/*! +\ingroup PkgSurfaceMesher3FunctionsIO + + Gets reconstructed surface out of a `SurfaceMeshComplex_2InTriangulation_3` object. + + This variant exports the surface as a `FaceGraph` and appends it to `graph`. + It must be manifold. For this purpose, you may call + `make_surface_mesh()` with `Manifold_tag` or + `Manifold_with_boundary_tag` parameter. + + @tparam C2T3 model of the `SurfaceMeshComplex_2InTriangulation_3` concept. + @tparam FaceGraph a model of `FaceGraph`. + + @param c2t3 an instance of a manifold `C2T3`. + @param graph an instance of `FaceGraph`. + +\sa `CGAL::output_surface_facets_to_off()` +*/ template -void c2t3_to_facegraph(const C2T3& c2t3, FaceGraph& graph) +void output_surface_facets_to_facegraph(const C2T3& c2t3, FaceGraph& graph) { typedef typename boost::property_map::type VertexPointMap; typedef typename boost::property_traits::value_type Point_3; @@ -159,4 +167,6 @@ void c2t3_to_facegraph(const C2T3& c2t3, FaceGraph& graph) CGAL_assertion(nb_facets == number_of_facets); } } + +}// end CGAL #endif // CGAL_OUTPUT_SURFACE_FACETS_TO_FACEGRAPH_H diff --git a/Three/doc/Three/PackageDescription.txt b/Three/doc/Three/PackageDescription.txt index 08d85bc3840..3347d8e1677 100644 --- a/Three/doc/Three/PackageDescription.txt +++ b/Three/doc/Three/PackageDescription.txt @@ -30,5 +30,4 @@ - `TextListItem` - `CGAL::Three::Scene_item` - `CGAL::Three::Scene_group_item` - */