Add documentation and update changes.html

This commit is contained in:
Maxime Gimeno 2017-07-20 13:45:21 +02:00
parent fa598b70ab
commit d57be1d856
12 changed files with 119 additions and 25 deletions

View File

@ -147,6 +147,18 @@ and <code>src/</code> directories).
<!-- Triangulations and Delaunay Triangulations --> <!-- Triangulations and Delaunay Triangulations -->
<!-- Voronoi Diagrams --> <!-- Voronoi Diagrams -->
<!-- Mesh Generation --> <!-- Mesh Generation -->
<h3>3D Surface Mesh Generation</h3>
<ul>
<li>
Add a function to export c2t3 facets into a facegraph.
</li>
</ul>
<h3>3D Mesh Generation</h3>
<ul>
<li>
Add a function to export c3t3 surface facets into a facegraph.
</li>
</ul>
<!-- Surface Reconstruction --> <!-- Surface Reconstruction -->
<!-- Geometry Processing --> <!-- Geometry Processing -->
<!-- Spatial Searching and Sorting --> <!-- Spatial Searching and Sorting -->
@ -166,7 +178,6 @@ and <code>src/</code> directories).
<!-- end of the div for 4.12 --> <!-- end of the div for 4.12 -->
</div> </div>
<h2 id="release4.11">Release 4.11 </h2> <h2 id="release4.11">Release 4.11 </h2>
<div> <div>
<p>Release date: September 2017 </p> <p>Release date: September 2017 </p>

View File

@ -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<class C3T3, class FaceGraph>
void output_c3t3_to_facegraph(const C3T3& c3t3, FaceGraph& graph);
}

View File

@ -136,6 +136,12 @@ The resulting mesh is output as a subcomplex of a 3D Delaunay triangulation,
in a class providing various iterators in a class providing various iterators
on mesh elements. 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 The 3D triangulation provides approximations of the
subdomains, surface patches and curve segments subdomains, surface patches and curve segments
and corners, according to the restricted and corners, according to the restricted

View File

@ -113,6 +113,7 @@ and their associated classes:
- `CGAL::perturb_mesh_3` - `CGAL::perturb_mesh_3`
- `CGAL::lloyd_optimize_mesh_3` - `CGAL::lloyd_optimize_mesh_3`
- `CGAL::odt_optimize_mesh_3` - `CGAL::odt_optimize_mesh_3`
- `CGAL::output_c3t3_to_facegraph()`
## CGAL::parameters Functions ## ## CGAL::parameters Functions ##

View File

@ -10,3 +10,4 @@ TDS_3
Polyhedron Polyhedron
Miscellany Miscellany
Mesh_2 Mesh_2
Polygon_mesh_processing

View File

@ -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 #ifndef CGAL_COMPLEX_3_IN_TRIANGULATION_3_TO_FACEGRAPH_H
#define CGAL_COMPLEX_3_IN_TRIANGULATION_3_TO_FACEGRAPH_H #define CGAL_COMPLEX_3_IN_TRIANGULATION_3_TO_FACEGRAPH_H
#include <CGAL/license/Mesh_3.h> #include <CGAL/license/Mesh_3.h>
#include <CGAL/boost/graph/Euler_operations.h> #include <CGAL/boost/graph/Euler_operations.h>
#include <CGAL/Polygon_mesh_processing/orient_polygon_soup.h> #include <CGAL/Polygon_mesh_processing/orient_polygon_soup.h>
@ -9,18 +30,20 @@
#include <boost/unordered_set.hpp> #include <boost/unordered_set.hpp>
namespace CGAL { 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()`. //! `orient_polygon_soup()`.
//! //!
//! @tparam C3T3 model of the MeshComplexWithFeatures_3InTriangulation_3 concept. //! @tparam C3T3 model of the `MeshComplexWithFeatures_3InTriangulation_3` concept.
//! @tparam FaceGraph a model of FaceGraph. //! @tparam FaceGraph a model of `FaceGraph`.
//! //!
//! @param C3T3 an instance of a C3T3. //! @param c3t3 an instance of a `C3T3`.
//! @param graph an instance of FaceGraph. //! @param graph an instance of `FaceGraph`.
template<class C3T3, class FaceGraph> template<class C3T3, class FaceGraph>
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<FaceGraph, boost::vertex_point_t>::type VertexPointMap; typedef typename boost::property_map<FaceGraph, boost::vertex_point_t>::type VertexPointMap;
typedef typename boost::property_traits<VertexPointMap>::value_type Point_3; typedef typename boost::property_traits<VertexPointMap>::value_type Point_3;
@ -106,8 +129,8 @@ void c3t3_to_facegraph(const C3T3& c3t3, FaceGraph& graph) //complexity nlogn(nu
polygons.swap(valid_polygons); polygons.swap(valid_polygons);
CGAL_assertion(CGAL::Polygon_mesh_processing:: CGAL::Polygon_mesh_processing::
orient_polygon_soup(points, polygons)); orient_polygon_soup(points, polygons);
//add vertices //add vertices
typedef typename boost::property_map<FaceGraph, boost::vertex_point_t>::type VPMap; typedef typename boost::property_map<FaceGraph, boost::vertex_point_t>::type VPMap;

View File

@ -86,7 +86,7 @@ int main (int argc, char** argv){
} }
CGAL::Polyhedron_3<K> poly; CGAL::Polyhedron_3<K> poly;
CGAL::c3t3_to_facegraph(c3t3, poly); CGAL::output_c3t3_to_facegraph(c3t3, poly);
CGAL_assertion(is_valid(poly)); CGAL_assertion(is_valid(poly));
return EXIT_SUCCESS; return EXIT_SUCCESS;

View File

@ -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<class C2T3, class FaceGraph>
void output_surface_facets_to_facegraph(const C2T3& c2t3, FaceGraph& graph);
} /* namespace CGAL */

View File

@ -106,6 +106,7 @@ of the output mesh while avoiding an over-refinement of the mesh.
## Function Templates ## ## Function Templates ##
- `CGAL::make_surface_mesh()` - `CGAL::make_surface_mesh()`
- `CGAL::output_surface_facets_to_polyhedron()` - `CGAL::output_surface_facets_to_polyhedron()`
- `CGAL::output_surface_facets_to_facegraph()`
*/ */

View File

@ -291,10 +291,11 @@ guarantees nothing else.
\section Surface_mesherOutput Output \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_off()`
- `output_surface_facets_to_polyhedron()` - `output_surface_facets_to_polyhedron()`
- `output_surface_facets_to_facegraph()`
\section Surface_mesherUndocumented Undocumented Features Available in Demos \section Surface_mesherUndocumented Undocumented Features Available in Demos

View File

@ -26,19 +26,27 @@
#include <CGAL/boost/graph/Euler_operations.h> #include <CGAL/boost/graph/Euler_operations.h>
#include <map> #include <map>
//! Gets reconstructed surface out of a SurfaceMeshComplex_2InTriangulation_3 object. namespace CGAL{
//! /*!
//! This variant exports the surface as a FaceGraph and appends it to `graph`. \ingroup PkgSurfaceMesher3FunctionsIO
//! 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. Gets reconstructed surface out of a `SurfaceMeshComplex_2InTriangulation_3` object.
//!
//! @tparam C2T3 model of the SurfaceMeshComplex_2InTriangulation_3 concept. This variant exports the surface as a `FaceGraph` and appends it to `graph`.
//! @tparam FaceGraph a model of FaceGraph. It must be manifold. For this purpose, you may call
//! `make_surface_mesh()` with `Manifold_tag` or
//! @param c2t3 an instance of a manifold C2T3. `Manifold_with_boundary_tag` parameter.
//! @param graph an instance of FaceGraph.
@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<class C2T3, class FaceGraph> template<class C2T3, class FaceGraph>
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<FaceGraph, boost::vertex_point_t>::type VertexPointMap; typedef typename boost::property_map<FaceGraph, boost::vertex_point_t>::type VertexPointMap;
typedef typename boost::property_traits<VertexPointMap>::value_type Point_3; typedef typename boost::property_traits<VertexPointMap>::value_type Point_3;
@ -159,4 +167,6 @@ void c2t3_to_facegraph(const C2T3& c2t3, FaceGraph& graph)
CGAL_assertion(nb_facets == number_of_facets); CGAL_assertion(nb_facets == number_of_facets);
} }
} }
}// end CGAL
#endif // CGAL_OUTPUT_SURFACE_FACETS_TO_FACEGRAPH_H #endif // CGAL_OUTPUT_SURFACE_FACETS_TO_FACEGRAPH_H

View File

@ -30,5 +30,4 @@
- `TextListItem` - `TextListItem`
- `CGAL::Three::Scene_item` - `CGAL::Three::Scene_item`
- `CGAL::Three::Scene_group_item` - `CGAL::Three::Scene_group_item`
*/ */