CGAL 6.1 - 3D Constrained Triangulations
Loading...
Searching...
No Matches
Free Functions for Creating Conforming Constrained Delaunay Triangulations

Free Functions Template for Creating Conforming Constrained Delaunay Triangulations

The following functions create a 3D conforming constrained Delaunay triangulation from either a polygon soup or a polygon mesh.

Input Data

The input data (polygon mesh or polygon soup) represents the polygonal constraints enforced during the triangulation process.

By default, each face of the input is considered a polygonal constraint for the triangulation. The named parameter plc_face_id can be used to describe larger polygonal constraints, possibly with holes. If used, this parameter must be a property map that associates each face of the input with a PLC face identifier. Faces with the same face identifier are considered part of the same surface patch. Each of these surface patches (defined as the union of the input faces with a given patch identifier) is expected to be a polygon or a polygon with holes, with coplanar vertices (or nearly coplanar up to the precision of the number type used).

The generated triangulation will conform to the faces of the input, or to the surface patches described by the plc_face_id property map if provided.

In the case where the input contains a non-planar PLC face, building the triangulation may fail with an exception of type CGAL::Non_planar_plc_facet_exception.

Precondition
The input data must not be coplanar.
The input data must not have self-intersections.

Template Parameters

For both function templates, the template arguments can be deduced from the function arguments, or defaulted.

Returned Triangulation Type

For both functions, the template parameter Triangulation defines the type of the triangulation that is created and returned by the function.

In both cases, the traits class Traits must fulfill the following requirements:

Functions

template<typename Triangulation = CGAL::Default, typename PolygonMesh , typename NamedParameters = CGAL::parameters::Default_named_parameters>
auto CGAL::make_conforming_constrained_Delaunay_triangulation_3 (const PolygonMesh &mesh, const NamedParameters &np=parameters::default_values())
 creates a 3D constrained Delaunay triangulation conforming to the faces of a polygon mesh.
 
template<typename Triangulation = CGAL::Default, typename PointRange , typename PolygonRange , typename NamedParameters = parameters::Default_named_parameters>
auto CGAL::make_conforming_constrained_Delaunay_triangulation_3 (const PointRange &points, const PolygonRange &polygons, const NamedParameters &np=parameters::default_values())
 creates a 3D constrained Delaunay triangulation conforming to the faces of a polygon soup.
 

Function Documentation

◆ make_conforming_constrained_Delaunay_triangulation_3() [1/2]

template<typename Triangulation = CGAL::Default, typename PointRange , typename PolygonRange , typename NamedParameters = parameters::Default_named_parameters>
auto CGAL::make_conforming_constrained_Delaunay_triangulation_3 ( const PointRange &  points,
const PolygonRange &  polygons,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/make_conforming_constrained_Delaunay_triangulation_3.h>

creates a 3D constrained Delaunay triangulation conforming to the faces of a polygon soup.

Template Parameters
PointRangea model of the concept RandomAccessContainer whose value type is the point type of the polygon soup
PolygonRangea model of the concept RandomAccessContainer whose value type is a model of the concept RandomAccessContainer whose value type is std::size_t
Triangulationan instance of the CGAL::Conforming_constrained_Delaunay_triangulation_3 class template, or CGAL::Default
NamedParametersa sequence of Named Parameters
Parameters
pointsa range of points representing the vertices of the polygon soup
polygonsa range of ranges of indices representing the faces of the polygon soup
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • a property map associating points to the elements of the range points
  • Type: a model of ReadablePropertyMap whose key type is the value type of PointRange, and value type is convertible to the point type of the geometric traits class
  • Default: CGAL::Identity_property_map

  • a property map associating a patch identifier to each facet of soup. Each identifier corresponds to a planar surface patch. Each surface patch can be composed of several faces of soup, forming a planar polygon.
  • Type: a class model of ReadablePropertyMap with std::size_t as key type and with any value type that is a regular type (model of Regular)
  • Extra: If this parameter is omitted, each facet of the polygon soup is considered a separate PLC face.
  • Extra: Otherwise facets with the same patch identifier are considered part of the same PLC face.

  • an instance of a geometric traits class
  • Type: Traits as defined above in the section Returned Triangulation Type
  • Default: the default constructed traits object Traits{}

Returns
a 3D constrained Delaunay triangulation conforming to the faces of the polygon soup, of a type described in the section Returned Triangulation Type above.
Precondition
The polygon soup must be free of self-intersections. If the polygon soup is a triangle soup, this is equivalent to: CGAL::Polygon_mesh_processing::does_triangle_soup_self_intersect(points, polygons, np) == false .

◆ make_conforming_constrained_Delaunay_triangulation_3() [2/2]

template<typename Triangulation = CGAL::Default, typename PolygonMesh , typename NamedParameters = CGAL::parameters::Default_named_parameters>
auto CGAL::make_conforming_constrained_Delaunay_triangulation_3 ( const PolygonMesh &  mesh,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/make_conforming_constrained_Delaunay_triangulation_3.h>

creates a 3D constrained Delaunay triangulation conforming to the faces of a polygon mesh.

Template Parameters
PolygonMesha model of FaceListGraph
Triangulationan instance of the CGAL::Conforming_constrained_Delaunay_triangulation_3 class template, or CGAL::Default
NamedParametersa sequence of Named Parameters
Parameters
meshthe polygon mesh representing the constraints
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • a property map associating points to the vertices of mesh
  • Type: a class model of ReadWritePropertyMap with boost::graph_traits<PolygonMesh>::vertex_descriptor as key type and Traits::Point_3 as value type
  • Default: boost::get(CGAL::vertex_point, mesh)
  • Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in PolygonMesh.

  • a property map associating a patch identifier to each facet of mesh. Each identifier corresponds to a planar surface patch. Each surface patch can be composed of several facets of mesh, forming a planar polygon.
  • Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::face_descriptor as key type and with any value type that is a regular type (model of Regular)
  • Extra: If this parameter is omitted, each facet of mesh is considered a separate PLC face. Faces of mesh with the same patch identifier are considered part of the same PLC face.

  • an instance of a geometric traits class
  • Type: Traits as defined above in the section Returned Triangulation Type
  • Default: the default constructed traits object Traits{}
Returns
a 3D constrained Delaunay triangulation conforming to the faces of the polygon mesh, of a type described in the section Returned Triangulation Type above.
Precondition
mesh must not have self-intersections. For triangulated surfaces, it can be checked using the function CGAL::Polygon_mesh_processing::does_self_intersect(mesh, np) == false
Examples
Constrained_triangulation_3/ccdt_3_after_autorefinement.cpp, Constrained_triangulation_3/ccdt_3_check_preconditions.cpp, Constrained_triangulation_3/ccdt_3_fimap_region_growing.cpp, Constrained_triangulation_3/ccdt_3_from_soup.cpp, Constrained_triangulation_3/ccdt_3_from_soup_fimap.cpp, Constrained_triangulation_3/ccdt_3_preprocessing.cpp, Constrained_triangulation_3/conforming_constrained_Delaunay_triangulation_3.cpp, and Constrained_triangulation_3/conforming_constrained_Delaunay_triangulation_3_fimap.cpp.