diff --git a/Ridges_3/doc_tex/Ridges_3/Ridges_3_user.tex b/Ridges_3/doc_tex/Ridges_3/Ridges_3_user.tex
index 29410d99f7b..dc127d273d6 100644
--- a/Ridges_3/doc_tex/Ridges_3/Ridges_3_user.tex
+++ b/Ridges_3/doc_tex/Ridges_3/Ridges_3_user.tex
@@ -4,7 +4,7 @@
% ./blind -f data/ellipsoid_u_0.02.off -d4 -m4 -a3 -t3
% ../../demo/Ridges_3/introspect-qt data/ellipsoid_u_0.02.off data/data_ellipsoid_u_0.02.offRIDGES-d4-m4-t3-a3-p0.4ogl.txt 0 0
-
+%david pict for old algo, don't know parameters, todo... and get better pict
@@ -12,6 +12,19 @@
\newcommand{\hot}{h.o.t}%[0]
+\begin{figure}[!ht]
+\begin{ccTexOnly}
+\centerline{
+\includegraphics[width=.5\linewidth]{Ridges_3/david_crest}}
+\end{ccTexOnly}
+\caption{Crest ridges on the David.}
+\label{david_crest}
+\begin{ccHtmlOnly}
+
+
+\end{ccHtmlOnly}
+\end{figure}
+
This chapter describes the \cgal's package for the extraction of
ridges and umbilics on meshes. Given a smooth surface, a ridge is a
curve along which one of the principal curvatures has an extremum
@@ -34,24 +47,16 @@ Fitting}.
\subsection{Overview}
%%%%%%%%%%%%%%%%%%%%%%
-2 main independent classes
+Section \ref{smooth} presents the basics of the smooth theory of
+ridges and umbilics. Sections \ref{ridge-mesh} and \ref{umbilic-mesh}
+present algorithms for the extraction on triangular meshes. Section
+\ref{soft} gives the specifications and examples illustrate
+the usage of the pachage \ref{examples}.
-\begin{itemize}
-\item
-\ccc{Umbilic_approximation}
-\item
-\ccc{Ridge_approximation}
-\end{itemize}
-And two ``container'' classes.
-
-%%%%%%%%%%%%%%%%%%%%%%%
-\section{Introduction}
-\label{sec:intro}
-%%%%%%%%%%%%%%%%%%%%%%%
-
-\subsection{Ridges and umbilics of a smooth surface}
+\section{Ridges and umbilics of a smooth surface}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\label{smooth}
A comprehensive description of ridges can be found in
\cite{cgal:hgygm-ttdpf-99,cgal:p-gd-01,cgal:cp-ssulc-05}
@@ -66,11 +71,10 @@ Anything related to the maximal (minimal) curvature is qualified blue
(red), for example we shall speak of the blue curvature for $k_1$ or
the red direction for $d_2$.
%%
-In local coordinates, we denote $\langle , \rangle$
-the inner product induced by the ambient Euclidean space, and $dk_1$,
-$dk_2$ the gradients of the principal curvatures. Ridges, illustrated
-on Figs \ref{pict:ellipsoid_ridges} and \ref{fig:ridges_ellipsoid},
-are defined by:
+In local coordinates, we denote $\langle , \rangle$ the inner product
+induced by the ambient Euclidean space, and $dk_1$, $dk_2$ the
+gradients of the principal curvatures. Ridges, illustrated on figure
+\ref{ellipsoid_ridges}, are defined by:
\begin{definition}
\label{def:ridge-extrema}
@@ -94,14 +98,29 @@ ridge point can further be qualified as {\em elliptic} if it
corresponds to a maximum of $k_1$ or a minimum of $k_2$, or {\em
hyperbolic} otherwise. Hence we end with four types of ridges, namely
: \ccc{BLUE_ELLIPTIC_RIDGE}, \ccc{BLUE_HYPERBOLIC_RIDGE}, \ccc{RED_ELLIPTIC_RIDGE},
-\ccc{RED_HYPERBOLIC_RIDGE}.
+\ccc{RED_HYPERBOLIC_RIDGE}, see figure \ref{ellipsoid_ridges}.
In addition, a subset of elliptic ridges, called the crest lines,
which can be seen as the visually most salient curves on a surface are
also of interest. A crest line is an elliptic ridge which is a maximum
of $\max(|k_1|,|k_2|)$. Hence we provide two additional ridge types :
-\ccc{BLUE_CREST_RIDGE} and \ccc{RED_CREST_RIDGE}.
+\ccc{BLUE_CREST_RIDGE} and \ccc{RED_CREST_RIDGE}, see figure \ref{david_crest}.
+\begin{figure}[!ht]
+\begin{ccTexOnly}
+\centerline{
+\includegraphics[width=.5\linewidth]{Ridges_3/ellipsoid_ridges}}
+\end{ccTexOnly}
+\caption{Ridges on the ellipsoid, normals pointing outward.
+ Color coding~: \ccc{BLUE_ELLIPTIC_RIDGE} are blue,
+\ccc{BLUE_HYPERBOLIC_RIDGE} are green, \ccc{RED_ELLIPTIC_RIDGE} are red and
+\ccc{RED_HYPERBOLIC_RIDGE} are yellow.}
+\label{ellipsoid_ridges}
+\begin{ccHtmlOnly}
+
+
+\end{ccHtmlOnly}
+\end{figure}
At any point of the surface which is not an umbilic, principal
directions $d_1, d_2$ are well defined, and these (non oriented)
@@ -160,8 +179,35 @@ Hence ridge types are characterized by
\end{itemize}
-\subsection{Extraction of ridges on Triangular Meshes}
+
+Umbilics (where $k_1=k_2$) are further distinguished in two classes
+depending on the pattern of curvature lines, see figure
+\ref{umbilics}. If the index of the principal direction field is $1/2$
+then it is called a
+\ccc{UMBILIC_WEDGE}, if it is $-1/2$ it is called a \ccc{UMBILIC_TRISECTOR}.
+ Eitherwise the umbilic is qualified
+\ccc{UMBILIC_NON_GENERIC}.
+
+\begin{figure}[!ht]
+\begin{ccTexOnly}
+\centerline{
+\includegraphics[width=.3\linewidth]{Ridges_3/lemon}
+\includegraphics[width=.3\linewidth]{Ridges_3/star}}
+\end{ccTexOnly}
+\caption{Wedge and trisector umbilics.}
+\label{umbilics}
+\begin{ccHtmlOnly}
+
+
+
+\end{ccHtmlOnly}
+\end{figure}
+
+
+
+\section{Extraction of ridges on Triangular Meshes}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\label{ridge-mesh}
As 0-level set of the extremality coefficients $b_0$ and $b_3$, ridges
are extracted by a marching line algorithm on the surface. As the
@@ -172,7 +218,7 @@ the mesh. Except in the neighborhood of umbilics, if the mesh is dense
enough, a coherent orientation of principal directions at both
endpoints of an edge is chosen such than the angle between the two
vectors is acute-- we call this method the ``acute rule''. Moreover,
-we only check for ridges in triangles such than one can find an
+we only check for ridges triangles such than one can find an
orientation of its three vertices (we call theses triangles
``regular'') such that the three edges are coherently oriented.
@@ -193,22 +239,44 @@ This is why we propose another method to detect umbilics
independently.
\end{itemize}
+We provide two methods to distinguish elliptic and hyperbolic
+ridges. The first one uses the signs of fourth order quantities
+$P_i$. The other uses only third order quantities, details can be
+found in \cite{cgal:cp-tdare-05}.
-explain
-tag E/H with 3 or 4 order
+For real world applications dealing with coarse meshes, or meshes
+featuring degenerate regions or sharp features, one can only expect
+noisy ridges which need filtering. For example, if the principal
+curvatures are constant ---which is the case on a plane or a cylinder,
+then all points are ridge points. In this context, an appealing notion
+is that of {\em sharp} ridge or {\em prominent} ridge. Since ridges
+are witnessed by zero crossings of $b_0$ and $b_3$, one can expect
+erroneous detections as long as these coefficients remain small. In
+order to select the most prominent ridge points, we can focus on
+points where the variation of the curvature is fast along the
+curvature line.
+One can observe that, at a ridge point, according to the equation
+\ref{eq:taylor_along_line}, the second derivative of $k_1$ along its
+curvature line satisfies $k_1^{''}(0) = P_1/(k_1-k_2)$. Using this
+observation, one can define the {\em sharpness of a ridge} as the
+integral of the absolute value of $P_1/(k_1-k_2)$ along the ridge. As
+the second derivative of the curvature is homogeneous to the inverse
+of the cube of a length, the sharpness is homogeneous to the inverse
+of the square of a length. Multiplying the sharpness by the square of
+the model size gives a threshold and an associated sharpness-filter
+which are scale independent. Another filtering is also available with
+the {\em strength } which is the integral of the
+curvature along the ridge line.
-extraction of umbilics, present the class \ccc{Umbilic}
-strength sharpness
-
-\subsection{Extraction of Umbilics on Triangular Meshes}
+\section{Extraction of Umbilics on Triangular Meshes}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\label{umbilic-mesh}
-First we need to define patches of triangles of the mesh $T$
-containing an umbilic. The method combines a minimization and an
-index computation on the neighborhood of each triangle of $T$. The
-size of the neighborhood is the only parameter of the algorithm.
+The method combines a minimization and an index computation (of the
+principal direction field) on the neighborhood of each vertex of $T$.
+The size of the neighborhood is the only parameter of the algorithm.
\paragraph{Finding patches around vertices.}
Given a vertex $v$, we aim at defining a collection of triangles
@@ -241,45 +309,277 @@ $\delta \geq 3\Pi/2$ or $\delta \leq -3\Pi/2$ then the umbilic is called non-gen
%%%%%%%%%%%%%%%%%%%%%%%
\section{Software Design}
%%%%%%%%%%%%%%%%%%%%%%%
+\label{soft}
-usage of pm, triangular meshes.
+All classes of this package are templated by the parameter
+\ccc{TriangularPolyhedralSurface} which defines the mesh on
+which the extraction algorithms are applied.
-\subsection{Options and interface specifications}
+The differential quantities are provided at vertices of this mesh via
+property maps, a concept commonly used in the Boost library. Scalar
+data (curvatures and their derivatives) are provided via
+\ccc{Vertex2FTPropertyMap} concepts and 3d vectorial data (principal
+directions of curvatures) are provided via
+\ccc{Vertex2VectorPropertyMap} concepts.
+The rationale for introducing these concepts is that properties are
+used independently of the way they are stored. This enables the user
+to store them ``internally'' in extended vertices or ``externally''
+with maps. We provide a class
+\ccc{Vertex2Data_Property_Map_with_std_map} to adapt \ccc{std::maps} with
+a \ccc{boost::associative_property_map} to model these concepts.
+
+
+Output of ridges or umbilics are provided via output iterator.
+
+Extraction of ridges and umbilics are performed by two independent
+classes we now further describe.
+
+\subsection{Ridge Approximation}
+%%%%%%%%%%%%%%%
+The main class is
+\ccc{Ridge_approximation}
+. Its construction requires the mesh and the property maps defining
+the differential quantities for principal curvatures $k_1$ and $k_2$,
+the third order extremalities $b_0$ and $b_3$, the forth order
+quantities $P_1$ and $P_2$, and the principal directions of curvature
+$d_1$ and $d_2$. Two functions enable to either compute all ridges
+\ccc{compute_all_ridges} or only some of them
+\ccc{compute_ridges}.
+You can choose at which order the elliptic/hyperbolic distinction is
+computed. For the second function the type of ridges you can ask for
+the computation is one of the \ccc{Ridge_interrogation_type} that is
+blue, red or crest ridges.
+
+The ridge lines are stored in
+\ccc{Ridge_line} objects and output through an iterator.
+Each ridge line is represented as a list of halfedges of the mesh it
+crosses with a scalar defining the barycentric coordinate of the
+crossing point. It comes with its type \ccc{Ridge_type}, its strength
+and sharpness.
+
+If one chooses to use only third order quantities, the quantities
+$P_i$ does not have to be defined. Then the sharpness will not be
+defined.
+
+\subsection{Umbilic Approximation}
%%%%%%%%%%%%%%%%%%%%%
-ridges: approx and container class
+The main class is
+\ccc{Umbilic_approximation}.
+Its construction requires the mesh and the property maps defining the
+differential quantities for principal curvatures $k_1$ and $k_2$, and
+the principal directions of curvature $d_1$ and $d_2$. The function
+\ccc{compute} has a parameter to define the size of the neighborhood of the umbilic.
-ridges compute with para type and tag
-
-Umbilics : approx and container,
-
-umbilic compute with para
-size
-
-\subsection{Template parameters}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-On a des concepts: Vertex2FTPropertyMap et Vertex2VectorPropertyMap
-qui sont specialisent le concept de Propety Map de boost, avec
-\ccc{key_type CGAL::Polyhedron_3::Vertex_handle} et de \ccc{value_type
-CGAL::Polyhedron_3::Traits::FT ou Vector_3 }. On a donc les fct get,
-put, []; preciser LvaluePropertyMap ? Utilisation stockage
-d'information scalaire ou vectorielle pour les vertex d'un polyhedron,
-peut-etre dans le vertex lui-meme ou externe avec une std::map par
-exemple.
-
-Poly est un concept qui a pour model \ccc{CGAL::Polyhedron_3} (faut-il
-detaille les requirements?) TriangularPolyhedralSurface?
-
-OutputIt est un concept de stl Output Iterator avec \ccc{value_type
-CGAL::Ridge_line*} .\\
-ou Outputit est un Output Iterator de la stl sur des Umbilic*
+Umbilics are stored in \ccc{Umbilic} objects, they come with their
+type, the vertex of the mesh they are associated to and the list of
+halfedges representing the contour of the neighborhood.
-\subsection{Output}
-%%%%%%%%%%%%%%%%%%%%
-
-Classes \ccc{Umbilic} and \ccc{Ridge_line}
-
+\subsection{Models for the property map concepts}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The class
+\ccc{Vertex2Data_Property_Map_with_std_map}
+enables the definition of models for the concepts
+\ccc{Vertex2FTPropertyMap}
+\ccc{Vertex2VectorPropertyMap}
+using \ccc{std::maps} and \ccc{boost::associative_property_map}.
+
+
\section{Examples}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\label{examples}
+
+The example program computes ridges and umbilics from an off file. It
+uses the Jet fitting package to estimate the differential quantities.
+The output file contains data to be visualized with the demo program introspect-qt.
+Parameters are
+\begin{itemize}
+\item
+d, the degree of the jet for the \ccc{Monge_via_jet_fitting} class;
+\item
+m, the degree of the Monge representation for the \ccc{Monge_via_jet_fitting} class;
+\item
+a, the number of rings of neighbors collected for the \ccc{Monge_via_jet_fitting} class;
+\item
+t, the \ccc{Tag_order} for the distinction between elliptic and hyperbolic ridges;
+\item
+u, the parameter for umbilic patch size.
+\end{itemize}
+
+\begin{ccExampleCode}
+#include
+#include
+
+#include
+#include
+
+//this is an enriched Polyhedron with facets' normal
+#include "PolyhedralSurf.h"
+
+typedef PolyhedralSurf::Traits Kernel;
+typedef Kernel::FT FT;
+typedef Kernel::Point_3 Point_3;
+typedef Kernel::Vector_3 Vector_3;
+
+typedef PolyhedralSurf::Vertex Vertex;
+typedef PolyhedralSurf::Vertex_handle Vertex_handle;
+typedef PolyhedralSurf::Vertex_iterator Vertex_iterator;
+
+typedef CGAL::Monge_via_jet_fitting Monge_via_jet_fitting;
+typedef Monge_via_jet_fitting::Monge_form Monge_form;
+typedef Monge_via_jet_fitting::Monge_form_condition_numbers Monge_form_condition_numbers;
+
+typedef CGAL::Vertex2Data_Property_Map_with_std_map Vertex2Data_Property_Map_with_std_map;
+typedef Vertex2Data_Property_Map_with_std_map::Vertex2FT_map Vertex2FT_map;
+typedef Vertex2Data_Property_Map_with_std_map::Vertex2Vector_map Vertex2Vector_map;
+typedef Vertex2Data_Property_Map_with_std_map::Vertex2FT_property_map Vertex2FT_property_map;
+typedef Vertex2Data_Property_Map_with_std_map::Vertex2Vector_property_map Vertex2Vector_property_map;
+
+//RIDGES
+typedef CGAL::Ridge_line Ridge_line;
+typedef CGAL::Ridge_approximation < PolyhedralSurf,
+ back_insert_iterator< std::vector >,
+ Vertex2FT_property_map,
+ Vertex2Vector_property_map > Ridge_approximation;
+
+
+//UMBILICS
+typedef CGAL::Umbilic Umbilic;
+typedef CGAL::Umbilic_approximation < PolyhedralSurf,
+ back_insert_iterator< std::vector >,
+ Vertex2FT_property_map,
+ Vertex2Vector_property_map > Umbilic_approximation;
+
+//create property maps
+Vertex2FT_map vertex2k1_map, vertex2k2_map,
+ vertex2b0_map, vertex2b3_map,
+ vertex2P1_map, vertex2P2_map;
+Vertex2Vector_map vertex2d1_map, vertex2d2_map;
+
+Vertex2FT_property_map vertex2k1_pm(vertex2k1_map), vertex2k2_pm(vertex2k2_map),
+ vertex2b0_pm(vertex2b0_map), vertex2b3_pm(vertex2b3_map),
+ vertex2P1_pm(vertex2P1_map), vertex2P2_pm(vertex2P2_map);
+Vertex2Vector_property_map vertex2d1_pm(vertex2d1_map), vertex2d2_pm(vertex2d2_map);
+
+int main(int argc, char *argv[])
+{
+ //compute differential quantities with the jet fitting package
+ ...
+ //initialize the property maps
+ ...
+ //---------------------------------------------------------------------------
+ //Ridges
+ //--------------------------------------------------------------------------
+ Ridge_approximation ridge_approximation(P,
+ vertex2k1_pm, vertex2k2_pm,
+ vertex2b0_pm, vertex2b3_pm,
+ vertex2P1_pm, vertex2P2_pm,
+ vertex2d1_pm, vertex2d2_pm);
+ std::vector ridge_lines;
+ back_insert_iterator > ii(ridge_lines);
+
+ //Find BLUE_RIDGE, RED_RIDGE, CREST_RIDGE
+ ridge_approximation.compute_ridges(CGAL::BLUE_RIDGE, ii, tag_order);
+ ridge_approximation.compute_ridges(CGAL::RED_RIDGE, ii, tag_order);
+ ridge_approximation.compute_ridges(CGAL::CREST_RIDGE, ii, tag_order);
+ // or do it at once
+ // ridge_approximation.compute_all_ridges(ii, tag_order);
+
+ std::vector::iterator iter_lines = ridge_lines.begin(),
+ iter_end = ridge_lines.end();
+ //OpenGL output
+ for (;iter_lines!=iter_end;iter_lines++) (*iter_lines)->dump_4ogl(out_4ogl);
+
+ //verbose txt output
+ if (verbose)
+ for (iter_lines = ridge_lines.begin();iter_lines!=iter_end;iter_lines++)
+ out_verb << **iter_lines;
+
+ //---------------------------------------------------------------------------
+ // UMBILICS
+ //--------------------------------------------------------------------------
+ Umbilic_approximation umbilic_approximation(P,
+ vertex2k1_pm, vertex2k2_pm,
+ vertex2d1_pm, vertex2d2_pm);
+ std::vector umbilics;
+ back_insert_iterator > umb_it(umbilics);
+ umbilic_approximation.compute(umb_it, umb_size);
+
+ std::vector::iterator iter_umb = umbilics.begin(),
+ iter_umb_end = umbilics.end();
+ // output
+ std::cout << "nb of umbilics " << umbilics.size() << std::endl;
+ for (;iter_umb!=iter_umb_end;iter_umb++) std::cout << **iter_umb;
+}
+\end{ccExampleCode}
+
+For figure \ref{ellipsoid_ridges_example}, the data are computed with
+the call
+\begin{ccExampleCode}
+./blind -f data/ellipsoid_u_0.02.off -d4 -m4 -a3 -t3
+\end{ccExampleCode}
+and the visualization with
+\begin{ccExampleCode}
+ ../../demo/Ridges_3/introspect-qt data/ellipsoid_u_0.02.off data/data_ellipsoid_u_0.02.offRIDGES-d4-m4-t4-a3-p0.4ogl.txt 0 0
+\end{ccExampleCode}
+In addition, the four wedge umbilics are detected, the standart output is
+\begin{ccExampleCode}
+nb of umbilics 4
+Umbilic at location (-0.80899 0.00426003 0.293896) of type wedge
+Umbilic at location (-0.811197 0.0122098 -0.292259) of type wedge
+Umbilic at location (0.808372 -0.00551307 -0.29431) of type wedge
+Umbilic at location (0.81413 0.0018689 0.290339) of type wedge
+\end{ccExampleCode}
+
+
+\begin{figure}[!ht]
+\begin{ccTexOnly}
+\centerline{
+\includegraphics[width=.5\linewidth]{Ridges_3/ellipsoid_ridges}}
+\end{ccTexOnly}
+\caption{Ridges on the ellipsoid, normals pointing outward.
+ Color coding~: \ccc{BLUE_ELLIPTIC_RIDGE} are blue,
+\ccc{BLUE_HYPERBOLIC_RIDGE} are green, \ccc{RED_ELLIPTIC_RIDGE} are red and
+\ccc{RED_HYPERBOLIC_RIDGE} are yellow. }
+\label{ellipsoid_ridges_example}
+\begin{ccHtmlOnly}
+
+
+\end{ccHtmlOnly}
+\end{figure}
+
+
+Figures \ref{fig:mechanical_crest_filtered-intro}, illustrates the
+filtering of crest ridges on a mechanical part. Data are computed with
+\begin{ccExampleCode}
+./blind -f data/mecanic.off -d4 -m4 -a4 -t4
+\end{ccExampleCode}
+The last parameters of the visualization program of the demo are
+threshold for the strength and the sharpness. This enables the three
+different images to be produced with the same data.
+
+\begin{figure}[htb]
+\begin{ccTexOnly}
+\centerline{
+\includegraphics[width=.45\linewidth]{Ridges_3/mecanic-sub1_crest-jpg}
+\includegraphics[width=.45\linewidth]{Ridges_3/mecanic-sub1_crestTweight1-jpg}}
+\centerline{
+\includegraphics[width=.6\linewidth]{Ridges_3/mecanic-sub1_crestTweight1Tsharp7-jpg}}
+\end{ccTexOnly}
+\caption{Mechanical part (37k pts): (a) All crest lines, (b) crests filtered
+with the strength threshold 1 and (c) crests filtered with the sharpness threshold 100 000.
+%%
+Notice that any point on a flat or cylindrical part lies on two
+ridges, so that the noise observed on the top two Figs. is
+unavoidable. It is however easily filtered out with the sharpness on
+the bottom figure.}
+\label{fig:mechanical_crest_filtered-intro}
+\begin{ccHtmlOnly}
+
+
+
+
+
+
+\end{ccHtmlOnly}
+\end{figure}
diff --git a/Ridges_3/doc_tex/Ridges_3_ref/Ridge_approximation.tex b/Ridges_3/doc_tex/Ridges_3_ref/Ridge_approximation.tex
index a4a0250ddb0..784da4cf972 100644
--- a/Ridges_3/doc_tex/Ridges_3_ref/Ridge_approximation.tex
+++ b/Ridges_3/doc_tex/Ridges_3_ref/Ridge_approximation.tex
@@ -11,9 +11,8 @@
% +------------------------------------------------------------------------+
-\begin{ccRefClass}{Ridge_approximation< TriangularPolyhedralSurface, OutputIt,
-Vertex2FTPropertyMap , Vertex2VectorPropertyMap>} %% add template
-arg's if necessary
+\begin{ccRefClass}{Ridge_approximation}
+%% add templatearg's if necessary
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
%% \ccHtmlIndexC[class]{} %% add further index entries
@@ -29,7 +28,7 @@ ridges of a triangular polyhedral surface.
The class \ccRefName\ has four template parameters.
\ccc{TriangularPolyhedralSurface} provides the surface.
Parameter \ccc{OutputIt} is a stl Output Iterator which
-\ccc{value_type} is \ccc{CGAL::Ridge_line*}. Parameters \ccc{Vertex2FTPropertyMap}
+\ccc{value_type} is \ccc{Ridge_line*}. Parameters \ccc{Vertex2FTPropertyMap}
and \ccc{Vertex2VectorPropertyMap} provides the differential properties of
the surface associated to its vertices.
@@ -53,8 +52,8 @@ hyperbolic ridges.}
\ccCreation
\ccCreationVariable{ridge_approximation} %% choose variable name, given by \ccVar
-\ccConstructor{Ridge_approximation(TriangularPolyhedralSurface &P,
- Vertex2FTPropertyMap& vertex2k1_pm,
+\ccConstructor{Ridge_approximation(TriangularPolyhedralSurface &P,
+ Vertex2FTPropertyMap& vertex2k1_pm,
Vertex2FTPropertyMap& vertex2k2_pm,
Vertex2FTPropertyMap& vertex2b0_pm,
Vertex2FTPropertyMap& vertex2b3_pm,
@@ -62,8 +61,7 @@ hyperbolic ridges.}
Vertex2FTPropertyMap& vertex2P2_pm,
Vertex2VectorPropertyMap& vertex2d1_pm,
Vertex2VectorPropertyMap& vertex2d2_pm);}
- {Precondition : check if all faces of P are
- triangular. }
+ {Precondition : all faces of P may be triangular. }
%\ccOperations
diff --git a/Ridges_3/doc_tex/Ridges_3_ref/Ridge_line.tex b/Ridges_3/doc_tex/Ridges_3_ref/Ridge_line.tex
index 6855ef048c8..212bf94e36f 100644
--- a/Ridges_3/doc_tex/Ridges_3_ref/Ridge_line.tex
+++ b/Ridges_3/doc_tex/Ridges_3_ref/Ridge_line.tex
@@ -25,11 +25,11 @@ The class \ccRefName\ stores the description of a ridge line.
\ccTypes
-\ccNestedType{typedef typename TriangularPolyhedralSurface::Traits::FT FT;}{}
+\ccTypedef{typedef typename TriangularPolyhedralSurface::Traits::FT FT;}{}
\ccGlue
-\ccNestedType{typedef typename TriangularPolyhedralSurface::Halfedge_handle Halfedge_handle;}{}
+\ccTypedef{typedef typename TriangularPolyhedralSurface::Halfedge_handle Halfedge_handle;}{}
\ccGlue
-\ccNestedType{ typedef std::pair< Halfedge_handle, FT> ridge_he;}{}
+\ccTypedef{ typedef std::pair< Halfedge_handle, FT> ridge_he;}{}
\ccCreation
diff --git a/Ridges_3/doc_tex/Ridges_3_ref/Umbilic.tex b/Ridges_3/doc_tex/Ridges_3_ref/Umbilic.tex
index bebd96f3916..4ed0f0eff8f 100644
--- a/Ridges_3/doc_tex/Ridges_3_ref/Umbilic.tex
+++ b/Ridges_3/doc_tex/Ridges_3_ref/Umbilic.tex
@@ -11,7 +11,7 @@
% +------------------------------------------------------------------------+
-\begin{ccRefClass}{Umbilic< TriangularPolyhedralSurface >} %% add template arg's if necessary
+\begin{ccRefClass}{Umbilic} %% add template arg's if necessary
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
%% \ccHtmlIndexC[class]{} %% add further index entries
diff --git a/Ridges_3/doc_tex/Ridges_3_ref/Umbilic_approximation.tex b/Ridges_3/doc_tex/Ridges_3_ref/Umbilic_approximation.tex
index 8fee03f4ec7..0852d2f10c8 100644
--- a/Ridges_3/doc_tex/Ridges_3_ref/Umbilic_approximation.tex
+++ b/Ridges_3/doc_tex/Ridges_3_ref/Umbilic_approximation.tex
@@ -11,8 +11,8 @@
% +------------------------------------------------------------------------+
-\begin{ccRefClass}{Umbilic_approximation< TriangularPolyhedralSurface,
- OutputIt, Vertex2FTPropertyMap, Vertex2VectorPropertyMap > } %% add template arg's if necessary
+\begin{ccRefClass}{Umbilic_approximation}
+ %% add template arg's if necessary
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
%% \ccHtmlIndexC[class]{} %% add further index entries
diff --git a/Ridges_3/doc_tex/Ridges_3_ref/Vertex2Data_Property_Map_with_std_map.tex b/Ridges_3/doc_tex/Ridges_3_ref/Vertex2Data_Property_Map_with_std_map.tex
index 67e417af91e..7757106202c 100644
--- a/Ridges_3/doc_tex/Ridges_3_ref/Vertex2Data_Property_Map_with_std_map.tex
+++ b/Ridges_3/doc_tex/Ridges_3_ref/Vertex2Data_Property_Map_with_std_map.tex
@@ -11,7 +11,7 @@
% +------------------------------------------------------------------------+
-\begin{ccRefClass}{Vertex2Data_Property_Map_with_std_map < TriangularPolyhedralSurface >} %% add template arg's if necessary
+\begin{ccRefClass}{Vertex2Data_Property_Map_with_std_map} %% add template arg's if necessary
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
%% \ccHtmlIndexC[class]{} %% add further index entries
diff --git a/Ridges_3/doc_tex/Ridges_3_ref/intro.tex b/Ridges_3/doc_tex/Ridges_3_ref/intro.tex
index 76f7b173794..a5a325eb94d 100644
--- a/Ridges_3/doc_tex/Ridges_3_ref/intro.tex
+++ b/Ridges_3/doc_tex/Ridges_3_ref/intro.tex
@@ -31,15 +31,15 @@
\ccRefIdfierPage{CGAL::Umbilic_type}\\
\subsection*{Classes}
-\ccRefIdfierPage{CGAL::Ridge_line}\\
-\ccRefIdfierPage{CGAL::Umbilic}\\
-\ccRefIdfierPage{CGAL::Ridge_approximation}\\
-\ccRefIdfierPage{CGAL::Umbilic_approximation}\\
+\ccRefIdfierPage{CGAL::Ridge_line}\\
+\ccRefIdfierPage{CGAL::Umbilic}\\
+\ccRefIdfierPage{CGAL::Ridge_approximation}\\
+\ccRefIdfierPage{CGAL::Umbilic_approximation}\\
\subsection*{Global Functions}
-The insert operator is overloaded for the classes \ccc{Ridge_line} and
+The insert operator $<<$ is overloaded for the classes \ccc{Ridge_line} and
\ccc{Umbilic}.
-\ccRefIdfierPage{CGAL::operator<<}\\
+%\ccRefIdfierPage{CGAL::operator<<}\\
% +------------------------------------------------------------------------+
%%RefPage: end of main body, begin of footer
diff --git a/Ridges_3/examples/Ridges_3/README b/Ridges_3/examples/Ridges_3/README
index a6d711dbe4b..4c468b7196c 100644
--- a/Ridges_3/examples/Ridges_3/README
+++ b/Ridges_3/examples/Ridges_3/README
@@ -18,6 +18,8 @@ Usage is : blind with options
0 means collect enough rings to make appro possible
k>=1 fixes the nb of rings to be collected
"p:npoints ", //# points
+ "t:tagorder ", //order of diff quant to compute ridge type :
+ // = Tag_3 or Tag_4
0 means this option is not considered, this is the default
n>=1 fixes the nb of points to be used
"u:umb_size ", //size of umbilic patches (as multiple of 1ring size)
@@ -30,13 +32,13 @@ Note : if the nb of collected points is less than the required min number of
EXAMPLES
---------------------------------------------------------
-./blind -f data/ellipsoid_u_0.02.off -d4 -m4 -a3 -t4 -v
+./blind -f data/ellipsoid_u_0.02.off -d4 -m4 -a3 -t3 -v
visu with:
../../demo/Ridges_3/introspect-qt data/ellipsoid_u_0.02.off data/data_ellipsoid_u_0.02.offRIDGES-d4-m4-t4-a3-p0.4ogl.txt 0 0
-
+crest -f data/mecanic.off -d4 -m4 -a4 -t4
blind -f data/models/aim@shape/brain.off -d4 -m4 -a3 -t4
diff --git a/Ridges_3/examples/Ridges_3/blind.cpp b/Ridges_3/examples/Ridges_3/blind.cpp
index 59acece509c..3d8261af4c5 100644
--- a/Ridges_3/examples/Ridges_3/blind.cpp
+++ b/Ridges_3/examples/Ridges_3/blind.cpp
@@ -7,7 +7,6 @@
#include
#include
#include
-//#include
#include
#include
@@ -22,10 +21,11 @@
#include "PolyhedralSurf_rings.h"
#include "options.h"//parsing command line
-typedef double FT;
-typedef CGAL::Cartesian Kernel;
+typedef PolyhedralSurf::Traits Kernel;
+typedef Kernel::FT FT;
typedef Kernel::Point_3 Point_3;
typedef Kernel::Vector_3 Vector_3;
+
typedef PolyhedralSurf::Vertex Vertex;
typedef PolyhedralSurf::Vertex_handle Vertex_handle;
typedef PolyhedralSurf::Vertex_iterator Vertex_iterator;
@@ -77,7 +77,7 @@ static const char *const optv[] = {
"a:nrings ", //# rings
"p:npoints ", //# points
"t:tagorder ", //order of diff quant to compute ridge type :
- // = 3 or 4
+ // = Tag_3 or Tag_4
"u:umb_size ", //size of umbilic patches (as multiple of 1ring size)
"v|",//verbose?
NULL
@@ -285,7 +285,6 @@ int main(int argc, char *argv[])
//---------------------------------------------------------------------------
//Ridges
//--------------------------------------------------------------------------
- // Differential_quantities diff_q;
Ridge_approximation ridge_approximation(P,
vertex2k1_pm, vertex2k2_pm,
vertex2b0_pm, vertex2b3_pm,
@@ -297,8 +296,8 @@ int main(int argc, char *argv[])
//Find BLUE_RIDGE, RED_RIDGE, CREST or all ridges
// ridge_approximation.compute_ridges(CGAL::BLUE_RIDGE, ii, tag_order);
// ridge_approximation.compute_ridges(CGAL::RED_RIDGE, ii, tag_order);
- //ridge_approximation.compute_ridges(CGAL::CREST_RIDGE, ii, tag_order);
- ridge_approximation.compute_all_ridges(ii, tag_order);
+ ridge_approximation.compute_ridges(CGAL::CREST_RIDGE, ii, tag_order);
+ // ridge_approximation.compute_all_ridges(ii, tag_order);
std::vector::iterator iter_lines = ridge_lines.begin(),
iter_end = ridge_lines.end();
diff --git a/Ridges_3/include/CGAL/Ridges.h b/Ridges_3/include/CGAL/Ridges.h
index a2eabc0604c..bd8f73091fb 100644
--- a/Ridges_3/include/CGAL/Ridges.h
+++ b/Ridges_3/include/CGAL/Ridges.h
@@ -346,8 +346,6 @@ compute_ridges(Ridge_interrogation_type r_type, OutputIt ridge_lines_it, Tag_ord
{
tag_order = ord;
- CGAL_precondition( (r_type == BLUE_RIDGE) || (r_type == RED_RIDGE) || (r_type == CREST_RIDGE) );
-
//reinit the is_visited_map
Facet_iterator itb = P->facets_begin(), ite = P->facets_end();
for(;itb!=ite;itb++) is_visited_map[itb] = false;