\( \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.14.2 - 3D Mesh Generation
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< Polyhedral_mesh_domain_3< Polyhedron, IGT_, CGAL::Default, int, Tag_true > >.

Definition

template<class IGT_, class Polyhedron = typename Mesh_polyhedron_3<IGT_>::type, class TriangleAccessor = CGAL::Default>
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), model of FaceListGraph.
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.
Is Model Of:
MeshDomainWithFeatures_3
See also
IntersectionGeometricTraits_3
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_, CGAL::Default, int, 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< Polyhedral_mesh_domain_3< Polyhedron, IGT_, CGAL::Default, int, Tag_true > >
typedef Polyhedral_mesh_domain_3< Polyhedron, IGT_, CGAL::Default, int, Tag_true > ::Surface_patch_index Surface_patch_index
 
typedef Polyhedral_mesh_domain_3< Polyhedron, IGT_, CGAL::Default, int, Tag_true > ::Subdomain_index Subdomain_index
 
typedef int Curve_index
 
typedef int Corner_index
 
typedef Mesh_3::internal::Index_generator_with_features< typename Polyhedral_mesh_domain_3< Polyhedron, IGT_, CGAL::Default, int, Tag_true > ::Subdomain_index, Surface_patch_index, Curve_index, Corner_index >::type Index
 
typedef CGAL::Tag_true Has_features
 
typedef Polyhedral_mesh_domain_3< Polyhedron, IGT_, CGAL::Default, int, Tag_true > ::R::FT FT
 

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< Polyhedral_mesh_domain_3< Polyhedron, IGT_, CGAL::Default, int, Tag_true > >
OutputIterator get_corners (OutputIterator out) const
 Implements MeshDomainWithFeatures_3::get_corners(). More...
 
OutputIterator get_curves (OutputIterator out) const
 Implements MeshDomainWithFeatures_3::get_curves(). More...
 
FT curve_segment_length (const Point_3 &p, const Point_3 q, const Curve_index &curve_index, CGAL::Orientation orientation) const
 Implements MeshDomainWithFeatures_3::curve_segment_length().
 
FT curve_length (const Curve_index &curve_index) const
 Implements MeshDomainWithFeatures_3::curve_length().
 
Point_3 construct_point_on_curve (const Point_3 &starting_point, const Curve_index &curve_index, FT distance) const
 Implements MeshDomainWithFeatures_3::construct_point_on_curve().
 
CGAL::Sign distance_sign_along_loop (const Point_3 &p, const Point_3 &q, const Point_3 &r, const Curve_index &index) const
 Implements MeshDomainWithFeatures_3::distance_sign_along_loop().
 
CGAL::Sign distance_sign (const Point_3 &p, const Point_3 &q, const Curve_index &index) const
 Implements MeshDomainWithFeatures_3::distance_sign().
 
bool is_loop (const Curve_index &index) const
 Implements MeshDomainWithFeatures_3::is_loop().
 
bool is_curve_segment_covered (const Curve_index &index, CGAL::Orientation orientation, const Point_3 &c1, const Point_3 &c2, const FT sq_r1, const FT sq_r2) const
 Implements MeshDomainWithFeatures_3::is_curve_segment_covered().
 
Index index_from_surface_patch_index (const Surface_patch_index &index) const
 Returns the index to be stored in a vertex lying on the surface identified by index.
 
Index index_from_subdomain_index (const Subdomain_index &index) const
 Returns the index to be stored in a vertex lying in the subdomain identified by index.
 
Index index_from_curve_index (const Curve_index &index) const
 Returns an Index from a Curve_index
 
Index index_from_corner_index (const Corner_index &index) const
 Returns an Index from a Corner_index
 
Surface_patch_index surface_patch_index (const Index &index) const
 Returns the Surface_patch_index of the surface patch where lies a vertex with dimension 2 and index index.
 
Subdomain_index subdomain_index (const Index &index) const
 Returns the index of the subdomain containing a vertex with dimension 3 and index index.
 
Curve_index curve_index (const Index &index) const
 Returns a Curve_index from an Index
 
Corner_index corner_index (const Index &index) const
 Returns a Corner_index from an Index
 
 Mesh_domain_with_polyline_features_3 ()
 
 Mesh_domain_with_polyline_features_3 (const T1 &o1, typename boost::disable_if< boost::is_same< T1, Self >, CGAL::Tag_false >::type *=0)
 
 Mesh_domain_with_polyline_features_3 (const T1 &o1, const T2 &o2, const T &...o)
 
void add_features (InputIterator first, InputIterator end)
 Add 1-dimensional features in the domain. More...
 
void add_features_and_incidences (InputIterator first, InputIterator end, PolylinePMap polyline_pmap, IncidentPatchesIndicesPMap incident_patches_indices_pmap)
 Add 1-dimensional features (curves) from the range [first, end) in the domain with their incidences with 2-dimensional features (patches) of the domain. More...
 
- Public Member Functions inherited from CGAL::Polyhedral_mesh_domain_3< Polyhedron, IGT_, CGAL::Default, int, Tag_true >
 Polyhedral_mesh_domain_3 (const Polyhedron &bounding_polyhedron)
 Construction from a bouding polyhedral surface which must be closed, and free of intersections. More...
 
 Polyhedral_mesh_domain_3 (const Polyhedron &polyhedron, const Polyhedron &bounding_polyhedron)
 Construction from a polyhedral surface, and a bounding polyhedral surface,. More...
 

Index types

The types are int or types compatible with int.

typedef Base::Corner_index Corner_index
 
typedef Base::Curve_index Curve_index
 
typedef Base::Surface_patch_index Surface_patch_index
 
typedef Base::Subdomain_index Subdomain_index
 

Constructor & Destructor Documentation

◆ Polyhedral_complex_mesh_domain_3()

template<class IGT_ , class Polyhedron = typename Mesh_polyhedron_3<IGT_>::type, class TriangleAccessor = CGAL::Default>
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

◆ detect_borders()

template<class IGT_ , class Polyhedron = typename Mesh_polyhedron_3<IGT_>::type, class TriangleAccessor = CGAL::Default>
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().

◆ detect_features()

template<class IGT_ , class Polyhedron = typename Mesh_polyhedron_3<IGT_>::type, class TriangleAccessor = CGAL::Default>
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.