mirror of https://github.com/CGAL/cgal
two_passes -> smoother_hole_filling
update according to the review of the small feature
This commit is contained in:
parent
db087ba7d9
commit
3254525b17
|
|
@ -163,7 +163,7 @@ The reconstruction is devised to solve for an implicit function which is an appr
|
|||
\end{figure}
|
||||
\end{center}
|
||||
|
||||
In case of large holes the algorithm still closes them all but the resulting piecewise linear implicit function may exhibit large triangle patches and sharp creases as the 3D Delaunay triangulation used for solving is very coarse where the holes are filled. This can be avoided by a two pass approach. The first pass for a subset of the points serves to get an approximation of the surface at the holes. This surface then serves to compute a finer 3D Delaunay triangulation for the second pass with the full set of points.
|
||||
In case of large holes the algorithm still closes them all but the resulting piecewise linear implicit function may exhibit large triangle patches and sharp creases as the 3D Delaunay triangulation used for solving is very coarse where the holes are filled. This can be avoided by a two pass approach. The first pass for a subset of the points serves to get an approximation of the surface at the holes. This surface then serves to compute a smoother 3D Delaunay triangulation for the second pass with the full set of points.
|
||||
|
||||
\begin{center}
|
||||
\begin{ccTexOnly}
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ The main operations are:
|
|||
Returns a sphere bounding the inferred surface.
|
||||
}
|
||||
|
||||
\ccFunction{bool compute_implicit_function(bool two_passes = false);}
|
||||
\ccFunction{bool compute_implicit_function(bool smoother_hole_filling = false);}
|
||||
{
|
||||
The function \ccc{compute_implicit_function}() must be called after each insertion of oriented points. It computes the piecewise linear scalar function operator() by: applying Delaunay refinement, solving for operator() at each vertex of the triangulation with a sparse linear solver, and shifting and orienting operator() such that it is 0 at all input points and negative inside the inferred surface. \\
|
||||
The optional parameter \ccc{two_passes} controls if the Delaunay refinement is done for the input points, or for an approximation of the surface obtained from a first pass of the algorithm on a sample of the points.
|
||||
The optional parameter \ccc{smoother_hole_filling} controls if the Delaunay refinement is done for the input points, or for an approximation of the surface obtained from a first pass of the algorithm on a sample of the points.
|
||||
Returns false if the linear solver fails.\\
|
||||
The sparse solver used for this step is a parameter of the function. We recommend to use the class \ccc{CGAL::Eigen_solver_traits<T>}
|
||||
instantiated with the iterative conjugate gradient solver \ccc{Eigen::ConjugateGradient} for \ccc{double} (which is the default when \ccThirdPartyEigen\ is available and \ccc{CGAL_EIGEN3_ENABLED} is defined).
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ Creates a Poisson implicit function from the [first, beyond) range of points.
|
|||
Returns a sphere bounding the inferred surface.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{template<class SparseLinearAlgebraTraits_d> bool compute_implicit_function(SparseLinearAlgebraTraits_d solver = SparseLinearAlgebraTraits_d(), bool two_passes = false);}
|
||||
\ccMethod{template<class SparseLinearAlgebraTraits_d> bool compute_implicit_function(SparseLinearAlgebraTraits_d solver = SparseLinearAlgebraTraits_d(), bool smoother_hole_filling = false);}
|
||||
{
|
||||
The function \ccc{compute_implicit_function}() must be called after the insertion of oriented points. It computes the piecewise linear scalar function operator() by: applying Delaunay refinement, solving for operator() at each vertex of the triangulation with a sparse linear solver, and shifting and orienting operator() such that it is 0 at all input points and negative inside the inferred surface.
|
||||
\ccCommentHeading{Template parameters} \\
|
||||
|
|
@ -140,7 +140,7 @@ If \eigen\ 3.1 (or greater) is available and \ccc{CGAL_EIGEN3_ENABLED} is define
|
|||
\ccCommentHeading{Returns} false if the linear solver fails.
|
||||
\ccCommentHeading{Parameters} \\
|
||||
\ccc{solver}: sparse linear solver.\\
|
||||
\ccc{two_passes} controls if the Delaunay refinement is done for the input points, or for an approximation of the surface obtained from a first pass of the algorithm on a sample of the points.\\
|
||||
\ccc{smoother_hole_filling} controls if the Delaunay refinement is done for the input points, or for an approximation of the surface obtained from a first pass of the algorithm on a sample of the points.\\
|
||||
Returns false if the linear solver fails.\\
|
||||
}
|
||||
\ccGlue
|
||||
|
|
|
|||
|
|
@ -448,9 +448,9 @@ public:
|
|||
}
|
||||
|
||||
template <class SparseLinearAlgebraTraits_d>
|
||||
bool compute_implicit_function(SparseLinearAlgebraTraits_d solver, bool two_passes = false)
|
||||
bool compute_implicit_function(SparseLinearAlgebraTraits_d solver, bool smoother_hole_filling = false)
|
||||
{
|
||||
if (two_passes)
|
||||
if (smoother_hole_filling)
|
||||
return compute_implicit_function<SparseLinearAlgebraTraits_d,Poisson_visitor>(solver,Poisson_visitor(),0.02,5);
|
||||
else
|
||||
return compute_implicit_function<SparseLinearAlgebraTraits_d,Poisson_visitor>(solver,Poisson_visitor());
|
||||
|
|
@ -459,19 +459,19 @@ public:
|
|||
#ifdef CGAL_EIGEN3_ENABLED
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant provides the default sparse linear traits class = Eigen_solver_traits.
|
||||
bool compute_implicit_function(bool two_passes = false)
|
||||
bool compute_implicit_function(bool smoother_hole_filling = false)
|
||||
{
|
||||
typedef Eigen_solver_traits<Eigen::ConjugateGradient<Eigen_sparse_symmetric_matrix<double>::EigenType> > Solver;
|
||||
return compute_implicit_function<Solver>(Solver(), two_passes);
|
||||
return compute_implicit_function<Solver>(Solver(), smoother_hole_filling);
|
||||
}
|
||||
/// @endcond
|
||||
#else
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant provides the default sparse linear traits class = Taucs_symmetric_solver_traits.
|
||||
bool compute_implicit_function(bool two_passes = false)
|
||||
bool compute_implicit_function(bool smoother_hole_filling = false)
|
||||
{
|
||||
typedef Taucs_symmetric_solver_traits<double> Solver;
|
||||
return compute_implicit_function<Solver>(Solver(), two_passes);
|
||||
return compute_implicit_function<Solver>(Solver(), smoother_hole_filling);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue