\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.11.3 - 3D Mesh Generation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Polyhedral_complex_mesh_domain_3< IGT_, Polyhedron, TriangleAccessor > Class Template Reference

#include <CGAL/Polyhedral_complex_mesh_domain_3.h>

Inherits from

CGAL::Mesh_domain_with_polyline_features_3< MeshDomain_3 >.

Definition

template<class IGT_, class Polyhedron = typename Mesh_polyhedron_3<IGT_>::type, class TriangleAccessor = Triangle_accessor_3<Polyhedron,IGT_>>
class CGAL::Polyhedral_complex_mesh_domain_3< IGT_, Polyhedron, TriangleAccessor >

The class Polyhedral_complex_mesh_domain_3 implements a domain defined by a collection of polyhedral surfaces, forming a complex.

The constraints on the complex are:

  • a polyhedral surface of the complex cannot self-intersect,
  • two polyhedral surfaces of the complex are either disjoint, or share a subset of their border edges.

It is a model of the concept MeshDomainWithFeatures_3. It also provides a member function to automatically detect sharp features and boundaries from the input polyhedral surface(s).

The union of the polyhedral surfaces is a non-manifold surface, called the 2D surface of the domain. It is locally manifold, with or without borders, but at the intersections of polyhedral surfaces.

The complement of the 2D surface is decomposed into:

  • zero, one, or many sub-domains of the mesh domain,
  • plus the exterior of the mesh domain.

If the domain has sub-domains, each one must be the union of one or many connected components of the complement of the 2D surface. The sub-domains have indices, of integral type Subdomain_index, and the exterior of the mesh domain is associated with the subdomain index 0, like for any mesh domain in CGAL.

Each polyhedral surface is oriented, and has two sides. The positive side is union of the positive side of all of its facets, usually named the "exterior" of the surface. The negative side is the other side. The use of Polyhedral_complex_mesh_domain_3 assumes that for each polyhedral surface, the sub-domain indices on both sides are known.

Template Parameters
Polyhedronstands for the type of the input polyhedral surface(s). The only requirements for this type is that the triangles of the surfaces must be accessible through an object of the class TriangleAccessor.
Template Parameters
IGT_stands for a geometric traits class providing the types and functors required to implement the intersection tests and intersection computations for polyhedral boundary surfaces. This parameter has to be instantiated with a model of the concept IntersectionGeometricTraits_3.
TriangleAccessorprovides access to the triangles of the input polyhedral surface. It must be a model of the concept TriangleAccessor_3. It defaults to Triangle_accessor_3<Polyhedron,IGT_>. The type IGT_::Triangle_3 must be identical to the type TriangleAccessor::Triangle_3.
Is Model Of:
MeshDomainWithFeatures_3
See Also
TriangleAccessor_3
IntersectionGeometricTraits_3
CGAL::Triangle_accessor_3<Polyhedron_3<K>,K>
CGAL::make_mesh_3().
CGAL::Mesh_domain_with_polyline_features_3<MeshDomain>
CGAL::Polyhedral_mesh_domain_3<Polyhedron,IGT_,TriangleAccessor>
CGAL::Mesh_polyhedron_3<IGT_>
Examples:
Mesh_3/mesh_polyhedral_complex.cpp.

Public Types

typedef
Mesh_domain_with_polyline_features_3
< Polyhedral_mesh_domain_3
< Polyhedron, IGT_,
TriangleAccessor, Tag_true,
Tag_true > > 
Base
 The base class.
 
typedef Base::FT FT
 Numerical type.
 
typedef Polyhedron Polyhedron_type
 The polyhedron type.
 
- Public Types inherited from CGAL::Mesh_domain_with_polyline_features_3< MeshDomain_3 >
typedef int Corner_index
 Corner_index type.
 
typedef int Curve_segment_index
 Curve_segment_index type.
 

Public Member Functions

template<typename InputPolyhedraIterator , typename InputPairOfSubdomainIndicesIterator >
 Polyhedral_complex_mesh_domain_3 (InputPolyhedraIterator begin, InputPolyhedraIterator end, InputPairOfSubdomainIndicesIterator indices_begin, InputPairOfSubdomainIndicesIterator indices_end)
 Constructor. More...
 
void detect_features (FT angle_bound=FT(60))
 Detects sharp features and boundaries of the polyhedral components of the complex (including potential internal polyhedra), and inserts them as features of the domain. More...
 
void detect_borders ()
 Detects border edges of the polyhedral components of the complex, and inserts them as features of the domain. More...
 
- Public Member Functions inherited from CGAL::Mesh_domain_with_polyline_features_3< MeshDomain_3 >
template<typename... T>
 Mesh_domain_with_polyline_features_3 (T...t)
 Constructor. More...
 
template<typename InputIterator >
void add_features (InputIterator begin, InputIterator beyond)
 Add 1-dimensional features in the domain. More...
 
template<typename InputIterator >
void add_features_and_incidences (InputIterator begin, InputIterator beyond)
 Add 1-dimensional features in the domain with their incidences with 2-dimensional features of the domain. More...
 

Index types

The types are int or types compatible with int.

typedef Base::Corner_index Corner_index
 
typedef Base::Curve_segment_index Curve_segment_index
 
typedef Base::Surface_patch_index Surface_patch_index
 
typedef Base::Subdomain_index Subdomain_index
 

Constructor & Destructor Documentation

template<class IGT_ , class Polyhedron = typename Mesh_polyhedron_3<IGT_>::type, class TriangleAccessor = Triangle_accessor_3<Polyhedron,IGT_>>
template<typename InputPolyhedraIterator , typename InputPairOfSubdomainIndicesIterator >
CGAL::Polyhedral_complex_mesh_domain_3< IGT_, Polyhedron, TriangleAccessor >::Polyhedral_complex_mesh_domain_3 ( InputPolyhedraIterator  begin,
InputPolyhedraIterator  end,
InputPairOfSubdomainIndicesIterator  indices_begin,
InputPairOfSubdomainIndicesIterator  indices_end 
)

Constructor.

Constructs a domain defined by a set of polyhedral surfaces,

describing a polyhedral complex.

Parameters
beginfirst iterator on the input polyhedral surfaces
endpast the end iterator on the input polyhedral surfaces
indices_beginfirst iterator on the pairs of subdomain indices (two subdomain indices per input polyhedral surface), corresponding to the first input polyhedral surface
indices_endpast the end iterator on the pairs of subdomain indices
Template Parameters
InputPolyhedraIteratormodel of InputIterator, holding Polyhedron's
InputPairOfSubdomainIndicesIteratormodel of InputIterator, holding std::pair<Subdomain_index, Subdomain_index>
Precondition
std::distance(begin, end) == std::distance(indices_begin, indices_end)

Member Function Documentation

template<class IGT_ , class Polyhedron = typename Mesh_polyhedron_3<IGT_>::type, class TriangleAccessor = Triangle_accessor_3<Polyhedron,IGT_>>
void CGAL::Polyhedral_complex_mesh_domain_3< IGT_, Polyhedron, TriangleAccessor >::detect_borders ( )

Detects border edges of the polyhedral components of the complex, and inserts them as features of the domain.

This function should be called alone only, and not before or after detect_features().

template<class IGT_ , class Polyhedron = typename Mesh_polyhedron_3<IGT_>::type, class TriangleAccessor = Triangle_accessor_3<Polyhedron,IGT_>>
void CGAL::Polyhedral_complex_mesh_domain_3< IGT_, Polyhedron, TriangleAccessor >::detect_features ( FT  angle_bound = FT(60))

Detects sharp features and boundaries of the polyhedral components of the complex (including potential internal polyhedra), and inserts them as features of the domain.

angle_bound gives the maximum angle (in degrees) between the two normal vectors of adjacent triangles. For an edge of the polyhedron, if the angle between the two normal vectors of its incident facets is bigger than the given bound, then the edge is considered as a feature edge, and inserted as a feature of the domain.