updated doc

This commit is contained in:
Laurent Rineau 2003-11-05 09:03:14 +00:00
parent 552176e91e
commit 2a3fa754a5
23 changed files with 535 additions and 370 deletions

View File

@ -1,11 +1,8 @@
\chapter{2D conforming triangulations and meshes}
\chapter{2D conforming triangulations\\ and meshes}
\label{user_chapter_2D_Meshes}
\minitoc
\section{Introduction}
\label{sec:Mesh_2_introduction}
This package implements Shewchuk's algorithm to construct conforming
triangulations and 2D meshes.
@ -47,118 +44,146 @@ A constrained Delaunay triangulation is said to be a \emph{conforming
Delaunay triangulation} if every constrained edge is a Delaunay
edge, that is appears in the Delaunay triangulation of the set of
vertices. Thus a conforming Delaunay triangulation is a Delaunay
triangulation where some edges are marked as constrained edges.
triangulation, where some edges are marked as constrained edges.
A constrained Delaunay triangulation is said to be a \emph{conforming
Gabriel triangulation} if every constrained edge is a Gabriel edge,
meaning that its diametral circle includes no vertex of the
triangulation in its interior. Observe that each Gabriel edge is a
Delaunay edge, and then conforming Gabriel triangulations are
conforming Delaunay triangulations.
triangulation in its interior. The Gabriel property is stronger that
the Delaunay property and each Gabriel edge is a Delaunay edge. Thus
conforming Gabriel triangulations are conforming Delaunay
triangulations.
Any contrained Delaunay triangulation can be refined into a conforming
Delaunay or conforming Gabriel triangulation by adding vertices,
called \emph{Steiner vertices}, on constrained edges until they are
cut into subconstraints small enough to be Delaunay or Gabriel edges.
\subsection{Building conforming triangulations}
\label{sec:Mesh_2_building_conforming}
Conforming triangulations can be obtained by two global functions:
\ccc{template<class CDT> void make_conforming_Delaunay_2 (CDT& t)} and
\ccc{template<class CDT> void make_conforming_Gabriel_2 (CDT& t)}. The
template parameter \ccc{CDT} must be a \cgal\ constrained triangulation. It
can be for example a \ccc{Contrained_triangulation_2}, or a
\ccc{Constrained_triangulation_plus_2} or a \ccc{Triangulation_hierarchy_2}
templated by a constrained triangulation.
template parameter \ccc{CDT} must be instanciated by a
\ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}, or a
\ccc{Constrained_triangulation_plus_2<CDT2>} or a
\ccc{Triangulation_hierarchy_2<CDT2>} where \ccc{CDT2} is a
\ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}. In order to test
the Delaunay or the Gabriel property, and to construct Steiner points,
the geometric traits class of \ccc{CDT} has to be a model of
\ccc{ConformingDelaunayTriangulationTraits_2}. It can be, for example,
any \cgal\ kernel.
The triangulation \ccc{t} is passed by reference and is made conforming
Delaunay or Gabriel by modifying it. If you want to keep the original
triangulation, please make a copy of it.
In other to test the Delaunay or the Gabriel property, and to construct
Steiner points, the geometric traits class of \ccc{CDT} has to be a model of
\ccc{ConformingDelaunayTriangulationTraits_2}. It can be, for example, any
\cgal\ kernel.
The constrained Delaunay triangulation \ccc{t} is passed by reference
and is made conforming Delaunay or conforming Gabriel by adding
vertices, that is the triangulation is modified. If you want to keep
the original triangulation, please make a copy of it.
\subsection{Example: making a triangulation conforming Delaunay and then
conforming Gabriel}
\label{sec:Mesh_2_example_making_conforming}
This example inserts several segments in a contrained triangulation, mades
it conforming Delaunay, and then conforming Gabriel. At each step, the
number of points is printed.
This example inserts several segments in a constrained Delaunay
triangulation, makes it conforming Delaunay, and then conforming
Gabriel. At each step, the number of vertices of the triangulation is
printed.
\ccIncludeExampleCode{Mesh_2/conform.C}
\section{Quality meshes}
\section{Meshes}
\label{sec:Mesh_2_meshes}
Quality meshes can be obtained by a global function \ccc{template<class CDT>
void refine_Delaunay_mesh_2 (CDT &t, typename CDT::Geom_traits gt)}. It can
also be obtained by using the class \ccc{Delaunay_mesh_2<CDT>}. In both
cases, the template parameter \ccc{CDT} has to be a \cgal\ constrained
triangulation. The class \ccc{Delaunay_mesh_2<CDT>} derives from \ccc{CDT}
and has several member functions to define the domain
(see~\ref{sec:Mesh_2_domains}) and mesh it.
\subsection{Geometric traits class}
\label{sec:Mesh_2_geomtraits}
\subsection{Definition}
\label{sec:Mesh_2_meshes_definition}
The geometric traits class of the template parameter \ccc{CDT} should not
only provide geometric objects and predicates for the triangulation, as
usual, but also define the geometric constraints that the triangles have to
satisfy. That is why it has to be a model of
\ccc{DelaunayMeshTraits_2}.
A mesh is a partition of a given domain into simplices, whose shapes
and sizes satisfy several criterias.
\subsection{Domains}
\label{sec:Mesh_2_domains}
Domains that can be meshed are \emph{planar straight line graphes}
(PSLG), which are sets of of vertices and segments such that all
endpoints of every segments are in the set and that segments intersect
only at end-points. Such a domain can represented by a \cgal\
constrained triangulation, whose constrained segment are the segments
Domains are unions of connected component of \emph{planar straight
line graphes} (PSLG), which are sets of vertices and segments such
that all endpoints of every segments are in the set and that segments
intersect only at end-points. PSLG can represented by a \cgal\
constrained triangulation, whose constrained segments are the segments
of the domain.
By default, the domain to be meshed is the whole plane but the connected
component of the infinite vertex. If the constrained triangulation is not
bounded by a polyline of constrained segments, this domain can be empty and
the algorithm will not do anything.
By default, the domain to be meshed is the whole plane but the
connected component of the infinite vertex. If the domain is not
bounded by a polyline of constrained segments, this domain can be
empty and the meshing algorithm will not do anything.
However, if the class \ccc{Delaunay_mesh_2<CDT>} is used, the domain to be
meshed can be defined more precisely, by setting \ccc{seeds}. Seeds are
a set of points, that are not in the set of points of the
triangulation. The member function \ccc{template<class InputIterator> void
set_seeds(InputIterator b, InputIterator e, bool mark = false)} sets a
list of seeds and a boolean marker. This marker tells if the seeds are in
the domain or not, and the connected component of each seed is marked the
same way. Anyway, the connected component of the infinite vertex is always
marked as the exterior of the domain.
However, one can define more precisely which connected components of
the PSLG are in the domain by setting \ccc{seeds}. Seeds are a set of
points, that are not in the set of vertices of the triangulation. A
boolean marker tells if the seeds are in the domain or not, and the
connected component of each seed is marked the same way. Anyway, the
(infinite) connected component of the infinite vertex is always marked
as the exterior of the domain. By default, the set of seeds is empty,
and the domain is the union of all finite connected components of the
PSLG.
\subsection{Shape and size criteria}
\label{sec:Mesh_2_criteria}
The shape criteria on triangles should be that the circumradius is
lower than a bound $B$ times the shortest edge of the triangle. This is
equivalent to say that the minimum angle of the triangle is greater
lower than a bound $B$ times the shortest edge of the triangle. This
is equivalent to say that the minimum angle of the triangle is greater
than $\arcsin{\frac{1}{2B}}$. If not angles are smaller than $\theta$,
then no angles are greater than $\pi - \theta$. Unfortunalty, the
algorithm will terminate at all time only if $B \ge \sqrt{2}$. This
package cannot, for the moment, insure that angles of meshes are
greater than $20.7$~degres. The size criteria can be any criteria
that tends to prefere small triangles. Both types of criterias are
defined in a nested type \ccc{Is_bad} of the geometric traits class.
terminaison of the algorithm is guaranted only if $B \ge \sqrt{2}$.
This package cannot, for the moment, insure that angles of meshes are
greater than $20.7$~degrees. The size criteria can be any criteria that
tends to prefere small triangles. Both types of criterias are defined
in a nested type \ccc{Is_bad} of the geometric traits class.
\subsection{Garanties on the resulting mesh}
If all angles between contrained segments of the initial triangulation
are greater than $60$~degrees, the criterias on angles and size are
garanted to be fulfilled. If some input incident segments forme an
angle smaller than $60$~degrees, these segments formed a
\textit{cluster}. Near clusters, the algorithm cannot garanty the
shape criterias. Of course small angles formed by input segments
cannot be suppressed. What is more, if the domain is not a polygonal
region, and includes angles smaller than $60$~degrees,
\cite{s-mgdsa-00} has prooved that one cannot compute a triangular
mesh the domain without inserting even smaller angles in the mesh.
If all angles between contrained segments of the initial triangulation are
greater than $60$~degres, the criterias on angles and size are garanted to
be fulfilled.
See~\cite{s-mgdsa-00} for details.
If some input incident segments forme an angle smaller than $60$~degres,
these segments formed a \textit{cluster}. Near clusters, the algorithm
cannot garanty the shape criterias. See~\cite{s-mgdsa-00} for details.
\subsection{Building meshes}
\label{sec:Mesh_2_building_meshes}
In this package, meshes are constrained Delaunay triangulation whose
triangles satify shape and size criteria. They can be obtained from
constrained Delaunay triangulation by called the global function
\ccc{template<class CDT> void refine_Delaunay_mesh_2 (CDT &t, typename
CDT::Geom_traits gt)}. They can also be obtained by using the class
\ccc{Delaunay_mesh_2<CDT>} that derives from \ccc{CDT}. In both cases,
the template parameter \ccc{CDT} has to be instanciated by
\ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}, or a
\ccc{Constrained_triangulation_plus_2<CDT2>} or a
\ccc{Triangulation_hierarchy_2<CDT2>} where \ccc{CDT2} is a
\ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}.
The geometric traits class of the instance of \ccc{CDT} should define
the geometric criteria that the triangles have to satisfy. That is why
it has to be a model of \ccc{DelaunayMeshTraits_2}. The latter concept
has two models provided by this package:
\begin{itemize}
\item \ccc{Delaunay_mesh_traits_2<K>} defines a shape criteria that
bounds the minimum angle of triangles.
\item \ccc{Delaunay_mesh_size_traits<K>} adds to the previous one a
bound on the maximum edge lenght.
\item \todo{J'ai volontairement oubli\'e des mod\`eles.}
\end{itemize}
The class \ccc{Delaunay_mesh_2<CDT>} derives from \ccc{CDT} and has
several member functions to define the domain and mesh it. See example
and the reference manual for details. If, after a call to one of the
meshing function, one inserts vertices of constrained edges, the
triangulation is no longer guaranted to be meshed and the meshing
function should be called again.
\subsection{Example using the global function and shape and size default
criterias}
@ -180,6 +205,10 @@ algorithm are calculated twice.
\ccIncludeExampleCode{Mesh_2/mesh_class.C}
\todo{Exemple avec seeds.}
\todo{Exemple avec la fonction globale.}
%%% For emacs/AucTeX:
%%% Local Variables: ***
%%% mode:latex ***

View File

@ -15,7 +15,9 @@ edges.
\ccTypes
\ccNestedType{FT}{The field type.}
\ccNestedType{FT}{The field type. It must be a model of the
\ccc{SqrtFieldNumberType}, meaning it must be a number type
supporting the operation $+$, $-$, $*$, $/$, and $\sqrt{\cdot}$.}
\ccNestedType{Vector_2}{The vector type.}
\ccNestedType{Construct_vector_2}{Constructor object. Must
provide the operator \ccc{Vector_2 operator()(Point a, Point b)}

View File

@ -1,15 +1,15 @@
\begin{ccRefConcept}{ConformingGabrielTriangulationTraits_2}
\ccDefinition
In addition of the requirements of the concept
\ccc{ConformingDelaunayTriangulationTraits}, a model of the concept
\ccRefName\ has to provide a predicate on angles \ccc{Angle_2}.
\ccRefines
\ccc{ConformingDelaunayTriangulationTraits_2}
\ccDefinition
In addition of the requirements of the concept
\ccc{ConformingDelaunayTriangulationTraits_2}, a model of the concept
\ccRefName\ has to provide a predicate on angles \ccc{Angle_2}.
\ccTypes
\ccNestedType{Angle_2}{Predicate object. Must provide the operator

View File

@ -1,30 +1,44 @@
\begin{ccRefClass}{Conforming_Delaunay_triangulation_2<CDT>}
The class \ccRefName{} is an auxiliary base class of
\ccc{Delaunay_mesh_2<CDT>}. It permits to make a constrained Delaunay
triangulation conforming to the Delaunay or Gabriel criteria. For average
uses, consider using the global fonctions \ccc{make_conforming_Gabriel_2}
and \ccc{make_conforming_Delaunay_2} defined in the same header.
\ccc{Delaunay_mesh_2<CDT>}. It permits to refine a constrained
Delaunay triangulation into a conforming Delaunay or conforming
Gabriel triangulation. For standard needs, consider using the global
fonctions \ccc{make_conforming_Gabriel_2} and
\ccc{make_conforming_Delaunay_2} defined in the same header.
The template parameter \ccc{CDT}, from which this class derives, has to be
a \cgal\ constrained Delaunay triangulation, and it geometric traits class
of has to be a model of the concept
\ccc{ConformingDelaunayTriangulationTraits_2} or
\ccc{ConformingGabrielTriangulationTraits}. This traits class provides
constructors and predicates needed by the conforming algorithm.
\ccParameters
A \ccRefName{} object is a constrained Delaunay triangulation, in which one
can insert points and constrained segments and apply very \ccc{CDT}'s
availlable operations. After a call to one of the conforming methods, the
constrained edges of the CDT are guaranteed to be conforming to the
Delaunay or the Gabriel criteria (which depends from the conforming method
called). If one inserts points or constrained segments in the \ccRefName{}
object after that, the edges are no longer guaranteed to be conform.
The template parameter \ccc{CDT} has to be instantiated by a
\ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}, or a
\ccc{Constrained_triangulation_plus_2<CDT2>} or a
\ccc{Triangulation_hierarchy_2<CDT2>} where \ccc{CDT2} is a
\ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}. The geometric
traits class of the instance of \ccc{CDT} has to be a model of the
concept \ccc{ConformingGabrielTriangulationTraits_2}. This traits class
provides constructors and predicates needed by the conforming
algorithm.
The conforming methods insert points into constrained edges, splitting them
into sub-constraints. You can have access to inserted constraints if you
use \ccc{CGAL::Constrained_triangulation_plus_2<CDT>} as template
parameter.
Every methods of this class (but \ccc{clear()}) exists in two
versions: one suffixed by \ccc{_Delaunay} and one suffixed by
\ccc{_Gabriel}. If only \emph{Delaunay} methods are called, the
geometric traits class of the instance of \ccc{CDT} can be a model of
\ccc{ConformingDelaunayTriangulationTraits_2}, which is a lighter
requirement than the \ccc{ConformingGabrielTriangulationTraits_2}.
\ccHeading{Using this class}
A call to the method \ccc{make_conforming_Delaunay()}
(resp. \ccc{make_conforming_Gabriel()}) will refine the contrained
Delaunay triangulation into a conforming Delaunay (resp. conforming
Gabriel) triangulation. After that, if one inserts vertices of
contrained edges, the triangulation is no longer guaranted to be
conforming, until next call to a conforming method.
The conforming methods insert points into constrained edges, splitting
them into sub-constraints. You can have access to initial inserted
constraints if you instantiate the template parameter by a
\ccc{CGAL::Constrained_triangulation_plus_2<CDT>}.
\ccInclude{CGAL/Conforming_Delaunay_triangulation_2.h}
@ -55,21 +69,21 @@ parameter.
\ccHeading{Conforming methods}
\ccMethod{ void make_conforming_Delaunay(); }
{ Conforms the constrained edges regarding the Delaunay criteria.
{ Refines the triangulation into a conforming Delaunay triangulation.
After a call to this method, all triangles fulfill the empty circle
property. }
\ccMethod{ void make_conforming_Gabriel(); }
{ Conforms the constrained edges regarding the Gabriel criteria. After
a call to this method, all constrained edges $e$ have the
{ Refines the triangulation into a conforming Gabriel triangulation.
After a call to this method, all constrained edges $e$ have the
\emph{Gabriel property}: the circle that have $e$ as diameter
doesn't contain any vertex of the triangulation. }
does not contain any vertex of the triangulation. }
\ccHeading{Checking}
The following methods verify that the constrained triangulation is
conforming to the Delaunay or the Gabriel criteria. These methods scan
the whole triangulation and their complexity is proportional to the
number of edges.
conforming Delaunay or conforming Gabriel. These methods scan the
whole triangulation and their complexity is proportional to the number
of edges.
\ccMethod{ bool is_conforming_Delaunay(); }
{ Returns \ccc{true} iff all triangles fulfill the Delaunay property.}
@ -83,26 +97,26 @@ number of edges.
\ccHeading{Step by step operations}
The \ccRefName{} class allows, for debugging or demos, to play the
conforming algorithm step by step, using the following methods. They exist
in two version, depending whether you want the triangulation to be
conforming Delaunay or conforming Gabriel. Any call to a
\ccc{step_by_step_conforming_XX} function requires that the last call of
\ccc{init_XX} was with the same criteria.
conforming algorithm step by step, using the following methods. They
exist in two versions, depending whether you want the triangulation to
be conforming Delaunay or conforming Gabriel. Any call to a
\ccc{step_by_step_conforming_XX} function requires a previous call to
the corresponding of \ccc{init_XX}.
\ccMethod{ void init_Delaunay(); }
{ The method must be called after all points and constrained
segments are inserted and before any call to the following
methods. If some points or segments are then inserted
in the triangulation, this method must be called again. }
{ The method must be called after all points and constrained segments
are inserted and before any call to the following methods. If some
points or segments are then inserted in the triangulation, this
method must be called again. }
\ccMethod{ bool step_by_step_conforming_Delaunay (); }
{ Applies one step of the algorithm. At one step of the algorithm,
only one point is inserted. However, the algorithm
sometimes doesn't insert a point at a step. Anyway,
internal datas of the \ccRefName{} object are modified at
each step, until \ccc{c.is_conforming_done()}. If
\ccc{c.is_conforming_done()}, returns \ccc{false}. If not (when
the algorithm is not done), returns \ccc{true}.}
\ccMethod{ bool step_by_step_conforming_Delaunay (); }
{ Applies one step of the algorithm. At one step of the algorithm,
only one point is inserted. However, the algorithm sometimes doesn't
insert a point at a step. Anyway, internal datas of the \ccRefName{}
object are modified at each step, until \ccc{c.is_conforming_done()}
returns \ccc{true}. If \ccc{c.is_conforming_done()}, returns
\ccc{false}. If not (when the algorithm is not done), returns
\ccc{true}.}
\ccMethod{ void init_Gabriel(); }{}
\ccGlue

View File

@ -1,29 +1,30 @@
\begin{ccRefConcept}{DelaunayMeshTraits_2}
\ccRefines
\ccc{ConformingGabrielTriangulationTraits_2}
\ccDefinition
In addition of the requirements of the concept
\ccc{ConformingGabrielTriangulationTraits_2}, a model of the concept
\ccRefName{} has to provide a type \ccc{Quality} that represents the
quality of a triangle, and a predicate \ccc{Is_bad}. \ccc{Is_bad} defines
mesh criteria on triangles and computes the quality of the triangle passed
as argument. The type \ccc{Quality} must be \emph{comparable} as the
meshing algorithm will order bad triangles by quality, to split those with
smallest quality first.
\ccRefines
\ccc{ConformingGabrielTriangulationTraits}
\ccRefName{} has to provide a type \ccc{Quality} that represents a
measure of the quality of a triangle, and a predicate \ccc{Is_bad}.
\ccc{Is_bad} defines mesh criteria on triangles and computes the
quality of the triangle passed as argument. The type \ccc{Quality}
must be \emph{comparable} as the meshing algorithm will order bad
triangles by quality, to split those with smallest quality first.
\ccTypes
\ccNestedType{Quality}{Copy constructible, assignable, and comparable type.}
\ccNestedType{Is_bad} {Predicate object. Must provide the operator
\ccc{bool operator()(Point_2 a, Point_2 b, Point_2 c, Quality& q)} thats
returns \ccc{true} iff the triangle formed by the three points $a$,
$b$, $c$ satisfies the wanted criteria for mesh triangles. A value
mesuring the quality of the triangle must be assigned to $q$.}
\ccc{bool operator()(Point_2 a, Point_2 b, Point_2 c, Quality& q)}
thats assigns to \ccc{q} a value measuring the quality of the
triangle and returns \ccc{true} iff the triangle formed by the three
points $a$, $b$, $c$ satisfies the wanted criteria for mesh
triangles.}
\ccCreationVariable{traits}

View File

@ -6,12 +6,12 @@ The class \ccRefName{} derives from
geometric traits class must be a model of the concept
\ccc{DelaunayMeshTraits_2}. This traits class provides not only
constructors and predicates needed by the mesh algorithm, but also defines
the geometric constraints on the triangles of the mesh.
the shape and size criteria on the triangles of the mesh.
A \ccRefName{} object is a \ccc{CDT} CDT, in which one can insert points
and constrained segments and every \ccc{CDT}'s availlable operations. After
a call to one of meshing methods, the CDT is meshed according to the
geometric constraints defined in the traits class.
criteria defined in the traits class.
Before the first call to a meshing method, one can insert points and
constrained segments in the \ccRefName{} object, like in a CDT. Meshing
@ -22,8 +22,11 @@ triangulation \ccc{CDT} has to be a model of the concept
\ccc{MeshFaceBase_2}.
Once a meshing method is called, the CDT is meshed according to
contraints. If points or constrained segments are inserted again in
the CDT, the criterias on shape or size are no longer garanted.
criteria on shape and size defined in the traits. If points or
constrained segments are inserted again in the CDT, the criterias are
no longer garanted.
\todo{Je dois copier-coller la d\'efinition des domaines, et des crit\`eres?}
\ccInclude{CGAL/Delaunay_mesh_2.h}
@ -39,7 +42,7 @@ the CDT, the criterias on shape or size are no longer garanted.
\ccTypedef{typedef CDT Triangulation;}{the triangulation base class.}
\ccTypedef{typedef CDT::Geom_traits Geom_traits;}{the geometric traits class.}
\ccTypedef{typedef Conforming_Delaunay_triangulation_2<CDT> Conform;}{the
conform triangulation base class.}
conforming triangulation base class.}
\ccNestedType{Seeds_iterator}{const iterator over defined seeds. Its
value type is \ccc{Geom_traits::Point_2}}
@ -57,16 +60,16 @@ the CDT, the criterias on shape or size are no longer garanted.
The following functions are used to define seeds.
\ccMethod{void clear_seeds ();}{ Sets seeds to the empty set. Faces
that will be refined are all faces that are not connected to the
infinite vertex.}
\ccMethod{void clear_seeds ();}{ Sets seeds to the empty set. All
finite connected components of the constrained triangulation will be
refined.}
\ccMethod{template<class InputIterator>
void set_seeds(InputIterator b, InputIterator e,
void set_seeds(InputIterator begin, InputIterator end,
const bool mark=false);}
{ Sets seeds to the sequence [begin. end]. This defines zones that
will be refined (if mark=true) or not refined (if
mark=false).
{ Sets seeds to the sequence [\ccc{begin}, \ccc{end}]. This defines
conmnected components of the constrained triangulation that will be
refined (if \ccc{mark=true}) or not refined (if \ccc{mark=false}).
\ccPrecond The \ccc{value_type} of \ccc{begin} and \ccc{end}
is \ccc{Geom_traits::Point_2}.}
@ -80,12 +83,12 @@ These ones give the sequences of seeds.
\ccHeading{Meshing methods}
The following method should be called after all points and constrained
The following method should be called after all points and constrained
segments are inserted in the CDT. It meshes the CDT according to the
\ccc{Geom_traits::Is_bad} predicates on triangles. \todo{Dire que l'on
a pas des garanties absolues.} The mesh can then be refined by
changing the geometric traits class and calling again the following
method.
\ccc{Geom_traits::Is_bad} predicates on triangles\footnote{Some
triangles can remain bad according to these criteria. See the user
manual for details.}. The mesh can be further refined by changing
the geometric traits class and calling \ccc{refine_mesh()} again.
\ccMethod{void refine_mesh(); }
{ Meshes the CDT. }

View File

@ -8,7 +8,7 @@ concepts. It uses types defined in \cgal\ kernel as geometric
primitives types. The shape criteria on triangle is given by a bound
$B$ such that good triangles verify $\frac{r}{l} \le B$ where $l$ is
the minimum edge length and $r$ is the circumradius of the triangle.
This traits class defines also a size constraint: all segments of all
This traits class defines also a size criteria: all segments of all
triangles must be smaller than a bound $S$.
\ccInclude{CGAL/Delaunay_mesh_size_traits_2.h}

View File

@ -20,10 +20,6 @@
\Input{make_conforming_Gabriel_2.tex}
\Input{refine_Delaunay_mesh_2.tex}
\todo{Il manque la fonction globale pour mailler. Il faut qu'on se
mette d'accord son prototype, notamment sur la fa\,con de passer les
crit\`eres de maillage.}
%%% For emacs/AucTeX:
%%% Local Variables: ***
%%% mode:latex ***

View File

@ -4,13 +4,15 @@
\ccFunction{ template<class CDT> void make_conforming_Delaunay_2 (CDT &t); }
{ Refines the constrained Delaunay triangulation \ccc{t} into a
conforming Delaunay triangulation. After a call to this functions,
all edges of \ccc{t} are Delaunay edges. \ccPrecond \ccc{CDT} has
to be a \cgal\ constrained Delaunay triangulation (CDT) and its
geometric traits class must be a model of
\ccc{ConformingDelaunayTriangulationTraits_2}.}
\todo{pas de model pour CGAL CDT}
conforming Delaunay triangulation. After a call to this function,
all edges of \ccc{t} are Delaunay edges.
\ccPrecond The template parameter \ccc{CDT} has to be instantiated
by a \ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}, or a
\ccc{Constrained_triangulation_plus_2<CDT2>} or a
\ccc{Triangulation_hierarchy_2<CDT2>} where \ccc{CDT2} is a
\ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}, and the
geometric traits class of this instance must be a model of
\ccc{ConformingDelaunayTriangulationTraits_2}. }
\end{ccRefFunction}

View File

@ -3,13 +3,18 @@
\ccInclude{CGAL/Conforming_Delaunay_triangulation_2.h}
\ccFunction{ template<class CDT> void make_conforming_Gabriel_2 (CDT &t); }
{ Conforms the constrained edges of \ccc{t} regarding the Gabriel
criteria. After a call to this functions, all constrained edges of
\ccc{t} have the \emph{Gabriel property}: the circle that have $e$
as diameter doesn't contain any points from the triangulation.
\ccPrecond \ccc{CDT} has to be a \cgal\ constrained Delaunay
triangulation (CDT) and its geometric traits class must be a model
of \ccc{ConformingGabrielTriangulationTraits_2}.}
{ Refines the constrained Delaunay triangulation \ccc{t} into a
conforming Gabriel triangulation. After a call to this function, all
constrained edges of \ccc{t} have the \emph{Gabriel property}: the
circle that have $e$ as diameter does not contain any points from
the triangulation.
\ccPrecond The template parameter \ccc{CDT} has to be instantiated
by a \ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}, or a
\ccc{Constrained_triangulation_plus_2<CDT2>} or a
\ccc{Triangulation_hierarchy_2<CDT2>} where \ccc{CDT2} is a
\ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}, and the
geometric traits class of this instance must be a model of
\ccc{ConformingGabrielTriangulationTraits_2}. }
\end{ccRefFunction}

View File

@ -3,21 +3,27 @@
\ccFunction{ template<class CDT>
void refine_Delaunay_mesh_2 (CDT &t, const typename CDT::Geomtraits& gt =
typename CDT::Geom_traits() ); }
{ Conforms the constrained edges of \ccc{t} regarding the Delaunay
criteria. After a call to this functions, all edges or \ccc{t} are
Delaunay edges.
\ccPrecond \ccc{CDT} has to be a \cgal\ constrained Delaunay
triangulation (CDT) and its geometric traits class must be a model
of \ccc{ConformingDelaunayTriangulationTraits_2}.}
typename CDT::Geom_traits() ); }
{ Refines the defaults domain defined by a constrained Delaunay
triangulation and no seeds into a mesh satifying the criteria
defined by the traits \ccc{gt}.
\ccPrecond The template parameter \ccc{CDT} has to be instantiated
by a \ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}, or a
\ccc{Constrained_triangulation_plus_2<CDT2>} or a
\ccc{Triangulation_hierarchy_2<CDT2>} where \ccc{CDT2} is a
\ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}, and the
geometric traits class of this instance must be a model of
\ccc{DelaunayMeshTraits_2}. }
\ccFunction{ template <class CDT, class InputIterator>
void refine_Delaunay_mesh_2(CDT& t,
InputIterator begin, InputIterator end,
bool mark = false,
const typename CDT::Geom_traits& gt =
typename CDT::Geom_traits()); }
{
typename CDT::Geom_traits()); }
{ Same a the previous function, but the sequence [\ccc{begin},
\ccc{end}] defines a set of seeds, that is used with the marker
\ccc{mark} to defines the domain to mesh.
\ccPrecond The \ccc{value_type} of \ccc{begin} and \ccc{end}
is \ccc{CDT::Geom_traits::Point_2}.}

View File

@ -1,11 +1,8 @@
\chapter{2D conforming triangulations and meshes}
\chapter{2D conforming triangulations\\ and meshes}
\label{user_chapter_2D_Meshes}
\minitoc
\section{Introduction}
\label{sec:Mesh_2_introduction}
This package implements Shewchuk's algorithm to construct conforming
triangulations and 2D meshes.
@ -47,118 +44,146 @@ A constrained Delaunay triangulation is said to be a \emph{conforming
Delaunay triangulation} if every constrained edge is a Delaunay
edge, that is appears in the Delaunay triangulation of the set of
vertices. Thus a conforming Delaunay triangulation is a Delaunay
triangulation where some edges are marked as constrained edges.
triangulation, where some edges are marked as constrained edges.
A constrained Delaunay triangulation is said to be a \emph{conforming
Gabriel triangulation} if every constrained edge is a Gabriel edge,
meaning that its diametral circle includes no vertex of the
triangulation in its interior. Observe that each Gabriel edge is a
Delaunay edge, and then conforming Gabriel triangulations are
conforming Delaunay triangulations.
triangulation in its interior. The Gabriel property is stronger that
the Delaunay property and each Gabriel edge is a Delaunay edge. Thus
conforming Gabriel triangulations are conforming Delaunay
triangulations.
Any contrained Delaunay triangulation can be refined into a conforming
Delaunay or conforming Gabriel triangulation by adding vertices,
called \emph{Steiner vertices}, on constrained edges until they are
cut into subconstraints small enough to be Delaunay or Gabriel edges.
\subsection{Building conforming triangulations}
\label{sec:Mesh_2_building_conforming}
Conforming triangulations can be obtained by two global functions:
\ccc{template<class CDT> void make_conforming_Delaunay_2 (CDT& t)} and
\ccc{template<class CDT> void make_conforming_Gabriel_2 (CDT& t)}. The
template parameter \ccc{CDT} must be a \cgal\ constrained triangulation. It
can be for example a \ccc{Contrained_triangulation_2}, or a
\ccc{Constrained_triangulation_plus_2} or a \ccc{Triangulation_hierarchy_2}
templated by a constrained triangulation.
template parameter \ccc{CDT} must be instanciated by a
\ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}, or a
\ccc{Constrained_triangulation_plus_2<CDT2>} or a
\ccc{Triangulation_hierarchy_2<CDT2>} where \ccc{CDT2} is a
\ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}. In order to test
the Delaunay or the Gabriel property, and to construct Steiner points,
the geometric traits class of \ccc{CDT} has to be a model of
\ccc{ConformingDelaunayTriangulationTraits_2}. It can be, for example,
any \cgal\ kernel.
The triangulation \ccc{t} is passed by reference and is made conforming
Delaunay or Gabriel by modifying it. If you want to keep the original
triangulation, please make a copy of it.
In other to test the Delaunay or the Gabriel property, and to construct
Steiner points, the geometric traits class of \ccc{CDT} has to be a model of
\ccc{ConformingDelaunayTriangulationTraits_2}. It can be, for example, any
\cgal\ kernel.
The constrained Delaunay triangulation \ccc{t} is passed by reference
and is made conforming Delaunay or conforming Gabriel by adding
vertices, that is the triangulation is modified. If you want to keep
the original triangulation, please make a copy of it.
\subsection{Example: making a triangulation conforming Delaunay and then
conforming Gabriel}
\label{sec:Mesh_2_example_making_conforming}
This example inserts several segments in a contrained triangulation, mades
it conforming Delaunay, and then conforming Gabriel. At each step, the
number of points is printed.
This example inserts several segments in a constrained Delaunay
triangulation, makes it conforming Delaunay, and then conforming
Gabriel. At each step, the number of vertices of the triangulation is
printed.
\ccIncludeExampleCode{Mesh_2/conform.C}
\section{Quality meshes}
\section{Meshes}
\label{sec:Mesh_2_meshes}
Quality meshes can be obtained by a global function \ccc{template<class CDT>
void refine_Delaunay_mesh_2 (CDT &t, typename CDT::Geom_traits gt)}. It can
also be obtained by using the class \ccc{Delaunay_mesh_2<CDT>}. In both
cases, the template parameter \ccc{CDT} has to be a \cgal\ constrained
triangulation. The class \ccc{Delaunay_mesh_2<CDT>} derives from \ccc{CDT}
and has several member functions to define the domain
(see~\ref{sec:Mesh_2_domains}) and mesh it.
\subsection{Geometric traits class}
\label{sec:Mesh_2_geomtraits}
\subsection{Definition}
\label{sec:Mesh_2_meshes_definition}
The geometric traits class of the template parameter \ccc{CDT} should not
only provide geometric objects and predicates for the triangulation, as
usual, but also define the geometric constraints that the triangles have to
satisfy. That is why it has to be a model of
\ccc{DelaunayMeshTraits_2}.
A mesh is a partition of a given domain into simplices, whose shapes
and sizes satisfy several criterias.
\subsection{Domains}
\label{sec:Mesh_2_domains}
Domains that can be meshed are \emph{planar straight line graphes}
(PSLG), which are sets of of vertices and segments such that all
endpoints of every segments are in the set and that segments intersect
only at end-points. Such a domain can represented by a \cgal\
constrained triangulation, whose constrained segment are the segments
Domains are unions of connected component of \emph{planar straight
line graphes} (PSLG), which are sets of vertices and segments such
that all endpoints of every segments are in the set and that segments
intersect only at end-points. PSLG can represented by a \cgal\
constrained triangulation, whose constrained segments are the segments
of the domain.
By default, the domain to be meshed is the whole plane but the connected
component of the infinite vertex. If the constrained triangulation is not
bounded by a polyline of constrained segments, this domain can be empty and
the algorithm will not do anything.
By default, the domain to be meshed is the whole plane but the
connected component of the infinite vertex. If the domain is not
bounded by a polyline of constrained segments, this domain can be
empty and the meshing algorithm will not do anything.
However, if the class \ccc{Delaunay_mesh_2<CDT>} is used, the domain to be
meshed can be defined more precisely, by setting \ccc{seeds}. Seeds are
a set of points, that are not in the set of points of the
triangulation. The member function \ccc{template<class InputIterator> void
set_seeds(InputIterator b, InputIterator e, bool mark = false)} sets a
list of seeds and a boolean marker. This marker tells if the seeds are in
the domain or not, and the connected component of each seed is marked the
same way. Anyway, the connected component of the infinite vertex is always
marked as the exterior of the domain.
However, one can define more precisely which connected components of
the PSLG are in the domain by setting \ccc{seeds}. Seeds are a set of
points, that are not in the set of vertices of the triangulation. A
boolean marker tells if the seeds are in the domain or not, and the
connected component of each seed is marked the same way. Anyway, the
(infinite) connected component of the infinite vertex is always marked
as the exterior of the domain. By default, the set of seeds is empty,
and the domain is the union of all finite connected components of the
PSLG.
\subsection{Shape and size criteria}
\label{sec:Mesh_2_criteria}
The shape criteria on triangles should be that the circumradius is
lower than a bound $B$ times the shortest edge of the triangle. This is
equivalent to say that the minimum angle of the triangle is greater
lower than a bound $B$ times the shortest edge of the triangle. This
is equivalent to say that the minimum angle of the triangle is greater
than $\arcsin{\frac{1}{2B}}$. If not angles are smaller than $\theta$,
then no angles are greater than $\pi - \theta$. Unfortunalty, the
algorithm will terminate at all time only if $B \ge \sqrt{2}$. This
package cannot, for the moment, insure that angles of meshes are
greater than $20.7$~degres. The size criteria can be any criteria
that tends to prefere small triangles. Both types of criterias are
defined in a nested type \ccc{Is_bad} of the geometric traits class.
terminaison of the algorithm is guaranted only if $B \ge \sqrt{2}$.
This package cannot, for the moment, insure that angles of meshes are
greater than $20.7$~degrees. The size criteria can be any criteria that
tends to prefere small triangles. Both types of criterias are defined
in a nested type \ccc{Is_bad} of the geometric traits class.
\subsection{Garanties on the resulting mesh}
If all angles between contrained segments of the initial triangulation
are greater than $60$~degrees, the criterias on angles and size are
garanted to be fulfilled. If some input incident segments forme an
angle smaller than $60$~degrees, these segments formed a
\textit{cluster}. Near clusters, the algorithm cannot garanty the
shape criterias. Of course small angles formed by input segments
cannot be suppressed. What is more, if the domain is not a polygonal
region, and includes angles smaller than $60$~degrees,
\cite{s-mgdsa-00} has prooved that one cannot compute a triangular
mesh the domain without inserting even smaller angles in the mesh.
If all angles between contrained segments of the initial triangulation are
greater than $60$~degres, the criterias on angles and size are garanted to
be fulfilled.
See~\cite{s-mgdsa-00} for details.
If some input incident segments forme an angle smaller than $60$~degres,
these segments formed a \textit{cluster}. Near clusters, the algorithm
cannot garanty the shape criterias. See~\cite{s-mgdsa-00} for details.
\subsection{Building meshes}
\label{sec:Mesh_2_building_meshes}
In this package, meshes are constrained Delaunay triangulation whose
triangles satify shape and size criteria. They can be obtained from
constrained Delaunay triangulation by called the global function
\ccc{template<class CDT> void refine_Delaunay_mesh_2 (CDT &t, typename
CDT::Geom_traits gt)}. They can also be obtained by using the class
\ccc{Delaunay_mesh_2<CDT>} that derives from \ccc{CDT}. In both cases,
the template parameter \ccc{CDT} has to be instanciated by
\ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}, or a
\ccc{Constrained_triangulation_plus_2<CDT2>} or a
\ccc{Triangulation_hierarchy_2<CDT2>} where \ccc{CDT2} is a
\ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}.
The geometric traits class of the instance of \ccc{CDT} should define
the geometric criteria that the triangles have to satisfy. That is why
it has to be a model of \ccc{DelaunayMeshTraits_2}. The latter concept
has two models provided by this package:
\begin{itemize}
\item \ccc{Delaunay_mesh_traits_2<K>} defines a shape criteria that
bounds the minimum angle of triangles.
\item \ccc{Delaunay_mesh_size_traits<K>} adds to the previous one a
bound on the maximum edge lenght.
\item \todo{J'ai volontairement oubli\'e des mod\`eles.}
\end{itemize}
The class \ccc{Delaunay_mesh_2<CDT>} derives from \ccc{CDT} and has
several member functions to define the domain and mesh it. See example
and the reference manual for details. If, after a call to one of the
meshing function, one inserts vertices of constrained edges, the
triangulation is no longer guaranted to be meshed and the meshing
function should be called again.
\subsection{Example using the global function and shape and size default
criterias}
@ -180,6 +205,10 @@ algorithm are calculated twice.
\ccIncludeExampleCode{Mesh_2/mesh_class.C}
\todo{Exemple avec seeds.}
\todo{Exemple avec la fonction globale.}
%%% For emacs/AucTeX:
%%% Local Variables: ***
%%% mode:latex ***

View File

@ -15,7 +15,9 @@ edges.
\ccTypes
\ccNestedType{FT}{The field type.}
\ccNestedType{FT}{The field type. It must be a model of the
\ccc{SqrtFieldNumberType}, meaning it must be a number type
supporting the operation $+$, $-$, $*$, $/$, and $\sqrt{\cdot}$.}
\ccNestedType{Vector_2}{The vector type.}
\ccNestedType{Construct_vector_2}{Constructor object. Must
provide the operator \ccc{Vector_2 operator()(Point a, Point b)}

View File

@ -1,15 +1,15 @@
\begin{ccRefConcept}{ConformingGabrielTriangulationTraits_2}
\ccDefinition
In addition of the requirements of the concept
\ccc{ConformingDelaunayTriangulationTraits}, a model of the concept
\ccRefName\ has to provide a predicate on angles \ccc{Angle_2}.
\ccRefines
\ccc{ConformingDelaunayTriangulationTraits_2}
\ccDefinition
In addition of the requirements of the concept
\ccc{ConformingDelaunayTriangulationTraits_2}, a model of the concept
\ccRefName\ has to provide a predicate on angles \ccc{Angle_2}.
\ccTypes
\ccNestedType{Angle_2}{Predicate object. Must provide the operator

View File

@ -1,30 +1,44 @@
\begin{ccRefClass}{Conforming_Delaunay_triangulation_2<CDT>}
The class \ccRefName{} is an auxiliary base class of
\ccc{Delaunay_mesh_2<CDT>}. It permits to make a constrained Delaunay
triangulation conforming to the Delaunay or Gabriel criteria. For average
uses, consider using the global fonctions \ccc{make_conforming_Gabriel_2}
and \ccc{make_conforming_Delaunay_2} defined in the same header.
\ccc{Delaunay_mesh_2<CDT>}. It permits to refine a constrained
Delaunay triangulation into a conforming Delaunay or conforming
Gabriel triangulation. For standard needs, consider using the global
fonctions \ccc{make_conforming_Gabriel_2} and
\ccc{make_conforming_Delaunay_2} defined in the same header.
The template parameter \ccc{CDT}, from which this class derives, has to be
a \cgal\ constrained Delaunay triangulation, and it geometric traits class
of has to be a model of the concept
\ccc{ConformingDelaunayTriangulationTraits_2} or
\ccc{ConformingGabrielTriangulationTraits}. This traits class provides
constructors and predicates needed by the conforming algorithm.
\ccParameters
A \ccRefName{} object is a constrained Delaunay triangulation, in which one
can insert points and constrained segments and apply very \ccc{CDT}'s
availlable operations. After a call to one of the conforming methods, the
constrained edges of the CDT are guaranteed to be conforming to the
Delaunay or the Gabriel criteria (which depends from the conforming method
called). If one inserts points or constrained segments in the \ccRefName{}
object after that, the edges are no longer guaranteed to be conform.
The template parameter \ccc{CDT} has to be instantiated by a
\ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}, or a
\ccc{Constrained_triangulation_plus_2<CDT2>} or a
\ccc{Triangulation_hierarchy_2<CDT2>} where \ccc{CDT2} is a
\ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}. The geometric
traits class of the instance of \ccc{CDT} has to be a model of the
concept \ccc{ConformingGabrielTriangulationTraits_2}. This traits class
provides constructors and predicates needed by the conforming
algorithm.
The conforming methods insert points into constrained edges, splitting them
into sub-constraints. You can have access to inserted constraints if you
use \ccc{CGAL::Constrained_triangulation_plus_2<CDT>} as template
parameter.
Every methods of this class (but \ccc{clear()}) exists in two
versions: one suffixed by \ccc{_Delaunay} and one suffixed by
\ccc{_Gabriel}. If only \emph{Delaunay} methods are called, the
geometric traits class of the instance of \ccc{CDT} can be a model of
\ccc{ConformingDelaunayTriangulationTraits_2}, which is a lighter
requirement than the \ccc{ConformingGabrielTriangulationTraits_2}.
\ccHeading{Using this class}
A call to the method \ccc{make_conforming_Delaunay()}
(resp. \ccc{make_conforming_Gabriel()}) will refine the contrained
Delaunay triangulation into a conforming Delaunay (resp. conforming
Gabriel) triangulation. After that, if one inserts vertices of
contrained edges, the triangulation is no longer guaranted to be
conforming, until next call to a conforming method.
The conforming methods insert points into constrained edges, splitting
them into sub-constraints. You can have access to initial inserted
constraints if you instantiate the template parameter by a
\ccc{CGAL::Constrained_triangulation_plus_2<CDT>}.
\ccInclude{CGAL/Conforming_Delaunay_triangulation_2.h}
@ -55,21 +69,21 @@ parameter.
\ccHeading{Conforming methods}
\ccMethod{ void make_conforming_Delaunay(); }
{ Conforms the constrained edges regarding the Delaunay criteria.
{ Refines the triangulation into a conforming Delaunay triangulation.
After a call to this method, all triangles fulfill the empty circle
property. }
\ccMethod{ void make_conforming_Gabriel(); }
{ Conforms the constrained edges regarding the Gabriel criteria. After
a call to this method, all constrained edges $e$ have the
{ Refines the triangulation into a conforming Gabriel triangulation.
After a call to this method, all constrained edges $e$ have the
\emph{Gabriel property}: the circle that have $e$ as diameter
doesn't contain any vertex of the triangulation. }
does not contain any vertex of the triangulation. }
\ccHeading{Checking}
The following methods verify that the constrained triangulation is
conforming to the Delaunay or the Gabriel criteria. These methods scan
the whole triangulation and their complexity is proportional to the
number of edges.
conforming Delaunay or conforming Gabriel. These methods scan the
whole triangulation and their complexity is proportional to the number
of edges.
\ccMethod{ bool is_conforming_Delaunay(); }
{ Returns \ccc{true} iff all triangles fulfill the Delaunay property.}
@ -83,26 +97,26 @@ number of edges.
\ccHeading{Step by step operations}
The \ccRefName{} class allows, for debugging or demos, to play the
conforming algorithm step by step, using the following methods. They exist
in two version, depending whether you want the triangulation to be
conforming Delaunay or conforming Gabriel. Any call to a
\ccc{step_by_step_conforming_XX} function requires that the last call of
\ccc{init_XX} was with the same criteria.
conforming algorithm step by step, using the following methods. They
exist in two versions, depending whether you want the triangulation to
be conforming Delaunay or conforming Gabriel. Any call to a
\ccc{step_by_step_conforming_XX} function requires a previous call to
the corresponding of \ccc{init_XX}.
\ccMethod{ void init_Delaunay(); }
{ The method must be called after all points and constrained
segments are inserted and before any call to the following
methods. If some points or segments are then inserted
in the triangulation, this method must be called again. }
{ The method must be called after all points and constrained segments
are inserted and before any call to the following methods. If some
points or segments are then inserted in the triangulation, this
method must be called again. }
\ccMethod{ bool step_by_step_conforming_Delaunay (); }
{ Applies one step of the algorithm. At one step of the algorithm,
only one point is inserted. However, the algorithm
sometimes doesn't insert a point at a step. Anyway,
internal datas of the \ccRefName{} object are modified at
each step, until \ccc{c.is_conforming_done()}. If
\ccc{c.is_conforming_done()}, returns \ccc{false}. If not (when
the algorithm is not done), returns \ccc{true}.}
\ccMethod{ bool step_by_step_conforming_Delaunay (); }
{ Applies one step of the algorithm. At one step of the algorithm,
only one point is inserted. However, the algorithm sometimes doesn't
insert a point at a step. Anyway, internal datas of the \ccRefName{}
object are modified at each step, until \ccc{c.is_conforming_done()}
returns \ccc{true}. If \ccc{c.is_conforming_done()}, returns
\ccc{false}. If not (when the algorithm is not done), returns
\ccc{true}.}
\ccMethod{ void init_Gabriel(); }{}
\ccGlue

View File

@ -1,29 +1,30 @@
\begin{ccRefConcept}{DelaunayMeshTraits_2}
\ccRefines
\ccc{ConformingGabrielTriangulationTraits_2}
\ccDefinition
In addition of the requirements of the concept
\ccc{ConformingGabrielTriangulationTraits_2}, a model of the concept
\ccRefName{} has to provide a type \ccc{Quality} that represents the
quality of a triangle, and a predicate \ccc{Is_bad}. \ccc{Is_bad} defines
mesh criteria on triangles and computes the quality of the triangle passed
as argument. The type \ccc{Quality} must be \emph{comparable} as the
meshing algorithm will order bad triangles by quality, to split those with
smallest quality first.
\ccRefines
\ccc{ConformingGabrielTriangulationTraits}
\ccRefName{} has to provide a type \ccc{Quality} that represents a
measure of the quality of a triangle, and a predicate \ccc{Is_bad}.
\ccc{Is_bad} defines mesh criteria on triangles and computes the
quality of the triangle passed as argument. The type \ccc{Quality}
must be \emph{comparable} as the meshing algorithm will order bad
triangles by quality, to split those with smallest quality first.
\ccTypes
\ccNestedType{Quality}{Copy constructible, assignable, and comparable type.}
\ccNestedType{Is_bad} {Predicate object. Must provide the operator
\ccc{bool operator()(Point_2 a, Point_2 b, Point_2 c, Quality& q)} thats
returns \ccc{true} iff the triangle formed by the three points $a$,
$b$, $c$ satisfies the wanted criteria for mesh triangles. A value
mesuring the quality of the triangle must be assigned to $q$.}
\ccc{bool operator()(Point_2 a, Point_2 b, Point_2 c, Quality& q)}
thats assigns to \ccc{q} a value measuring the quality of the
triangle and returns \ccc{true} iff the triangle formed by the three
points $a$, $b$, $c$ satisfies the wanted criteria for mesh
triangles.}
\ccCreationVariable{traits}

View File

@ -6,12 +6,12 @@ The class \ccRefName{} derives from
geometric traits class must be a model of the concept
\ccc{DelaunayMeshTraits_2}. This traits class provides not only
constructors and predicates needed by the mesh algorithm, but also defines
the geometric constraints on the triangles of the mesh.
the shape and size criteria on the triangles of the mesh.
A \ccRefName{} object is a \ccc{CDT} CDT, in which one can insert points
and constrained segments and every \ccc{CDT}'s availlable operations. After
a call to one of meshing methods, the CDT is meshed according to the
geometric constraints defined in the traits class.
criteria defined in the traits class.
Before the first call to a meshing method, one can insert points and
constrained segments in the \ccRefName{} object, like in a CDT. Meshing
@ -22,8 +22,11 @@ triangulation \ccc{CDT} has to be a model of the concept
\ccc{MeshFaceBase_2}.
Once a meshing method is called, the CDT is meshed according to
contraints. If points or constrained segments are inserted again in
the CDT, the criterias on shape or size are no longer garanted.
criteria on shape and size defined in the traits. If points or
constrained segments are inserted again in the CDT, the criterias are
no longer garanted.
\todo{Je dois copier-coller la d\'efinition des domaines, et des crit\`eres?}
\ccInclude{CGAL/Delaunay_mesh_2.h}
@ -39,7 +42,7 @@ the CDT, the criterias on shape or size are no longer garanted.
\ccTypedef{typedef CDT Triangulation;}{the triangulation base class.}
\ccTypedef{typedef CDT::Geom_traits Geom_traits;}{the geometric traits class.}
\ccTypedef{typedef Conforming_Delaunay_triangulation_2<CDT> Conform;}{the
conform triangulation base class.}
conforming triangulation base class.}
\ccNestedType{Seeds_iterator}{const iterator over defined seeds. Its
value type is \ccc{Geom_traits::Point_2}}
@ -57,16 +60,16 @@ the CDT, the criterias on shape or size are no longer garanted.
The following functions are used to define seeds.
\ccMethod{void clear_seeds ();}{ Sets seeds to the empty set. Faces
that will be refined are all faces that are not connected to the
infinite vertex.}
\ccMethod{void clear_seeds ();}{ Sets seeds to the empty set. All
finite connected components of the constrained triangulation will be
refined.}
\ccMethod{template<class InputIterator>
void set_seeds(InputIterator b, InputIterator e,
void set_seeds(InputIterator begin, InputIterator end,
const bool mark=false);}
{ Sets seeds to the sequence [begin. end]. This defines zones that
will be refined (if mark=true) or not refined (if
mark=false).
{ Sets seeds to the sequence [\ccc{begin}, \ccc{end}]. This defines
conmnected components of the constrained triangulation that will be
refined (if \ccc{mark=true}) or not refined (if \ccc{mark=false}).
\ccPrecond The \ccc{value_type} of \ccc{begin} and \ccc{end}
is \ccc{Geom_traits::Point_2}.}
@ -80,12 +83,12 @@ These ones give the sequences of seeds.
\ccHeading{Meshing methods}
The following method should be called after all points and constrained
The following method should be called after all points and constrained
segments are inserted in the CDT. It meshes the CDT according to the
\ccc{Geom_traits::Is_bad} predicates on triangles. \todo{Dire que l'on
a pas des garanties absolues.} The mesh can then be refined by
changing the geometric traits class and calling again the following
method.
\ccc{Geom_traits::Is_bad} predicates on triangles\footnote{Some
triangles can remain bad according to these criteria. See the user
manual for details.}. The mesh can be further refined by changing
the geometric traits class and calling \ccc{refine_mesh()} again.
\ccMethod{void refine_mesh(); }
{ Meshes the CDT. }

View File

@ -8,7 +8,7 @@ concepts. It uses types defined in \cgal\ kernel as geometric
primitives types. The shape criteria on triangle is given by a bound
$B$ such that good triangles verify $\frac{r}{l} \le B$ where $l$ is
the minimum edge length and $r$ is the circumradius of the triangle.
This traits class defines also a size constraint: all segments of all
This traits class defines also a size criteria: all segments of all
triangles must be smaller than a bound $S$.
\ccInclude{CGAL/Delaunay_mesh_size_traits_2.h}

View File

@ -20,10 +20,6 @@
\Input{make_conforming_Gabriel_2.tex}
\Input{refine_Delaunay_mesh_2.tex}
\todo{Il manque la fonction globale pour mailler. Il faut qu'on se
mette d'accord son prototype, notamment sur la fa\,con de passer les
crit\`eres de maillage.}
%%% For emacs/AucTeX:
%%% Local Variables: ***
%%% mode:latex ***

View File

@ -4,13 +4,15 @@
\ccFunction{ template<class CDT> void make_conforming_Delaunay_2 (CDT &t); }
{ Refines the constrained Delaunay triangulation \ccc{t} into a
conforming Delaunay triangulation. After a call to this functions,
all edges of \ccc{t} are Delaunay edges. \ccPrecond \ccc{CDT} has
to be a \cgal\ constrained Delaunay triangulation (CDT) and its
geometric traits class must be a model of
\ccc{ConformingDelaunayTriangulationTraits_2}.}
\todo{pas de model pour CGAL CDT}
conforming Delaunay triangulation. After a call to this function,
all edges of \ccc{t} are Delaunay edges.
\ccPrecond The template parameter \ccc{CDT} has to be instantiated
by a \ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}, or a
\ccc{Constrained_triangulation_plus_2<CDT2>} or a
\ccc{Triangulation_hierarchy_2<CDT2>} where \ccc{CDT2} is a
\ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}, and the
geometric traits class of this instance must be a model of
\ccc{ConformingDelaunayTriangulationTraits_2}. }
\end{ccRefFunction}

View File

@ -3,13 +3,18 @@
\ccInclude{CGAL/Conforming_Delaunay_triangulation_2.h}
\ccFunction{ template<class CDT> void make_conforming_Gabriel_2 (CDT &t); }
{ Conforms the constrained edges of \ccc{t} regarding the Gabriel
criteria. After a call to this functions, all constrained edges of
\ccc{t} have the \emph{Gabriel property}: the circle that have $e$
as diameter doesn't contain any points from the triangulation.
\ccPrecond \ccc{CDT} has to be a \cgal\ constrained Delaunay
triangulation (CDT) and its geometric traits class must be a model
of \ccc{ConformingGabrielTriangulationTraits_2}.}
{ Refines the constrained Delaunay triangulation \ccc{t} into a
conforming Gabriel triangulation. After a call to this function, all
constrained edges of \ccc{t} have the \emph{Gabriel property}: the
circle that have $e$ as diameter does not contain any points from
the triangulation.
\ccPrecond The template parameter \ccc{CDT} has to be instantiated
by a \ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}, or a
\ccc{Constrained_triangulation_plus_2<CDT2>} or a
\ccc{Triangulation_hierarchy_2<CDT2>} where \ccc{CDT2} is a
\ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}, and the
geometric traits class of this instance must be a model of
\ccc{ConformingGabrielTriangulationTraits_2}. }
\end{ccRefFunction}

View File

@ -3,21 +3,27 @@
\ccFunction{ template<class CDT>
void refine_Delaunay_mesh_2 (CDT &t, const typename CDT::Geomtraits& gt =
typename CDT::Geom_traits() ); }
{ Conforms the constrained edges of \ccc{t} regarding the Delaunay
criteria. After a call to this functions, all edges or \ccc{t} are
Delaunay edges.
\ccPrecond \ccc{CDT} has to be a \cgal\ constrained Delaunay
triangulation (CDT) and its geometric traits class must be a model
of \ccc{ConformingDelaunayTriangulationTraits_2}.}
typename CDT::Geom_traits() ); }
{ Refines the defaults domain defined by a constrained Delaunay
triangulation and no seeds into a mesh satifying the criteria
defined by the traits \ccc{gt}.
\ccPrecond The template parameter \ccc{CDT} has to be instantiated
by a \ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}, or a
\ccc{Constrained_triangulation_plus_2<CDT2>} or a
\ccc{Triangulation_hierarchy_2<CDT2>} where \ccc{CDT2} is a
\ccc{Constrained_Delaunay_triangulation_2<Gt, Tds>}, and the
geometric traits class of this instance must be a model of
\ccc{DelaunayMeshTraits_2}. }
\ccFunction{ template <class CDT, class InputIterator>
void refine_Delaunay_mesh_2(CDT& t,
InputIterator begin, InputIterator end,
bool mark = false,
const typename CDT::Geom_traits& gt =
typename CDT::Geom_traits()); }
{
typename CDT::Geom_traits()); }
{ Same a the previous function, but the sequence [\ccc{begin},
\ccc{end}] defines a set of seeds, that is used with the marker
\ccc{mark} to defines the domain to mesh.
\ccPrecond The \ccc{value_type} of \ccc{begin} and \ccc{end}
is \ccc{CDT::Geom_traits::Point_2}.}

View File

@ -0,0 +1,49 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Conforming_Delaunay_triangulation_2.h>
struct K : CGAL::Exact_predicates_inexact_constructions_kernel {};
typedef CGAL::Constrained_Delaunay_triangulation_2<K> CDT;
typedef CDT::Point Point;
typedef CDT::Vertex_handle Vertex_handle;
int main()
{
CDT cdt;
// construct a constrained triangulation
Vertex_handle
va = cdt.insert(Point( 5., 5.)),
vb = cdt.insert(Point(-5., 5.)),
vc = cdt.insert(Point( 4., 3.)),
vd = cdt.insert(Point( 5.,-5.)),
ve = cdt.insert(Point( 6., 6.)),
vf = cdt.insert(Point(-6., 6.)),
vg = cdt.insert(Point(-6.,-6.)),
vh = cdt.insert(Point( 6.,-6.));
cdt.insert_constraint(va,vb);
cdt.insert_constraint(vb,vc);
cdt.insert_constraint(vc,vd);
cdt.insert_constraint(vd,va);
cdt.insert_constraint(ve,vf);
cdt.insert_constraint(vf,vg);
cdt.insert_constraint(vg,vh);
cdt.insert_constraint(vh,ve);
std::cout << "Number of vertices before: "
<< cdt.number_of_vertices() << std::endl;
// make it conforming Delaunay
CGAL::make_conforming_Delaunay_2(cdt);
std::cout << "Number of vertices after make_conforming_Delaunay_2: "
<< cdt.number_of_vertices() << std::endl;
// then make it conforming Gabriel
CGAL::make_conforming_Gabriel_2(cdt);
std::cout << "Number of vertices after make_conforming_Gabriel_2: "
<< cdt.number_of_vertices() << std::endl;
}