Fix conflicts

This commit is contained in:
Maxime Gimeno 2018-12-21 09:02:26 +01:00
commit 95c2045eb6
89 changed files with 912 additions and 257 deletions

View File

@ -1297,7 +1297,7 @@ void Scene::refine_loop()
return;
}
std::cout << "Loop subdivision...";
CGAL::Subdivision_method_3::Loop_subdivision(*m_pPolyhedron, 1);
CGAL::Subdivision_method_3::Loop_subdivision(*m_pPolyhedron);
std::cout << "done (" << m_pPolyhedron->size_of_facets() << " facets)" << std::endl;
clear_internal_data();

View File

@ -1,5 +1,5 @@
#include <iostream>
#include <boost/iterator.hpp>
#include <boost/iterator/iterator_adaptor.hpp>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/AABB_tree.h>

View File

@ -31,10 +31,18 @@
#include <boost/type_traits/is_same.hpp>
#include <boost/variant/apply_visitor.hpp>
#if BOOST_VERSION >= 105000
#include <boost/heap/priority_queue.hpp>
# if defined(BOOST_MSVC)
# pragma warning(push)
# pragma warning(disable: 4996)
# endif
# include <boost/heap/priority_queue.hpp>
# if defined(BOOST_MSVC)
# pragma warning(pop)
# endif
#else
#include <queue>
# include <queue>
#endif
#include <CGAL/assertions.h>
namespace CGAL {

View File

@ -325,27 +325,27 @@ efficiency.
The following example illustrates the construction of `AlgebraicKernel_d_1::Algebraic_real_1`
using `AlgebraicKernel_d_1::Construct_algebraic_real_1`:
<SMALL>\cgalExample{Algebraic_kernel_d/Construct_algebraic_real_1.cpp}</SMALL>
\cgalExample{Algebraic_kernel_d/Construct_algebraic_real_1.cpp}
\subsection CGALAK1Solving Solving Univariate Polynomials
The following example illustrates the construction of `AlgebraicKernel_d_1::Algebraic_real_1`
using `AlgebraicKernel_d_1::Solve_1`: <SMALL>\cgalExample{Algebraic_kernel_d/Solve_1.cpp} </SMALL>
using `AlgebraicKernel_d_1::Solve_1`: \cgalExample{Algebraic_kernel_d/Solve_1.cpp}
\subsection CGALAK1EGCompare_1 Comparison and Approximation of Algebraic Real Numbers
The following example illustrates the comparison of `AlgebraicKernel_d_1::Algebraic_real_1` numbers:
<SMALL>\cgalExample{Algebraic_kernel_d/Compare_1.cpp}</SMALL>
\cgalExample{Algebraic_kernel_d/Compare_1.cpp}
\subsection CGALAK1EGIsolate_1 Isolation of Algebraic Real Numbers with respect to roots of other polynomials
The following example illustrates the isolation of `AlgebraicKernel_d_1::Algebraic_real_1` numbers:
<SMALL>\cgalExample{Algebraic_kernel_d/Isolate_1.cpp}</SMALL>
\cgalExample{Algebraic_kernel_d/Isolate_1.cpp}
\subsection CGALAK1EGSign_at_1 Interplay with Polynomials
The following example illustrates the sign evaluation of `AlgebraicKernel_d_1::Algebraic_real_1` numbers in polynomials:
<SMALL>\cgalExample{Algebraic_kernel_d/Sign_at_1.cpp}</SMALL>
\cgalExample{Algebraic_kernel_d/Sign_at_1.cpp}
\section Algebraic_kernel_dDesign Design and Implementation History

View File

@ -1524,17 +1524,11 @@ compute_intermediate_values_and_slices() const {
#if CGAL_ACK_DEBUG_FLAG
CGAL_ACK_DEBUG_PRINT << "Prepare intermediate slices.." << std::flush;
#endif
std::size_t size = event_x_coordinates().size()+1;
this->ptr()->intermediate_values=std::vector<Lazy_bound>();
this->ptr()->intermediate_slices=std::vector<Lazy_status_line_CPA_1>();
for(size_type i=0;
i<=static_cast<size_type>(event_x_coordinates().size());
i++) {
this->ptr()->intermediate_values.get().push_back(Lazy_bound());
this->ptr()->intermediate_slices.get().push_back
(Lazy_status_line_CPA_1());
}
this->ptr()->intermediate_values.get().resize(size);
this->ptr()->intermediate_slices.get().resize(size);
#if CGAL_ACK_DEBUG_FLAG
CGAL_ACK_DEBUG_PRINT << "done" << std::endl;
#endif

View File

@ -2209,10 +2209,10 @@ representing line segments.
A polyline can be constructed given one of the following inputs:
- <b>A range of \a points</b>, where two succeeding points in the
- <b>A range of <em>points</em></b>, where two succeeding points in the
range represent the endpoints of a segment of the polyline.
- <b>A range of \a segments</b>. Note that , if the types
- <b>A range of <em>segments</em></b>. Note that , if the types
`SubcurveTraits_2::Curve_2` and `SubcurveTraits_2::X_monotone_curve_2` are
not the same, then when `Make_x_monotone_2` is invoked the segments
that compose the polyline will be broken into \f$x\f$-monotone

View File

@ -167,7 +167,7 @@ virtual void before_detach ();
issued immediately after the observer has been detached from its
arrangement instance.
*/
virtual void after_attach ();
virtual void after_detach ();
/// @}

View File

@ -197,7 +197,7 @@ function(run_test_alt name datafile)
set(command ${name} ${datafile} ${ARGN})
string(MAKE_C_IDENTIFIER "${name} ${ARGV4} ${ARGV5}" test_name)
add_test(NAME ${test_name} COMMAND ${command}
WORKING_DIRECTORY ${CGAL_CURRENT_SOURCE_DIR})
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
set_property(TEST "${test_name}"
APPEND PROPERTY DEPENDS "compilation_of__${name}")
if(POLICY CMP0066) # CMake 3.7 or later

View File

@ -708,6 +708,7 @@ user might encounter.
## I/O Functions ##
- \link PkgBGLIOFct CGAL::read_off() \endlink
- \link PkgBGLIOFct CGAL::write_off() \endlink
- \link PkgBGLIOFct CGAL::write_wrl() \endlink
*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -25,10 +25,10 @@ int main()
Point_3(1,-1,-1),
Point_3(1,1,-1),
Point_3(-1,1,-1),
Point_3(-1,1,1),
Point_3(-1,-1,1),
Point_3(1,-1,1),
Point_3(1,1,1),
Point_3(-1,1,1),
sm
);
@ -45,10 +45,10 @@ int main()
Point_3(0.5,-0.5,-0.5),
Point_3(0.5,0.5,-0.5),
Point_3(-0.5,0.5,-0.5),
Point_3(-0.5,0.5,0.5),
Point_3(-0.5,-0.5,0.5),
Point_3(0.5,-0.5,0.5),
Point_3(0.5,0.5,0.5),
Point_3(-0.5,0.5,0.5),
poly
);
pvertex_descriptor pvd = * vertices(pmesh).first;

View File

@ -585,8 +585,16 @@ add_face(const VertexRange& vr, Graph& g)
std::vector<vertex_descriptor> vertices(vr.begin(), vr.end()); // quick and dirty copy
unsigned int n = (unsigned int)vertices.size();
//check that every vertex is unique
std::sort(vertices.begin(), vertices.end());
if(std::adjacent_find(vertices.begin(), vertices.end()) != vertices.end()){
return boost::graph_traits<Graph>::null_face();
}
std::copy(vr.begin(), vr.end(), vertices.begin());
// don't allow degenerated faces
CGAL_assertion(n > 2);
if(n <= 2){
return boost::graph_traits<Graph>::null_face();
}
std::vector<halfedge_descriptor> halfedges(n);
std::vector<bool> is_new(n);

View File

@ -837,6 +837,8 @@ make_quad(const P& p0, const P& p1, const P& p2, const P& p3, Graph& g)
* \ingroup PkgBGLHelperFct
* \brief Creates an isolated hexahedron
* with its vertices initialized to `p0`, `p1`, ...\ , and `p7`, and adds it to the graph `g`.
* \image html hexahedron.png
* \image latex hexahedron.png
* \returns the halfedge that has the target vertex associated with `p0`, in the face with the vertices with the points `p0`, `p1`, `p2`, and `p3`.
**/
template<typename Graph, typename P>
@ -868,16 +870,16 @@ make_hexahedron(const P& p0, const P& p1, const P& p2, const P& p3,
ppmap[v6] = p6;
ppmap[v7] = p7;
halfedge_descriptor ht = internal::make_quad(v7, v4, v5, v6, g);
halfedge_descriptor hb = prev(internal::make_quad(v1, v0, v3, v2, g),g);
halfedge_descriptor ht = internal::make_quad(v4, v5, v6, v7, g);
halfedge_descriptor hb = prev(internal::make_quad(v0, v3, v2, v1, g),g);
for(int i=0; i <4; i++){
halfedge_descriptor h = halfedge(add_edge(g),g);
set_target(h,target(hb,g),g);
set_next(h,opposite(hb,g),g);
set_next(opposite(next(ht,g),g),h,g);
set_next(opposite(prev(ht,g),g),h,g);
h = opposite(h,g);
set_target(h,target(ht,g),g);
set_next(h,opposite(ht,g),g);
set_target(h,source(prev(ht,g),g),g);
set_next(h,opposite(next(next(ht,g),g),g),g);
set_next(opposite(next(hb,g),g),h,g);
hb = next(hb,g);
ht = prev(ht,g);
@ -892,6 +894,8 @@ make_hexahedron(const P& p0, const P& p1, const P& p2, const P& p3,
* \ingroup PkgBGLHelperFct
* \brief Creates an isolated tetrahedron
* with its vertices initialized to `p0`, `p1`, `p2`, and `p3`, and adds it to the graph `g`.
* \image html tetrahedron.png
* \image latex tetrahedron.png
* \returns the halfedge that has the target vertex associated with `p0`, in the face with the vertices with the points `p0`, `p1`, and `p2`.
**/
template<typename Graph, typename P>

View File

@ -36,6 +36,89 @@
#include <CGAL/boost/graph/named_function_params.h>
namespace CGAL {
/*!
\ingroup PkgBGLIOFct
writes the graph `g` in the wrl format (VRML 2.0).
\cgalNamedParamsBegin
* \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `g`.
* If this parameter is omitted, an internal property map for
* `CGAL::vertex_point_t` should be available in `FaceGraph`\cgalParamEnd
* \cgalNamedParamsEnd
*/
template <typename FaceGraph, typename NamedParameters>
bool write_wrl(std::ostream& os,
const FaceGraph& g,
const NamedParameters& np)
{
typedef typename boost::graph_traits<FaceGraph>::vertex_descriptor vertex_descriptor;
typedef typename boost::graph_traits<FaceGraph>::face_descriptor face_descriptor;
typedef typename boost::graph_traits<FaceGraph>::vertices_size_type vertices_size_type;
typename Polygon_mesh_processing::GetVertexPointMap<FaceGraph, NamedParameters>::const_type
vpm = choose_param(get_param(np, internal_np::vertex_point),
get_const_property_map(CGAL::vertex_point, g));
boost::container::flat_map<vertex_descriptor,vertices_size_type> reindex;
int n = 0;
os << "#VRML V2.0 utf8\n"
"Group {\n"
"children [\n"
"Shape {\n"
"appearance DEF A1 Appearance {\n"
"material Material {\n"
"diffuseColor .6 .5 .9\n"
"}\n"
"}\n"
"appearance\n"
"Appearance {\n"
"material DEF Material Material {}\n"
"}\n"
"}\n"
"Group {\n"
"children [\n"
"Shape {\n"
"appearance Appearance { material USE Material }\n"
"geometry IndexedFaceSet {\n"
"convex FALSE\n"
"solid FALSE\n"
"coord Coordinate {\n"
"point [\n";
BOOST_FOREACH(vertex_descriptor v, vertices(g)){
os << get(vpm,v) << ",\n";
reindex[v]=n++;
}
os << "] #point\n"
"} #coord Coordinate\n"
"coordIndex [\n";
BOOST_FOREACH(face_descriptor f, faces(g)){
BOOST_FOREACH(vertex_descriptor v, vertices_around_face(halfedge(f,g),g)){
os << reindex[v] << ",";
}
os << "-1,\n";
}
os << "] #coordIndex\n"
"} #geometry\n"
"} #Shape\n"
"] #children\n"
"} #group\n"
"]\n"
"}\n";
return os.good();
}
template <typename FaceGraph>
bool write_wrl(std::ostream& os,
const FaceGraph& g)
{
return write_wrl(os, g,
parameters::all_default());
}
/*!
\ingroup PkgBGLIOFct
writes the graph `g` in the OFF format.

View File

@ -97,6 +97,8 @@ create_single_source_cgal_program( "test_graph_traits.cpp" )
create_single_source_cgal_program( "test_Properties.cpp" )
create_single_source_cgal_program( "test_wrl.cpp" )
if(OpenMesh_FOUND)
target_link_libraries( test_clear PRIVATE ${OPENMESH_LIBRARIES})
target_link_libraries( test_Euler_operations PRIVATE ${OPENMESH_LIBRARIES})

View File

@ -132,7 +132,7 @@ int main()
assert(CGAL::is_triangle_mesh(m));
assert(CGAL::is_valid_polygon_mesh(m));
m.clear();
hd = CGAL::make_hexahedron(a,b,c,d,aa,bb,cc,dd,m);
hd = CGAL::make_hexahedron(a,b,c,d,dd,aa,bb,cc,m);
assert(CGAL::is_hexahedron(hd,m));
assert(CGAL::is_quad_mesh(m));
assert(CGAL::is_valid_polygon_mesh(m));

18
BGL/test/BGL/test_wrl.cpp Normal file
View File

@ -0,0 +1,18 @@
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/boost/graph/helpers.h>
#include <CGAL/boost/graph/io.h>
#include <iostream>
typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_3 Point;
typedef CGAL::Surface_mesh<Point> Mesh;
int main()
{
Mesh sm;
CGAL::make_tetrahedron(Point(0,0,0), Point(1,0,0), Point(1,1,0), Point(0,0,1), sm);
CGAL::write_wrl(std::cout, sm);
return 0;
}

View File

@ -74,7 +74,7 @@ polygon vertices is referred to as the polygon <B>(outer) boundary</B>.
<LI>A polygon whose curves are pairwise disjoint in their interior, and whose vertices' degree equals two is defined as a <B>Simple polygon</B>. Such a polygon has a well-defined interior and exterior and is topologically equivalent to a disk. Note that while traversing the edges of the relatively simple polygon illustrated above (B), no curve is crossed over.
<LI>A <B>Relatively simple</B> polygon allows vertices with a degree\f$\gt 2\f$, but all of its edges are disjoint in their interior. Furthermore, it must be an orientable polygon. Namely when it is inserted into an arrangement and its outer boundary is traversed, the same face is adjacent to all of the halfedges (no crossing over any curve during the traversal).
<LI>A <B>Relatively simple</B> polygon allows vertices with a degree\f$> 2\f$, but all of its edges are disjoint in their interior. Furthermore, it must be an orientable polygon. Namely when it is inserted into an arrangement and its outer boundary is traversed, the same face is adjacent to all of the halfedges (no crossing over any curve during the traversal).
Note that while polygon C has the same curves as polygon B, traversal of the curves leads to crossing over a previously traversed curve, and is therefore neither simple nor relatively simple.
<LI>A polygon in our context must be relatively simple and its outer boundary vertices must be ordered in a counterclockwise direction around the interior of the polygon.

View File

@ -13,28 +13,28 @@ x\in\E^d \mid x^T E x + x^T e + \eta\leq 0 \}\f$, where \f$ E\f$ is some
positive definite matrix from the set \f$ \mathbb{R}^{d\times d}\f$, \f$ e\f$ is some
real \f$ d\f$-vector, and \f$ \eta\in\mathbb{R}\f$. A pointset \f$ P\subseteq \E^d\f$ is
called <I>full-dimensional</I> if its affine hull has dimension \f$ d\f$.
For a finite, full-dimensional pointset \f$ P\f$ we denote by \f$ \mel(P)\f$ the
For a finite, full-dimensional pointset \f$ P\f$ we denote by \f$ (P)\f$ the
smallest ellipsoid that contains all points of \f$ P\f$; this ellipsoid
exists and is unique.
For a given finite and full-dimensional pointset \f$ P\subset \E^d\f$ and a
real number \f$ \epsilon\ge 0\f$, we say that an ellipsoid \f$ {\cal
E}\subset\E^d\f$ is an <I>\f$ (1+\epsilon)\f$-appoximation</I> to \f$ \mel(P)\f$ if
\f$ P\subset {\cal E}\f$ and \f$ \vol({\cal E}) \leq (1+\epsilon)
\vol(\mel(P))\f$. In other words, an \f$ (1+\epsilon)\f$-approximation to
\f$ \mel(P)\f$ is an enclosing ellipsoid whose volume is by at most a
E}\subset\E^d\f$ is an <I>\f$ (1+\epsilon)\f$-appoximation</I> to \f$ (P)\f$ if
\f$ P\subset {\cal E}\f$ and \f$ ({\cal E}) \leq (1+\epsilon)
((P))\f$. In other words, an \f$ (1+\epsilon)\f$-approximation to
\f$ (P)\f$ is an enclosing ellipsoid whose volume is by at most a
factor of \f$ 1+\epsilon\f$ larger than the volume of the smallest
enclosing ellipsoid of \f$ P\f$.
Given this notation, an object of class `Approximate_min_ellipsoid_d` represents an
\f$ (1+\epsilon)\f$-approximation to \f$ \mel(P)\f$ for a given finite and
\f$ (1+\epsilon)\f$-approximation to \f$ (P)\f$ for a given finite and
full-dimensional multiset of points \f$ P\subset\E^d\f$ and a real constant
\f$ \epsilon>0\f$.\cgalFootnote{A <I>multiset</I> is a set where elements may have multiplicity greater than \f$ 1\f$.} When an
`Approximate_min_ellipsoid_d<Traits>` object is constructed, an
iterator over the points \f$ P\f$ and the number \f$ \epsilon\f$ have to be
specified; the number \f$ \epsilon\f$ defines the <I>desired
approximation ratio</I> \f$ 1+\epsilon\f$. The underlying algorithm will then
try to compute an \f$ (1+\epsilon)\f$-approximation to \f$ \mel(P)\f$, and one of
try to compute an \f$ (1+\epsilon)\f$-approximation to \f$ (P)\f$, and one of
the following two cases takes place.
<UL>
<LI>The algorithm determines that \f$ P\f$ is not full-dimensional (see
@ -44,7 +44,7 @@ the following two cases takes place.
in all cases decide correctly whether \f$ P\f$ is full-dimensional or
not. If `is_full_dimensional()` returns `false`, the points
lie in such a "thin" subspace of \f$ \E^d\f$ that the algorithm is
incapable of computing an approximation to \f$ \mel(P)\f$. More
incapable of computing an approximation to \f$ (P)\f$. More
precisely, if `is_full_dimensional()` returns `false`, there
exist two parallel hyperplanes in \f$ \E^d\f$ with the points \f$ P\f$ in
between so that the distance \f$ \delta\f$ between the hyperplanes is
@ -55,7 +55,7 @@ If \f$ P\f$ is not full-dimensional, linear algebra techniques should be
used to determine an affine subspace \f$ S\f$ of \f$ \E^d\f$ that contains the
points \f$ P\f$ as a (w.r.t.\ \f$ S\f$) full-dimensional pointset; once \f$ S\f$ is
determined, the algorithm can be invoked again to compute an
approximation to (the lower-dimensional) \f$ \mel(P)\f$ in \f$ S\f$. Since
approximation to (the lower-dimensional) \f$ (P)\f$ in \f$ S\f$. Since
`is_full_dimensional()` might (due to rounding errors, see
above) return `false` even though \f$ P\f$ is full-dimensional, the
lower-dimensional subspace \f$ S\f$ containing \f$ P\f$ need not exist.
@ -66,7 +66,7 @@ ellipsoid of the projected points within \f$ H\f$; the fitting can be
done for instance using the `linear_least_squares_fitting()`
function from the \cgal package `Principal_component_analysis`.
<LI>The algorithm determines that \f$ P\f$ is full-dimensional. In this
case, it provides an approximation \f$ {\cal E}\f$ to \f$ \mel(P)\f$, but
case, it provides an approximation \f$ {\cal E}\f$ to \f$ (P)\f$, but
depending on the input problem (i.e., on the pair \f$ (P,\epsilon)\f$),
it may not have achieved the desired approximation ratio but merely
some <I>worse</I> approximation ratio \f$ 1+\epsilon'>1+\epsilon\f$. The
@ -126,7 +126,7 @@ Cholesky-decomposition. The algorithm's running time is
To illustrate the usage of `Approximate_min_ellipsoid_d` we give two examples in 2D. The
first program generates a random set \f$ P\subset\E^2\f$ and outputs the
points and a \f$ 1.01\f$-approximation of \f$ \mel(P)\f$ as an EPS-file, which
points and a \f$ 1.01\f$-approximation of \f$ (P)\f$ as an EPS-file, which
you can view using <TT>gv</TT>, for instance. (In both examples you can
change the variables `n` and `d` to experiment with the code.)
@ -204,7 +204,7 @@ typedef unspecified_type Axis_direction_iterator;
/*!
initializes `ame` to an \f$ (1+\epsilon)\f$-approximation of
\f$ \mel(P)\f$ with \f$ P\f$ being the set of points in the range
\f$ (P)\f$ with \f$ P\f$ being the set of points in the range
[`first`,`last`). The number \f$ \epsilon\f$ in this will
be at most `eps`, if possible. However, due to the
limited precision in the algorithm's underlying arithmetic, it
@ -260,7 +260,7 @@ unsigned int number_of_points( ) const;
returns a number
\f$ \epsilon'\f$ such that the computed approximation is (under exact
arithmetic) guaranteed to be an \f$ (1+\epsilon')\f$-approximation to
\f$ \mel(P)\f$.
\f$ (P)\f$.
\pre `ame.is_full_dimensional() == true`.
\post \f$ \epsilon'>0\f$.
*/
@ -404,7 +404,7 @@ bool is_full_dimensional( ) const;
/// An object `ame` is valid iff <UL> <LI>`ame` contains all points of
/// its defining set \f$ P\f$, <LI>`ame` is an \f$
/// (1+\epsilon')\f$-approximation to the smallest ellipsoid \f$
/// \mel(P)\f$ of \f$ P\f$, <LI>The ellipsoid represented by `ame`
/// (P)\f$ of \f$ P\f$, <LI>The ellipsoid represented by `ame`
/// fulfills the inclusion ( \ref eqapproximate_min_ellipsoid_incl
/// ). </UL>
/// @{
@ -426,7 +426,7 @@ bool is_valid( bool verbose = false) const;
/*!
Writes the points \f$ P\f$ and the computed approximation to
\f$ \mel(P)\f$ as an EPS-file under pathname `name`. \pre The dimension of points \f$ P\f$ must be \f$ 2\f$.
\f$ (P)\f$ as an EPS-file under pathname `name`. \pre The dimension of points \f$ P\f$ must be \f$ 2\f$.
<I>Note:</I> this
routine is provided as a debugging routine; future version of
\cgal might not provide it anymore.

View File

@ -360,7 +360,20 @@ class Min_ellipse_2 {
// default constructor
inline
Min_ellipse_2( const Traits& traits = Traits())
Min_ellipse_2()
: n_support_points( 0)
{
// allocate support points' array
support_points = new Point[ 5];
// initialize ellipse
tco.ellipse.set();
CGAL_optimisation_postcondition( is_empty());
}
inline
Min_ellipse_2( const Traits& traits )
: tco( traits), n_support_points( 0)
{
// allocate support points' array

View File

@ -168,7 +168,7 @@ unsigned int ImageIO_limit_len(size_t to_be_read)
CGAL_INLINE_FUNCTION
size_t ImageIO_write(const _image *im, const void *buf, size_t len) {
size_t to_be_written = len;
int l = -1;
std::ptrdiff_t l = -1;
char *b = (char*)buf;
switch(im->openMode) {

View File

@ -63,6 +63,7 @@ read_vtk_image_data(vtkImageData* vtk_image)
_image* image = ::_initImage();
const int* dims = vtk_image->GetDimensions();
const double* spacing = vtk_image->GetSpacing();
const double* offset = vtk_image->GetOrigin();
image->vectMode = VM_SCALAR;
image->xdim = dims[0];
image->ydim = dims[1];
@ -71,6 +72,9 @@ read_vtk_image_data(vtkImageData* vtk_image)
image->vx = spacing[0];
image->vy = spacing[1];
image->vz = spacing[2];
image->tx = offset[0];
image->ty = offset[1];
image->tz = offset[2];
image->endianness = ::_getEndianness();
int vtk_type = vtk_image->GetScalarType();
if(vtk_type == VTK_SIGNED_CHAR) vtk_type = VTK_CHAR;

View File

@ -28,6 +28,7 @@
#include <CGAL/determinant.h>
#include <CGAL/number_utils.h>
#include <boost/type_traits/is_integral.hpp>
namespace CGAL {
@ -284,7 +285,16 @@ line_get_pointC2(const FT &a, const FT &b, const FT &c, int i,
{
if (CGAL_NTS is_zero(b))
{
x = (-b-c)/a + i * b;
// Laurent Rineau, 2018/12/07: I add this CGAL_assume to calm
// down a warning from MSVC 2017:
// > include\cgal\constructions\kernel_ftc2.h(287) :
// > warning C4723: potential divide by 0
// The test `!boost::is_integral<FT>::value` is there to avoid
// that `a != 0` is tested on anything but integral types, for
// performance reasons.
CGAL_assume(!boost::is_integral<FT>::value || a != FT(0));
x = -c/a;
y = 1 - i * a;
}
else

View File

@ -38,6 +38,7 @@
# pragma warning(disable:4267)
# pragma warning(disable:4275)
# pragma warning(disable:4251)
# pragma warning(disable:4996)
#endif
#include <CGAL/Classification/internal/auxiliary/random-forest/node-gini.hpp>

View File

@ -93,7 +93,7 @@ function(configure_doxygen_package CGAL_PACKAGE_NAME)
file(APPEND ${CGAL_DOC_PACKAGE_DEFAULTS} "STRIP_FROM_INC_PATH = ${CGAL_PACKAGE_DOC_DIR}/\n")
file(APPEND ${CGAL_DOC_PACKAGE_DEFAULTS} "STRIP_FROM_INC_PATH += ${CGAL_PACKAGE_DIR}/include/\n")
file(APPEND ${CGAL_DOC_PACKAGE_DEFAULTS} "ALIASES += \"cgalPkgDescriptionBegin{2}=\\details \"\n")
file(APPEND ${CGAL_DOC_PACKAGE_DEFAULTS} "ALIASES += \"cgalPkgManuals{2}=<BR>\"\n")
file(APPEND ${CGAL_DOC_PACKAGE_DEFAULTS} "ALIASES += \"cgalPkgManuals{2}=<div class=\\\"PkgManuals\\\"></div>\"\n")
file(APPEND ${CGAL_DOC_PACKAGE_DEFAULTS} "INPUT = ${CGAL_PACKAGE_DOC_DIR}\n")
if(NOT EXISTS "${CGAL_PACKAGE_DOC_DIR}/CGAL")
# This package has in-source documentation.

View File

@ -250,9 +250,9 @@ ALIASES = "sc{1}=<span style=\"font-variant: small-caps;\">\1</sp
"cgalFigureBegin{8}=\anchor fig__\1 \n <CENTER> <TABLE border=0> <TR> <TD> \image html \2 \n \image latex \2 \"\" width=2.1cm \n </TD> <TD> \image html \3 \n \image latex \3 \"\" width=2.1cm \n </TD> <TD> \image html \4 \n \image latex \4 \"\" width=2.1cm \n </TD> <TD> \image html \5 \n \image latex \5 \"\" width=2.1cm \n </TD> <TD> \image html \6 \n \image latex \6 \"\" width=2.1cm \n </TD> <TD> \image html \7 \n \image latex \7 \"\" width=2.1cm \n </TD> <TD> \image html \8 \n \image latex \8 \"\" width=2.1cm \n </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly \n \latexonly \n \endlatexonly \ref fig__\1" \
"cgalFigureBegin{9}=\anchor fig__\1 \n <CENTER> <TABLE border=0> <TR> <TD> \image html \2 \n \image latex \2 \"\" width=1.9cm \n </TD> <TD> \image html \3 \n \image latex \3 \"\" width=1.9cm \n </TD> <TD> \image html \4 \n \image latex \4 \"\" width=1.9cm \n </TD> <TD> \image html \5 \n \image latex \5 \"\" width=1.9cm \n </TD> <TD> \image html \6 \n \image latex \6 \"\" width=1.9cm \n </TD> <TD> \image html \7 \n \image latex \7 \"\" width=1.9cm \n </TD> <TD> \image html \8 \n \image latex \8 \"\" width=1.9cm \n </TD> <TD> \image html \9 \n \image latex \9 \"\" width=1.9cm \n </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly \n \latexonly \n \endlatexonly \ref fig__\1" \
"cgalFigureBegin{10}=\anchor fig__\1 \n <CENTER> <TABLE border=0> <TR> <TD> \image html \2 \n \image latex \2 \"\" width=1.6cm \n </TD> <TD> \image html \3 \n \image latex \3 \"\" width=1.6cm \n </TD> <TD> \image html \4 \n \image latex \4 \"\" width=1.6cm \n </TD> <TD> \image html \5 \n \image latex \5 \"\" width=1.6cm \n </TD> <TD> \image html \6 \n \image latex \6 \"\" width=1.6cm \n </TD> <TD> \image html \7 \n \image latex \7 \"\" width=1.6cm \n </TD> <TD> \image html \8 \n \image latex \8 \"\" width=1.6cm \n </TD> <TD> \image html \9 \n \image latex \9 \"\" width=1.6cm \n </TD> <TD> \image html \10 \n \image latex \10 \"\" width=1.6cm \n </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly \n \latexonly \n \endlatexonly \ref fig__\1" \
"cgalFigureEnd=\htmlonly </div> \endhtmlonly <br>" \
"cgalFigureEnd=\htmlonly </div> <br> \endhtmlonly" \
"cgalFigureCaptionBegin{1}=\htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly \ref fig__\1" \
"cgalFigureCaptionEnd=\htmlonly </div> \endhtmlonly <br>" \
"cgalFigureCaptionEnd=\htmlonly </div> <br> \endhtmlonly" \
"cgalConcept=\details <div id=\"CGALConcept\"></div>\n \brief" \
"cgalConceptNamespace=\details <div id=\"CGALConceptNS\"></div>\n \brief" \
"cgalRefines=\xrefitem refines \"Refines\" \"Refinement Relationships\"" \

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>

View File

@ -1,5 +1,5 @@
<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/png" href="$relpath$../Manual/g-196x196-doc.png"/>

View File

@ -1,5 +1,5 @@
<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/png" href="$relpath$../Manual/g-196x196-doc.png" />

View File

@ -242,29 +242,29 @@ ALIASES = "sc{1}=<span style=\"font-variant: small-caps;\">\1</sp
"cgalExample{1}=<br><b>File</b> \ref \1 \include \1" \
"cgalFigureAnchor{1}=\anchor fig__\1" \
"cgalFigureRef{1}=\ref fig__\1" \
"cgalFigureBegin{2}=\anchor fig__\1 ^^ \image html \2 ^^ \image latex \2 \"\" width=15cm ^^ \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly \latexonly ^^ \endlatexonly ^^ \ref fig__\1" \
"cgalFigureBegin{3}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=7.5cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=7.5cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{4}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=5cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=5cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=5cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{5}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=3.75cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=3.75cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=3.75cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=3.75cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{6}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=3cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=3cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=3cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=3cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=3cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{7}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=2.5cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=2.5cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=2.5cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=2.5cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=2.5cm ^^ </TD> <TD> \image html \7 ^^ \image latex \7 \"\" width=2.5cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{8}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=2.1cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=2.1cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=2.1cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=2.1cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=2.1cm ^^ </TD> <TD> \image html \7 ^^ \image latex \7 \"\" width=2.1cm ^^ </TD> <TD> \image html \8 ^^ \image latex \8 \"\" width=2.1cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{9}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=1.9cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=1.9cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=1.9cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=1.9cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=1.9cm ^^ </TD> <TD> \image html \7 ^^ \image latex \7 \"\" width=1.9cm ^^ </TD> <TD> \image html \8 ^^ \image latex \8 \"\" width=1.9cm ^^ </TD> <TD> \image html \9 ^^ \image latex \9 \"\" width=1.9cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{10}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=1.6cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=1.6cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=1.6cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=1.6cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=1.6cm ^^ </TD> <TD> \image html \7 ^^ \image latex \7 \"\" width=1.6cm ^^ </TD> <TD> \image html \8 ^^ \image latex \8 \"\" width=1.6cm ^^ </TD> <TD> \image html \9 ^^ \image latex \9 \"\" width=1.6cm ^^ </TD> <TD> \image html \10 ^^ \image latex \10 \"\" width=1.6cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureEnd=\htmlonly </div> \endhtmlonly <br>" \
"cgalFigureCaptionBegin{1}=\htmlonly <div class=\"cgal_figure_caption\"> \endhtmlonly \ref fig__\1" \
"cgalFigureCaptionEnd=\htmlonly </div> \endhtmlonly <br>" \
"cgalFigureBegin{2}=\anchor fig__\1 ^^ \image html \2 ^^ \image latex \2 \"\" width=15cm ^^ \htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly \latexonly ^^ \endlatexonly ^^ \ref fig__\1" \
"cgalFigureBegin{3}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=7.5cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=7.5cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{4}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=5cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=5cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=5cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{5}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=3.75cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=3.75cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=3.75cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=3.75cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{6}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=3cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=3cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=3cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=3cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=3cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{7}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=2.5cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=2.5cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=2.5cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=2.5cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=2.5cm ^^ </TD> <TD> \image html \7 ^^ \image latex \7 \"\" width=2.5cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{8}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=2.1cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=2.1cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=2.1cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=2.1cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=2.1cm ^^ </TD> <TD> \image html \7 ^^ \image latex \7 \"\" width=2.1cm ^^ </TD> <TD> \image html \8 ^^ \image latex \8 \"\" width=2.1cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{9}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=1.9cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=1.9cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=1.9cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=1.9cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=1.9cm ^^ </TD> <TD> \image html \7 ^^ \image latex \7 \"\" width=1.9cm ^^ </TD> <TD> \image html \8 ^^ \image latex \8 \"\" width=1.9cm ^^ </TD> <TD> \image html \9 ^^ \image latex \9 \"\" width=1.9cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureBegin{10}=\anchor fig__\1 ^^ <CENTER> <TABLE border=0> <TR> <TD> \image html \2 ^^ \image latex \2 \"\" width=1.6cm ^^ </TD> <TD> \image html \3 ^^ \image latex \3 \"\" width=1.6cm ^^ </TD> <TD> \image html \4 ^^ \image latex \4 \"\" width=1.6cm ^^ </TD> <TD> \image html \5 ^^ \image latex \5 \"\" width=1.6cm ^^ </TD> <TD> \image html \6 ^^ \image latex \6 \"\" width=1.6cm ^^ </TD> <TD> \image html \7 ^^ \image latex \7 \"\" width=1.6cm ^^ </TD> <TD> \image html \8 ^^ \image latex \8 \"\" width=1.6cm ^^ </TD> <TD> \image html \9 ^^ \image latex \9 \"\" width=1.6cm ^^ </TD> <TD> \image html \10 ^^ \image latex \10 \"\" width=1.6cm ^^ </TD> </TR> </TABLE> </CENTER> \htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly ^^ \latexonly ^^ \endlatexonly \ref fig__\1" \
"cgalFigureEnd=\htmlonly[block] </div> \endhtmlonly <br>" \
"cgalFigureCaptionBegin{1}=\htmlonly[block] <div class=\"cgal_figure_caption\"> \endhtmlonly \ref fig__\1" \
"cgalFigureCaptionEnd=\htmlonly[block] </div> \endhtmlonly <br>" \
"cgalConcept=\details <div id=\"CGALConcept\"></div>^^ \brief" \
"cgalConceptNamespace=\details <div id=\"CGALConceptNS\"></div>^^ \brief" \
"cgalRefines=\xrefitem refines \"Refines\" \"Refinement Relationships\"" \
"cgalModels=\xrefitem models \"Is Model Of\" \"Is Model Relationships\"" \
"cgalGeneralizes=\xrefitem generalizes \"Generalizes\" \"Generalization Relationships\"" \
"cgalHasModel=\xrefitem hasModels \"Has Models\" \"Has Model Relationships\"" \
"cgalDebugBegin=\htmlonly <div class=\"CGALDebug\"> <div>Debugging Support</div> \endhtmlonly ^^" \
"cgalDebugEnd=\htmlonly </div> \endhtmlonly" \
"cgalDebugBegin=\htmlonly[block] <div class=\"CGALDebug\"> <div>Debugging Support</div> \endhtmlonly ^^" \
"cgalDebugEnd=\htmlonly[block] </div> \endhtmlonly" \
"cgalDebugFunction=This is a function for debugging purpose." \
"cgalAdvancedBegin=\htmlonly <div class=\"CGALAdvanced\"> <div>Advanced</div> \endhtmlonly ^^" \
"cgalAdvancedEnd=\htmlonly </div> \endhtmlonly" \
"cgalAdvancedBegin=\htmlonly[block] <div class=\"CGALAdvanced\"> <div>Advanced</div> \endhtmlonly ^^" \
"cgalAdvancedEnd=\htmlonly[block] </div> \endhtmlonly" \
"cgalAdvancedFunction=This is an advanced function." \
"cgalAdvancedClass=This is an advanced class." \
"cgalRequiresCPP11=\warning This function requires a C++11 compiler." \
@ -287,11 +287,11 @@ ALIASES = "sc{1}=<span style=\"font-variant: small-caps;\">\1</sp
"cgalModifEnd=\htmlonly </div> \endhtmlonly \latexonly END MODIFICATIONS \endlatexonly" \
"cgalPkgBib{1}=<B>BibTeX:</B> <a href=\"../Manual/how_to_cite_cgal.html#\1-${CGAL_RELEASE_YEAR_ID}\">\1-${CGAL_RELEASE_YEAR_ID}</a><BR>" \
"cgalFootnote{1}=<span class=\"footnote\">\1</span>" \
"cgalAutoToc=\htmlonly <div id=\"autotoc\" class=\"toc\"></div> \endhtmlonly" \
"cgalAutoToc=\htmlonly[block] <div id=\"autotoc\" class=\"toc\"></div> \endhtmlonly" \
"cgalTagTrue=\link CGAL::Tag_true `CGAL::Tag_true`\endlink" \
"cgalTagFalse=\link CGAL::Tag_false `CGAL::Tag_false`\endlink" \
"cgalHeading{1}= <B>\1</B><BR>" \
"cgalClassifedRefPages=\htmlonly <h2 class=\"groupheader\">Classified Reference Pages</h2> \endhtmlonly" \
"cgalClassifedRefPages=\htmlonly[block] <h2 class=\"groupheader\">Classified Reference Pages</h2> \endhtmlonly" \
"cgalCite{1}=<!-- -->\cite \1"
# This tag can be used to specify a number of word-keyword mappings (TCL only).

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>

View File

@ -1,5 +1,5 @@
<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/png" href="$relpath$../Manual/g-196x196-doc.png"/>

View File

@ -1,5 +1,5 @@
<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/png" href="$relpath$../Manual/g-196x196-doc.png"/>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/png" href="$relpath$../Manual/g-196x196-doc.png"/>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/png" href="$relpath$../Manual/g-196x196-doc.png"/>

View File

@ -62,7 +62,7 @@ def conceptify_ns(d):
def write_out_html(d, fn):
f = codecs.open(fn, 'w', encoding='utf-8')
# this is the normal doxygen doctype, which is thrown away by pyquery
f.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n')
f.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n')
f.write('<html xmlns=\"http://www.w3.org/1999/xhtml\">')
f.write(d.html())
f.write('\n')

View File

@ -277,7 +277,7 @@ triangle (2D and 3D) and in tetrahedra (3D). Basically, in order to generate
a random point in a \f$N\f$-simplex (a triangle for \f$N = 2\f$, and tetrahedron
for \f$N = 3\f$), we generate numbers \f$a_1,a_2,\ldots,a_N\f$ identically and independently
uniformly distributed in \f$(0,1)\f$, we sort them, we let \f$a_0 = 0\f$ and \f$a_{N+1} = 1\f$,
and then \f$a_{i+1}a_i\f$, for \f$i = 1,\ldots,N\f$ becomes its
and then \f$a_{i+1}-a_i\f$, for \f$i = 1,\ldots,N\f$ becomes its
barycentric coordinates with respect to the simplex.
Maxime Gimemo introduced the random generators on 2D and 3D triangle meshes.

View File

@ -151,6 +151,7 @@ void
Random_points_in_cube_d<P>::
generate_point() {
typedef typename Kernel_traits<P>::Kernel::RT RT;
CGAL_assume(dimension>0);
std::vector<RT> coord(dimension);
for(int i=0; i<dimension; ++i)
coord[i]=RT(this->d_range * ( 2 * this->_rnd.get_double() - 1.0));

View File

@ -288,8 +288,10 @@ int main()
Polyhedron polyhedron;
// A cube
make_hexahedron(Point_3(-0.5,-0.5,-0.5), Point_3(0.5,-0.5,-0.5), Point_3(0.5,0.5,-0.5), Point_3(-0.5,0.5,-0.5),
Point_3(-0.5,0.5,0.5), Point_3(-0.5,-0.5,0.5), Point_3(0.5,-0.5,0.5), Point_3(0.5,0.5,0.5),
make_hexahedron(
Point_3(-0.5,-0.5,-0.5), Point_3(0.5,-0.5,-0.5), Point_3(0.5,0.5,-0.5),
Point_3(-0.5,0.5,-0.5), Point_3(-0.5,0.5,0.5), Point_3(-0.5,-0.5,0.5),
Point_3(0.5,-0.5,0.5), Point_3(0.5,0.5,0.5),
polyhedron);
boost::graph_traits<Polyhedron>::halfedge_descriptor facets[6];

View File

@ -363,19 +363,6 @@ operator<<(Geomview_stream& gs, const Bbox_2& b);
Geomview_stream&
operator<<(Geomview_stream& gs, const Bbox_3& b);
/*!
Inserts the bounding box `b` into the stream `gs`.
\relates Geomview_stream
*/
Geomview_stream&
operator<<(Geomview_stream& gs, const Bbox_3& b);
/*!
Inserts the bounding box `b` into the stream `gs`.
\relates Geomview_stream
*/
Geomview_stream&
operator<<(Geomview_stream& gs, const Bbox_3& b);
/// @}

View File

@ -54,6 +54,10 @@ Release date: March 2019
`Arr_polyline_traits_2`, `Arr_polycurve_traits_2`, and
`Arr_polycurve_basic_traits_2`.
### CGAL and the Boost Graph Library (BGL)
- Add function `write_wrl()` for writing into VRML 2.0 format.
Release 4.13
------------

View File

@ -42,7 +42,7 @@ endif()
# Process a list, and replace items contains a file pattern (like
# `*.off`) by the sublist that corresponds to the globbing of the
# pattern in the directory `${CGAL_CURRENT_SOURCE_DIR}`.
# pattern in the directory `${CMAKE_CURRENT_SOURCE_DIR}`.
#
#
# For example: the `file
@ -71,7 +71,7 @@ function(expand_list_with_globbing list_name)
list(GET input_list ${n} item_n)
# message(STATUS "argument ${n} is ${item_n}")
if(item_n MATCHES ".*\\*.*")
file(GLOB files RELATIVE ${CGAL_CURRENT_SOURCE_DIR} ${item_n})
file(GLOB files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${item_n})
list(APPEND output_list ${files})
else()
list(APPEND output_list ${item_n})
@ -97,7 +97,7 @@ function(cgal_setup_test_properties test_name)
endif()
set_property(TEST "${test_name}"
APPEND PROPERTY LABELS "${PROJECT_NAME}")
# message(STATUS " working dir: ${CGAL_CURRENT_SOURCE_DIR}")
# message(STATUS " working dir: ${CMAKE_CURRENT_SOURCE_DIR}")
set_property(TEST "${test_name}"
PROPERTY WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
if(exe_name)
@ -198,7 +198,7 @@ function(cgal_add_test exe_name)
return()
endif()
# message("Add test ${test_name}")
set(cin_file "${CGAL_CURRENT_SOURCE_DIR}/${exe_name}.cin")
set(cin_file "${CMAKE_CURRENT_SOURCE_DIR}/${exe_name}.cin")
if(NOT ARGS AND EXISTS ${cin_file})
add_test(NAME ${test_name}
COMMAND ${TIME_COMMAND} ${CMAKE_COMMAND}
@ -213,11 +213,11 @@ function(cgal_add_test exe_name)
else()
if(NOT ARGS AND NOT cgal_add_test_TEST_NAME)
if(ARGC GREATER 2 AND ARGV2)
set(cmd_file "${CGAL_CURRENT_SOURCE_DIR}/${ARGV2}.cmd")
set(cmd_file "${CMAKE_CURRENT_SOURCE_DIR}/${ARGV2}.cmd")
elseif(ARGC GREATER 1 AND ARGV1 AND NOT EXISTS ${cmd_file})
set(cmd_file "${CGAL_CURRENT_SOURCE_DIR}/${ARGV1}.cmd")
set(cmd_file "${CMAKE_CURRENT_SOURCE_DIR}/${ARGV1}.cmd")
elseif(NOT EXISTS ${cmd_file})
set(cmd_file "${CGAL_CURRENT_SOURCE_DIR}/${exe_name}.cmd")
set(cmd_file "${CMAKE_CURRENT_SOURCE_DIR}/${exe_name}.cmd")
endif()
if(EXISTS ${cmd_file})
file(STRINGS "${cmd_file}" CMD_LINES)

View File

@ -9,11 +9,6 @@ include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
cgal_setup_module_path()
# Save the current source directory. That variable can be changed by
# a `CMakeLists.txt`, for `CMakeLists.txt` files that are created in
# the binary directory.
set(CGAL_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
if(NOT USE_CGAL_FILE_INCLUDED)
set(USE_CGAL_FILE_INCLUDED 1)

View File

@ -11,11 +11,6 @@ get_filename_component(CGAL_CONFIG_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(CGAL_HEADER_ONLY TRUE)
# Save the current source directory. That variable can be changed by
# a `CMakeLists.txt`, for `CMakeLists.txt` files that are created in
# the binary directory.
set(CGAL_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
function(cgal_detect_branch_build VAR_NAME)
if(IS_DIRECTORY ${CGAL_CONFIG_DIR}/../../../../Installation/package_info/Installation/)
set(${VAR_NAME} TRUE PARENT_SCOPE)
@ -73,6 +68,9 @@ include(${CGAL_MODULES_DIR}/CGAL_CreateSingleSourceCGALProgram.cmake)
include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
include(${CGAL_MODULES_DIR}/CGAL_Common.cmake)
set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake)
if(CGAL_BUILDING_LIBS)
foreach(comp ${CGAL_FIND_COMPONENTS})
if(CGAL_${comp}_FOUND)
@ -146,8 +144,6 @@ endforeach()
# Temporary? Change the CMAKE module path
cgal_setup_module_path()
set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake)
include("${CGAL_MODULES_DIR}/CGAL_parse_version_h.cmake")
cgal_parse_version_h( "${CGAL_INSTALLATION_PACKAGE_DIR}/include/CGAL/version.h"
"CGAL_VERSION_NAME"

View File

@ -199,7 +199,7 @@ Monge_via_jet_fitting();
This operator performs all the computations. The \f$ N\f$ input points are
given by the `InputIterator` parameters which value-type are
`Data_kernel::Point_3`, `d` is the degree of the fitted
polynomial, `d'` is the degree of the expected Monge
polynomial, \c d' is the degree of the expected Monge
coefficients. \pre \f$ N \geq N_{d}:=(d+1)(d+2)/2\f$, \f$ 1 \leq d' \leq\min(d,4) \f$.
*/
template <class InputIterator> Monge_form

View File

@ -77,13 +77,11 @@ the surface can locally be written as the graph of a bivariate
function. Letting \f$ h.o.t.\f$ stand for <I>higher order terms</I>, one
has :
\f[
\begin{equation}
\f{equation}{
z(x,y)=J_{B,d}(x,y) + h.o.t. \ ; \quad
J_{B,d}(x,y)=\ccSum{k=0}{d}{(\ccSum{i=0}{i}{
\frac{B_{k-i,i}x^{k-i}y^{i}}{i!(k-i)!}})}.
\end{equation}
\f]
\f}
The degree \f$ d\f$ polynomial \f$ J_{B,d}\f$ is the Taylor expansion of the
function \f$ z\f$, and is called its <I>\f$ d\f$-jet</I>. Notice that a \f$ d\f$-jet contains
@ -343,12 +341,10 @@ The fitting process consists of finding the coefficients
\f$ A_{i,j}\f$ of the degree \f$ d\f$ polynomial
\anchor eqanswer
\f[
\begin{equation}
\f{equation}{
J_{A,d}= \ccSum{k=0}{d}{(\ccSum{i=0}{k}{
\frac{A_{k-i,i}x^{k-i}y^{i}}{i!(k-i)!}})}.
\end{equation}
\f]
\f}
Denote \f$ p_i=(x_i,y_i,z_i), \ i=1,\ldots , N\f$ the coordinates of the
sample points of \f$ P^+\f$.
@ -362,7 +358,7 @@ given by
A = & (A_{0,0}, A_{1,0},A_{0,1}, \ldots , A_{0,d})^T \\
Z= &(z_1, z_2,\ldots , z_N)^T \\
M= &(1,x_i,\ y_i,\ \frac{x_i^2}{2},\ldots ,
\ \frac{x_iy_i^{d-1}}{(d-1)!},\ \frac{y_i^d}{d!})_{i=1,...,N}\\
\ \frac{x_iy_i^{d-1}}{(d-1)!},\ \frac{y_i^d}{d!})_{i=1,...,N}
\f}
The equations for interpolation become \f$ MA=Z\f$. For approximation, the
@ -395,8 +391,7 @@ The number \f$ r\f$, which is the number of non zero singular values, is
strictly lower than \f$ N_d\f$ if the system is under constrained. In any
case, the unique solution which minimize \f$ ||A||_2\f$ is given by:
\f[
\begin{equation}
\f{equation}{
A= V
\left( \begin{array}{cc}
D_r^{-1} & 0_{N_d-r,\ r}\\
@ -404,8 +399,7 @@ D_r^{-1} & 0_{N_d-r,\ r}\\
\end{array}
\right)
U^TZ.
\end{equation}
\f]
\f}
One can provide the condition number of the matrix \f$ M\f$ (after
preconditioning) which is the ratio of the maximal and the minimal
@ -491,22 +485,18 @@ We use explicit formula. The implicit equation of the fitted
polynomial surface in the fitting-basis with origin the point
\f$ (0,0,A_{0,0})\f$ is \f$ Q=0\f$ with
\f[
\begin{equation}
\f{equation}{
Q=-w-A_{0,0} +\ccSum{i,j}{}{\frac{A_{i,j}u^iv^j}{i!j!}}.
\end{equation}
\f]
\f}
The equation in the Monge basis is obtained by substituting \f$ (u,v,w)\f$
by \f$ P^T_{F\rightarrow M}(x,y,z)\f$. Denote \f$ f(x,y,z)=0\f$ this implicit
equation. By definition of the Monge basis, we have locally (at
\f$ (0,0,0)\f$)
\f[
\begin{equation}
\f{equation}{
f(x,y,z)=0 \Leftrightarrow z=g(x,y)
\end{equation}
\f]
\f}
and the Taylor expansion of \f$ g\f$ at \f$ (0,0)\f$ are the Monge coefficients
sought.
@ -526,7 +516,7 @@ f_{0,0,1} ^{2}}}
\\
&b_1=g_{2,1}=-{\frac {- f_{0,1,1} f_{2,0,0} + f_{2,1,0} f_{0,0,1} }{ f_{0,0,1} ^{2}}}
\\
& .... \\
& ....
\f}

View File

@ -40,7 +40,7 @@ _test_io_for(const T& t)
}
std::ifstream iFile(TEST_FILENAME, std::ios::in);
T u;
T u = t;
iFile >> u;
assert(!iFile.fail());
assert(u == t);

View File

@ -28,7 +28,7 @@
int main()
{
try {
CGAL::Point_3<CGAL::Epick> a, b, c, d;
CGAL::Point_3<CGAL::Epick> a(CGAL::ORIGIN), b(a), c(a), d(a);
CGAL::squared_radius(a, b, c, d);
} catch(...) {}
return EXIT_SUCCESS;

View File

@ -96,8 +96,8 @@ InputIterator first, InputIterator last);
introduces a
variable `v` of type `Vector_d<Kernel>` in dimension `d`
initialized to the vector with homogeneous coordinates as defined by
`H = set [first,last)` and `D`: \f$ (\pmH[0],
\pmH[1], \ldots, \pmH[d-1], \pmD)\f$. The sign
`H = set [first,last)` and `D`: \f$ (\pm H_0,
\pm H_1, \ldots, \pm H_{D-1}, \pm H_D)\f$. The sign
chosen is the sign of \f$ D\f$.
\pre `D` is non-zero, the iterator range defines a \f$ d\f$-tuple of `RT`.

View File

@ -314,7 +314,9 @@ struct Tester
// Test edge iterators
//-------------------------------------------------------
std::cout << "Test edge iterators\n";
const Edge& edge_to_modify = *(c3t3.edges_in_complex_begin());
typename C3t3::Edges_in_complex_iterator eit = c3t3.edges_in_complex_begin();
assert(eit != c3t3.edges_in_complex_end());
const Edge& edge_to_modify = *eit;
c3t3.remove_from_complex(edge_to_modify);
c3t3.add_to_complex(edge_to_modify,curve_index_bis);

View File

@ -40,8 +40,15 @@
#endif
#ifdef CGAL_USE_BOOST_BIMAP
# if defined(BOOST_MSVC)
# pragma warning(push)
# pragma warning(disable: 4996)
# endif
#include <CGAL/boost/bimap.hpp>
#include <boost/bimap/multiset_of.hpp>
# if defined(BOOST_MSVC)
# pragma warning(pop)
# endif
#endif
namespace CGAL {

View File

@ -71,6 +71,23 @@ VVector convert(const CGAL::Vector_3<R>& v)
CGAL::to_double(v.y()),
CGAL::to_double(v.z())); }
template <typename R>
VVector normalize_and_convert(const CGAL::Vector_3<R>& v)
{
typename R::FT xa = CGAL::abs(v.x());
typename R::FT ya = CGAL::abs(v.y());
typename R::FT za = CGAL::abs(v.z());
typename R::FT m = (std::max)((std::max)(xa,ya),za);
if (m==0) {
return VVector(0,0,0);
} else {
double xd = CGAL::to_double(v.x()/m);
double yd = CGAL::to_double(v.y()/m);
double zd = CGAL::to_double(v.z()/m);
VVector u(xd,yd,zd);
return u / CGAL_NTS sqrt(u*u) ; // normalize
}
}
const double refinement_angle = 0.1;
const double shrink_fac = 0.995;
@ -80,8 +97,7 @@ class Approximator {
public:
static VPoint approximate(const CGAL::Sphere_point<R>& p) {
VVector v = convert(p-CGAL::ORIGIN);
v = v / CGAL_NTS sqrt(v*v) ; // normalize
VVector v = normalize_and_convert(p-CGAL::ORIGIN);
return CGAL::ORIGIN+v;
}

View File

@ -350,6 +350,11 @@ public:
f->mark() == true);
}
bool is_sphere() const
{
return is_plane();
}
void extract_complement()
{ CGAL_NEF_TRACEN("extract complement");
if ( this->is_shared() ) clone_rep();
@ -390,7 +395,7 @@ public:
CGAL_forall_svertices(v,D) v->mark() = true;
CGAL_forall_sedges(e,D) e->mark() = true;
CGAL_forall_sfaces(f,D) f->mark() = false;
if ( D.has_shalfloop() ) D.shalfloop()->mark() = D.shalfoop()->twin() = true;
if ( D.has_shalfloop() ) D.shalfloop()->mark() = D.shalfoop()->twin()->mark() = true;
D.simplify();
}

View File

@ -70,6 +70,7 @@ template<class NT_,class Dim_,class Max_dim_=Dim_> struct Array_vector {
CGAL_assertion(d<=d_);
//TODO: optimize for forward iterators
Vector a;
CGAL_assume(f!=e);
std::copy(f,e,a.begin());
return a;
}

View File

@ -149,7 +149,6 @@ public:
/// @{
Construct_point_2 construct_point_2_object();
Construct_vector_2 construct_vector_2_object();
Construct_vector_2 construct_vector_2_object();
Construct_line_2 construct_line_2_object();
Construct_translated_point_2 construct_translated_point_2_object();
Construct_scaled_vector_2 construct_scaled_vector_2_object();

View File

@ -772,7 +772,6 @@ get_positions_with_vertex_at_extremity(const Bare_point& known_point,
<< " inverted order ? " << std::boolalpha << inverted_return_order << std::endl;
#endif
CGAL_precondition(known_point != Bare_point());
CGAL_precondition(!domain_.is_loop(curve_index));
CGAL_precondition(extremity_points.size() == 2);

View File

@ -33,6 +33,11 @@
namespace CGAL {
#if defined(BOOST_MSVC)
# pragma warning(push)
# pragma warning(disable:4003) // not enough actual parameters for macro
#endif
// see <CGAL/config.h>
CGAL_PRAGMA_DIAG_PUSH
// see <CGAL/boost/parameter.h>
@ -120,6 +125,10 @@ BOOST_PARAMETER_FUNCTION(
CGAL_PRAGMA_DIAG_POP
#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif
} // namespace CGAL
#endif // CGAL_OPTIMIZE_PERIODIC_3_MESH_3_H

View File

@ -116,7 +116,6 @@ void project_points(C3T3& c3t3,
const Weighted_point& vh_wp = c3t3.triangulation().point(vh);
const Bare_point& vh_p = cp(vh_wp);
const Bare_point new_point = helper.project_on_surface(vh, vh_p);
CGAL_assertion(new_point != Bare_point());
const FT sq_d = CGAL::squared_distance(new_point, vh_p);
@ -144,6 +143,11 @@ void project_points(C3T3& c3t3,
} // namespace internal
#if defined(BOOST_MSVC)
# pragma warning(push)
# pragma warning(disable:4003) // not enough actual parameters for macro
#endif
// see <CGAL/config.h>
CGAL_PRAGMA_DIAG_PUSH
// see <CGAL/boost/parameter.h>
@ -181,6 +185,10 @@ BOOST_PARAMETER_FUNCTION(
CGAL_PRAGMA_DIAG_POP
#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif
/**
* @brief This function refines the mesh c3t3 wrt domain & criteria
*

View File

@ -156,7 +156,7 @@ private:
virtual void assign (PLY_element& element, typename Point_set::Index index)
{
Type t;
Type t{};
element.assign (t, m_name.c_str());
put(m_pmap, index, t);
}

View File

@ -35,7 +35,7 @@ public:
/// The circle type, only required if you want to detect tori
typedef unspecified_type Circle_2;
/// The 2D vector type, only required if you want to detect tori
typedef unspecified_type Vector_3;
typedef unspecified_type Vector_2;
/// The number type of the Cartesian coordinates of types Point_3
typedef unspecified_type FT;

View File

@ -440,6 +440,58 @@ corefine_and_compute_boolean_operations(
return CGAL::make_array(true, true, true, true);
}
// handle case of empty meshes (isolated vertices are ignored)
if (faces(tm1).empty())
{
if(faces(tm2).empty())
{
for (int i=0; i<4; ++i)
if (output[i] != boost::none)
clear(*(*output[i]));
return CGAL::make_array(true, true, true, true);
}
// tm2 is not empty
if (output[Corefinement::UNION] != boost::none)
if (&tm2 != *output[Corefinement::UNION])
copy_face_graph(tm2,
*(*output[Corefinement::UNION]),
parameters::vertex_point_map(vpm2),
parameters::vertex_point_map(*cpp11::get<Corefinement::UNION>(vpm_out_tuple)));
if (output[Corefinement::INTERSECTION] != boost::none)
clear(*(*output[Corefinement::INTERSECTION]));
if (output[Corefinement::TM1_MINUS_TM2] != boost::none)
clear(*(*output[Corefinement::TM1_MINUS_TM2]));
if (output[Corefinement::TM2_MINUS_TM1] != boost::none)
if (&tm2 != *output[Corefinement::TM2_MINUS_TM1])
copy_face_graph(tm2,
*(*output[Corefinement::TM2_MINUS_TM1]),
parameters::vertex_point_map(vpm2),
parameters::vertex_point_map(*cpp11::get<Corefinement::TM2_MINUS_TM1>(vpm_out_tuple)));
return CGAL::make_array(true, true, true, true);
}
else
if (faces(tm2).empty())
{
// tm1 is not empty
if (output[Corefinement::UNION] != boost::none)
if (&tm1 != *output[Corefinement::UNION])
copy_face_graph(tm1,
*(*output[Corefinement::UNION]),
parameters::vertex_point_map(vpm1),
parameters::vertex_point_map(*cpp11::get<Corefinement::UNION>(vpm_out_tuple)));
if (output[Corefinement::INTERSECTION] != boost::none)
clear(*(*output[Corefinement::INTERSECTION]));
if (output[Corefinement::TM2_MINUS_TM1] != boost::none)
clear(*(*output[Corefinement::TM2_MINUS_TM1]));
if (output[Corefinement::TM1_MINUS_TM2] != boost::none)
if (&tm1 != *output[Corefinement::TM1_MINUS_TM2])
copy_face_graph(tm1,
*(*output[Corefinement::TM1_MINUS_TM2]),
parameters::vertex_point_map(vpm1),
parameters::vertex_point_map(*cpp11::get<Corefinement::TM1_MINUS_TM2>(vpm_out_tuple)));
return CGAL::make_array(true, true, true, true);
}
// Edge is-constrained maps
//for input meshes
typedef typename boost::lookup_named_param_def <

View File

@ -115,13 +115,15 @@ void fill_pairs(const Halfedge& he,
++set_it->second.first; // increase the multiplicity
if(set_it->second.first == 2)
{
set_it->second.second = halfedge_pairs.size(); // set the id of the pair in the vector
halfedge_pairs.push_back( std::make_pair(set_it->first, he) );
if ( get(vpmap, source(he,pmesh))==get(vpmap, target(set_it->first,pmesh)) &&
get(vpmap, target(he,pmesh))==get(vpmap, source(set_it->first,pmesh)) )
{
set_it->second.second = halfedge_pairs.size(); // set the id of the pair in the vector
halfedge_pairs.push_back( std::make_pair(set_it->first, he) );
manifold_halfedge_pairs.push_back(true);
}
else
manifold_halfedge_pairs.push_back(false);
}
else
if ( set_it->second.first > 2 )

View File

@ -118,6 +118,20 @@ void test_surface_mesh_cc(const char* fname)
std::cout << "OK\n";
}
void bug_test()
{
typedef CGAL::Simple_cartesian<double> K;
typedef K::Point_3 Point_3;
CGAL::Surface_mesh<Point_3> tm;
CGAL::make_triangle(Point_3(0,0,0), Point_3(1,0,0), Point_3(0,1,0), tm);
CGAL::make_triangle(Point_3(0,0,0), Point_3(1,0,0), Point_3(0,1,0), tm);
CGAL::make_triangle(Point_3(0,0,0), Point_3(1,0,0), Point_3(0,1,0), tm);
CGAL::make_triangle(Point_3(0,0,0), Point_3(1,0,0), Point_3(0,1,0), tm);
CGAL::Polygon_mesh_processing::stitch_borders(tm);
}
int main()
{
test_stitch_boundary_cycles("data_stitching/boundary_cycle.off");
@ -150,5 +164,7 @@ int main()
test_surface_mesh("data_stitching/non_manifold.off");
test_surface_mesh_cc("data_stitching/nm_cubes.off");
bug_test();
return EXIT_SUCCESS;
}

View File

@ -1,5 +1,8 @@
#ifdef _MSC_VER
# pragma warning(disable:4244) // conversion with loss of data
# pragma warning(disable:4996) // boost_1_65_1\boost/iostreams/positioning.hpp(96):
// warning C4996: 'std::fpos<_Mbstatet>::seekpos': warning STL4019:
// The member std::fpos::seekpos() is non-Standard
#endif
#include "Volume_plane.h"

View File

@ -34,6 +34,8 @@ typedef Kernel::Point_3 Point;
namespace euler = CGAL::Euler;
using namespace CGAL::Three;
namespace params = CGAL::parameters;
class Q_DECL_EXPORT Basic_generator_plugin :
public QObject,
public Polyhedron_demo_plugin_helper
@ -548,7 +550,7 @@ void Basic_generator_plugin::generateSphere()
typedef typename boost::property_map<typename Facegraph_item::Face_graph, CGAL::vertex_point_t>::type VPMap;
if(precision !=0)
CGAL::Subdivision_method_3::Sqrt3_subdivision(sphere,
precision);
params::number_of_iterations(precision));
VPMap vpmap = get(CGAL::vertex_point, sphere);
//emplace the points back on the sphere
BOOST_FOREACH(typename boost::graph_traits<typename Facegraph_item::Face_graph>::vertex_descriptor vd, vertices(sphere))

View File

@ -877,7 +877,7 @@ Polyhedron_demo_mean_curvature_flow_skeleton_plugin::createContractedItem(Scene_
{
if(!item)
return;
if(item->mcs == NULL)
if(item->mcs != NULL)
delete item->mcs;
double omega_H = ui->omega_H->value();
double omega_P = ui->omega_P->value();

View File

@ -11,7 +11,10 @@
#include "Scene_surface_mesh_item.h"
#include "SMesh_type.h"
#include <CGAL/subdivision_method_3.h>
using namespace CGAL::Three;
namespace params = CGAL::parameters;
class Polyhedron_demo_subdivision_methods_plugin :
public QObject,
public Polyhedron_demo_plugin_helper
@ -81,7 +84,7 @@ void Polyhedron_demo_subdivision_methods_plugin::apply_loop(FaceGraphItem* item,
time.start();
messages->information("Loop subdivision...");
QApplication::setOverrideCursor(Qt::WaitCursor);
CGAL::Subdivision_method_3::Loop_subdivision(*graph, nb_steps);
CGAL::Subdivision_method_3::Loop_subdivision(*graph, params::number_of_iterations(nb_steps));
messages->information(QString("ok (%1 ms)").arg(time.elapsed()));
QApplication::restoreOverrideCursor();
item->invalidateOpenGLBuffers();
@ -113,7 +116,7 @@ void Polyhedron_demo_subdivision_methods_plugin::apply_catmullclark(FaceGraphIte
time.start();
messages->information("Catmull-Clark subdivision...");
QApplication::setOverrideCursor(Qt::WaitCursor);
CGAL::Subdivision_method_3::CatmullClark_subdivision(*graph, nb_steps);
CGAL::Subdivision_method_3::CatmullClark_subdivision(*graph, params::number_of_iterations(nb_steps));
messages->information(QString("ok (%1 ms)").arg(time.elapsed()));
QApplication::restoreOverrideCursor();
item->invalidateOpenGLBuffers();
@ -143,7 +146,7 @@ void Polyhedron_demo_subdivision_methods_plugin::apply_sqrt3(FaceGraphItem* item
time.start();
messages->information("Sqrt-3 subdivision...");
QApplication::setOverrideCursor(Qt::WaitCursor);
CGAL::Subdivision_method_3::Sqrt3_subdivision(*graph, nb_steps);
CGAL::Subdivision_method_3::Sqrt3_subdivision(*graph, params::number_of_iterations(nb_steps));
messages->information(QString("ok (%1 ms)").arg(time.elapsed()));
QApplication::restoreOverrideCursor();
item->invalidateOpenGLBuffers();
@ -175,7 +178,7 @@ void Polyhedron_demo_subdivision_methods_plugin::apply_doosabin(FaceGraphItem* i
time.start();
messages->information("Doo-Sabin subdivision...");
QApplication::setOverrideCursor(Qt::WaitCursor);
CGAL::Subdivision_method_3::DooSabin_subdivision(*graph, nb_steps);
CGAL::Subdivision_method_3::DooSabin_subdivision(*graph, params::number_of_iterations(nb_steps));
messages->information(QString("ok (%1 ms)").arg(time.elapsed()));
QApplication::restoreOverrideCursor();
item->invalidateOpenGLBuffers();

View File

@ -225,7 +225,7 @@ void Scene::refine_loop()
return;
}
std::cout << "Loop subdivision...";
CGAL::Subdivision_method_3::Loop_subdivision(*m_pPolyhedron, 1);
CGAL::Subdivision_method_3::Loop_subdivision(*m_pPolyhedron);
std::cout << "done (" << m_pPolyhedron->size_of_facets() << " facets)" << std::endl;
}

View File

@ -495,9 +495,9 @@ then \f$\lambda_i\geq 0\f$ (\f$\lambda_i\leq 0\f$, respectively).
<LI>
\f[
\begin{array}{llll}
&&\geq 0 & \mbox{if \f$u_j=\infty\f$} \\
&&\geq 0 & \mbox{if $u_j=\infty$} \\
\qplambda^T A_j &\quad \\
&&\leq 0 & \mbox{if \f$l_j=-\infty\f$.}
&&\leq 0 & \mbox{if $l_j=-\infty$}.
\end{array}
\f]
<LI> \f[\qplambda^T\qpb \quad<\quad \ccSum{j: \qplambda^TA_j <0}{}{ \qplambda^TA_j u_j }
@ -508,12 +508,12 @@ then \f$\lambda_i\geq 0\f$ (\f$\lambda_i\leq 0\f$, respectively).
that there is a feasible solution \f$\qpx\f$. Then we get
\f[
\begin{array}{lcll}
0 &\geq& \qplambda^T(A\qpx -\qpb) & \mbox{(by \f$A\qpx\qprel \qpb\f$ and 1.)} \\
0 &\geq& \qplambda^T(A\qpx -\qpb) & \mbox{(by $A\qpx\qprel \qpb$ and 1.)} \\
&=& \ccSum{j: \qplambda^TA_j <0}{}{ \qplambda^TA_j x_j }
\quad+\quad \ccSum{j: \qplambda^TA_j >0}{}{ \qplambda^TA_j x_j} - \qplambda^T \qpb \\
&\geq& \ccSum{j: \qplambda^TA_j <0}{}{ \qplambda^TA_j u_j }
\quad+\quad \ccSum{j: \qplambda^TA_j >0}{}{ \qplambda^TA_j l_j} - \qplambda^T \qpb &
\mbox{(by \f$\qpl\leq \qpx \leq \qpu\f$ and 2.)} \\
\mbox{(by $\qpl\leq \qpx \leq \qpu$ and 2.)} \\
&>& 0 & \mbox{(by 3.)},
\end{array}
\f]
@ -547,9 +547,9 @@ solution of (QP). The program (QP) is unbounded if an \f$n\f$-vector
then \f$(A\qpw)_i\leq 0\f$ (\f$(A\qpw)_i\geq 0, (A\qpw)_i=0\f$, respectively).
<LI> \f[
\begin{array}{llll}
&&\geq 0 & \mbox{if \f$l_j\f$ is finite} \\
&&\geq 0 & \mbox{if $l_j$ is finite} \\
w_j &\quad \\
&&\leq 0 & \mbox{if \f$u_j\f$ is finite.}
&&\leq 0 & \mbox{if $u_j$ is finite.}
\end{array}
\f]
<LI> \f$\qpw^TD\qpw=0\f$ and \f$(\qpc^T+2{\qpx^*}^TD)\qpw<0\f$.

View File

@ -1,3 +1,5 @@
@INCLUDE = ${CGAL_DOC_PACKAGE_DEFAULTS}
PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - Linear and Quadratic Programming Solver"
EXCLUDE = ${CGAL_PACKAGE_DOC_DIR}/fig_src

View File

@ -528,7 +528,7 @@ when we use the homogeneous representations of the points: if
\f$ q_1,\ldots,q_n,q\in\mathbb{R}^{d+1}\f$ are homogeneous coordinates for
\f$ p_1,\ldots,p_n,p\f$ with positive homogenizing coordinates
\f$ h_1,\ldots,h_n,h\f$, we have
\f[$q_j = h_j \cdot (p_j \mid 1) \mbox{~for all $j$, and~} q = h \cdot
\f[q_j = h_j \cdot (p_j \mid 1) \mbox{~for all $j$, and~} q = h \cdot
(p\mid 1).\f] Now, nonnegative \f$\lambda_1,\ldots,\lambda_n\f$ are
suitable coefficients for a convex combination if and only if
\f[\ccSum{j=1}{n}{~ \lambda_j(p_j \mid 1)} = (p\mid 1), \f]

View File

@ -113,20 +113,16 @@ The Taylor expansion of \f$ k_1\f$ (resp. \f$ k_2\f$) along the max
by \f$ x\f$ (resp. \f$ y\f$) are:
\anchor eqtaylor_along_line
\f[
\begin{equation}
\f{equation}{
k_1(x) = k_1 + b_0x + \frac{P_1}{2(k_1-k_2)}x^2 + ... , \quad \quad \quad
P_1= 3b_1^2+(k_1-k_2)(c_0-3k_1^3).
\end{equation}
\f]
\f}
\anchor eqtaylor_along_red_line
\f[
\begin{equation}
\f{equation}{
k_2(y) = k_2 + b_3y + \frac{P_2}{2(k_2-k_1)}y^2 + ... , \quad \quad \quad
P_2= 3b_2^2+(k_2-k_1)(c_4-3k_2^3).
\end{equation}
\f]
\f}
Notice also that switching from one to the other of the two
afore-mentioned coordinate systems reverts the sign of all the odd

View File

@ -58,6 +58,10 @@ public:
template < class T >
class In_place_list_base {
public:
In_place_list_base()
: next_link(NULL), prev_link(NULL)
{}
T* next_link; // forward pointer
T* prev_link; // backwards pointer
//friend class internal::In_place_list_iterator<T, Alloc>;

View File

@ -3,9 +3,24 @@
zmodload zsh/stat
set -e
git=git
if [ "x$1" = "x--help" -o "x$1" = "x-h" ]; then
cat <<EOF
Usage: $0
[HEAD] [BASE]
base=${1:-HEAD}
List the commits in the range BASE..HEAD, with --first-parent
and show for each the weight of the commit.
[HEAD] is the head of the branch you want to display.
Its default value is 'HEAD'.
[BASE] is the base of the range. Its default value is 'cgal/master'.
EOF
exit 0
fi
commit=${1:-HEAD}
base=${2:-cgal/master}
function reset() {
git update-ref -d refs/cgal/git-show-content
@ -14,7 +29,7 @@ function reset() {
trap reset ERR EXIT KILL TERM INT
for c in $(git --no-pager log --pretty='%h' --first-parent cgal/master..$base); do
for c in $(git --no-pager log --pretty='%h' --first-parent ${base}..${commit}); do
git update-ref refs/cgal/git-show-content $c
git bundle create bundle ${c}^..refs/cgal/git-show-content > /dev/null 2>&1
gzip -f bundle

View File

@ -26,7 +26,8 @@ int main()
assert( ifs );
SDG2 sdg;
SDG2::Site_2 site;
SDG2::Site_2 site =
SDG2::Site_2::construct_site_2(K::Point_2(CGAL::ORIGIN));
// read the sites and insert them in the segment Delaunay graph
while ( ifs >> site ) {

View File

@ -17,7 +17,8 @@ bool test_info(SDG& sdg, const char* fname)
assert( ifs );
sdg.clear();
typename SDG::Site_2 site;
typename SDG::Site_2 site =
SDG::Site_2::construct_site_2(typename SDG::Point_2(CGAL::ORIGIN));
// read the sites and insert them in the segment Delaunay graph
int info_id = 1;

View File

@ -30,7 +30,8 @@ int main( int argc, char *argv[] )
assert( ifs );
SDG2 sdg;
SDG2::Site_2 site;
SDG2::Site_2 site =
SDG2::Site_2::construct_site_2(Rep::Point_2(CGAL::ORIGIN));
// read the sites and insert them in the segment Delaunay graph
while ( ifs >> site ) {

View File

@ -160,7 +160,7 @@ namespace CGAL {
Implements the <I>midpoint of max spread</I> splitting rule.
A rectangle is cut through \f$ (\mathrm{Mind}+\mathrm{Maxd})/2\f$ orthogonal
to the dimension with the maximum point spread \f$ [\mathrm{Mind},\matrm{Maxd}]\f$.
to the dimension with the maximum point spread \f$ [\mathrm{Mind},\mathrm{Maxd}]\f$.
\cgalHeading{Parameters}

View File

@ -166,6 +166,7 @@ namespace CGAL {
inline FT
min_coord(int i) const
{
CGAL_assume(i<D::value);
CGAL_assertion(lower_.size() != 0);
return lower_[i];
}
@ -173,6 +174,7 @@ namespace CGAL {
inline FT
max_coord(int i) const
{
CGAL_assume(i<D::value);
return upper_[i];
}

View File

@ -95,10 +95,13 @@ namespace parameters = CGAL::parameters;
#ifndef DOXYGEN_RUNNING
// Backward compatibility
#ifndef CGAL_NO_DEPRECATED_CODE
template <class PolygonMesh>
void CatmullClark_subdivision(PolygonMesh& pmesh, int step = 1) {
CGAL_DEPRECATED_MSG("you are using the deprecated API of CatmullClark_subdivision(), please update your code")
void CatmullClark_subdivision(PolygonMesh& pmesh, int step) {
PQQ(pmesh, CatmullClark_mask_3<PolygonMesh>(&pmesh, get(vertex_point,pmesh)), step);
}
#endif
#endif
/*!
@ -138,14 +141,22 @@ void CatmullClark_subdivision(PolygonMesh& pmesh, const NamedParameters& np) {
internal::PQQ_1step(pmesh, vpm, mask);
}
template <class PolygonMesh>
void CatmullClark_subdivision(PolygonMesh& pmesh)
{
CatmullClark_subdivision(pmesh, CGAL::parameters::all_default());
}
// -----------------------------------------------------------------------------
#ifndef DOXYGEN_RUNNING
// backward compatibility
#ifndef CGAL_NO_DEPRECATED_CODE
template <class PolygonMesh>
void Loop_subdivision(PolygonMesh& pmesh, int step = 1) {
CGAL_DEPRECATED_MSG("you are using the deprecated API of Loop_subdivision(), please update your code")
void Loop_subdivision(PolygonMesh& pmesh, int step) {
PTQ(pmesh, Loop_mask_3<PolygonMesh>(&pmesh, get(vertex_point,pmesh)) , step);
}
#endif
#endif
/*!
@ -183,15 +194,23 @@ void Loop_subdivision(PolygonMesh& pmesh, const NamedParameters& np) {
internal::PTQ_1step(pmesh, vpm, mask);
}
template <class PolygonMesh>
void Loop_subdivision(PolygonMesh& pmesh)
{
Loop_subdivision(pmesh, CGAL::parameters::all_default());
}
// -----------------------------------------------------------------------------
#ifndef DOXYGEN_RUNNING
// backward compatibility
#ifndef CGAL_NO_DEPRECATED_CODE
template <class PolygonMesh>
void DooSabin_subdivision(PolygonMesh& pmesh, int step = 1) {
CGAL_DEPRECATED_MSG("you are using the deprecated API of DooSabin_subdivision(), please update your code")
void DooSabin_subdivision(PolygonMesh& pmesh, int step) {
DQQ(pmesh, DooSabin_mask_3<PolygonMesh>(&pmesh, get(vertex_point, pmesh)), step);
}
#endif
#endif
/*!
*
@ -227,16 +246,24 @@ void DooSabin_subdivision(PolygonMesh& pmesh, const NamedParameters& np) {
for(unsigned int i = 0; i < step; i++)
internal::DQQ_1step(pmesh, vpm, mask);
}
template <class PolygonMesh>
void DooSabin_subdivision(PolygonMesh& pmesh)
{
DooSabin_subdivision(pmesh, CGAL::parameters::all_default());
}
// -----------------------------------------------------------------------------
#ifndef DOXYGEN_RUNNING
// backward compatibility
#ifndef CGAL_NO_DEPRECATED_CODE
template <class PolygonMesh>
void Sqrt3_subdivision(PolygonMesh& pmesh, int step = 1) {
CGAL_DEPRECATED_MSG("you are using the deprecated API of Sqrt3_subdivision(), please update your code")
void Sqrt3_subdivision(PolygonMesh& pmesh, int step) {
Sqrt3(pmesh, Sqrt3_mask_3<PolygonMesh>(&pmesh, get(vertex_point,pmesh)), step);
}
#endif
#endif
/*!
*
@ -277,7 +304,12 @@ void Sqrt3_subdivision(PolygonMesh& pmesh, const NamedParameters& np) {
for(unsigned int i = 0; i < step; i++)
internal::Sqrt3_1step(pmesh, vpm, mask, (i%2==1));
}
template <class PolygonMesh>
void Sqrt3_subdivision(PolygonMesh& pmesh)
{
Sqrt3_subdivision(pmesh, CGAL::parameters::all_default());
}
/// @}
} // namespace Subdivision_method_3

View File

@ -57,7 +57,7 @@ void test_Subdivision_surface_3() {
Polyhedron P;
mesh >> P;
Subdivision_method_3::CatmullClark_subdivision(P,TEST_DEPTH);
Subdivision_method_3::CatmullClark_subdivision(P);
assert(CGAL::is_valid_polygon_mesh(P));
}
@ -68,7 +68,7 @@ void test_Subdivision_surface_3() {
Polyhedron P;
mesh >> P;
Subdivision_method_3::CatmullClark_subdivision(P,TEST_DEPTH);
Subdivision_method_3::CatmullClark_subdivision(P);
assert(CGAL::is_valid_polygon_mesh(P));
}
@ -80,7 +80,7 @@ void test_Subdivision_surface_3() {
Polyhedron P;
mesh >> P;
Subdivision_method_3::Loop_subdivision(P,TEST_DEPTH);
Subdivision_method_3::Loop_subdivision(P);
assert(CGAL::is_valid_polygon_mesh(P));
}
@ -91,7 +91,7 @@ void test_Subdivision_surface_3() {
Polyhedron P;
mesh >> P;
Subdivision_method_3::Loop_subdivision(P,TEST_DEPTH);
Subdivision_method_3::Loop_subdivision(P);
assert(CGAL::is_valid_polygon_mesh(P));
}
@ -102,7 +102,7 @@ void test_Subdivision_surface_3() {
Polyhedron P;
mesh >> P;
Subdivision_method_3::DooSabin_subdivision(P,TEST_DEPTH);
Subdivision_method_3::DooSabin_subdivision(P);
assert(CGAL::is_valid_polygon_mesh(P));
}
@ -113,7 +113,7 @@ void test_Subdivision_surface_3() {
Polyhedron P;
mesh >> P;
Subdivision_method_3::Sqrt3_subdivision(P,TEST_DEPTH);
Subdivision_method_3::Sqrt3_subdivision(P);
assert(CGAL::is_valid_polygon_mesh(P));
}
}
@ -129,7 +129,7 @@ void test_Subdivision_surface_3_SM() {
Polyhedron P;
mesh >> P;
Subdivision_method_3::CatmullClark_subdivision(P,TEST_DEPTH);
Subdivision_method_3::CatmullClark_subdivision(P);
assert(CGAL::is_valid_polygon_mesh(P));
}
@ -140,7 +140,7 @@ void test_Subdivision_surface_3_SM() {
Polyhedron P;
mesh >> P;
Subdivision_method_3::CatmullClark_subdivision(P,TEST_DEPTH);
Subdivision_method_3::CatmullClark_subdivision(P);
assert(CGAL::is_valid_polygon_mesh(P));
}
@ -152,7 +152,7 @@ void test_Subdivision_surface_3_SM() {
Polyhedron P;
mesh >> P;
Subdivision_method_3::Loop_subdivision(P,TEST_DEPTH);
Subdivision_method_3::Loop_subdivision(P);
assert(CGAL::is_valid_polygon_mesh(P));
}
@ -163,7 +163,7 @@ void test_Subdivision_surface_3_SM() {
Polyhedron P;
mesh >> P;
Subdivision_method_3::Loop_subdivision(P,TEST_DEPTH);
Subdivision_method_3::Loop_subdivision(P);
assert(CGAL::is_valid_polygon_mesh(P));
}
@ -174,7 +174,7 @@ void test_Subdivision_surface_3_SM() {
Polyhedron P;
mesh >> P;
Subdivision_method_3::DooSabin_subdivision(P,TEST_DEPTH);
Subdivision_method_3::DooSabin_subdivision(P);
assert(CGAL::is_valid_polygon_mesh(P, true));
}
@ -185,7 +185,7 @@ void test_Subdivision_surface_3_SM() {
Polyhedron P;
mesh >> P;
Subdivision_method_3::DooSabin_subdivision(P,TEST_DEPTH);
Subdivision_method_3::DooSabin_subdivision(P);
assert(CGAL::is_valid_polygon_mesh(P));
}
@ -196,7 +196,7 @@ void test_Subdivision_surface_3_SM() {
Polyhedron P;
mesh >> P;
Subdivision_method_3::Sqrt3_subdivision(P,TEST_DEPTH);
Subdivision_method_3::Sqrt3_subdivision(P);
assert(CGAL::is_valid_polygon_mesh(P));
}
@ -207,7 +207,7 @@ void test_Subdivision_surface_3_SM() {
Polyhedron P;
mesh >> P;
Subdivision_method_3::Sqrt3_subdivision(P,TEST_DEPTH);
Subdivision_method_3::Sqrt3_subdivision(P);
assert(CGAL::is_valid_polygon_mesh(P));
}
}
@ -284,7 +284,7 @@ void test_Subdivision_surface_3_SM_NP() {
Polyhedron P;
mesh >> P;
Subdivision_method_3::DooSabin_subdivision(P,TEST_DEPTH);
Subdivision_method_3::DooSabin_subdivision(P,Subdivision_method_3::parameters::number_of_iterations(TEST_DEPTH));
assert(CGAL::is_valid_polygon_mesh(P));
}

View File

@ -0,0 +1,362 @@
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
// ============================================================================
//
// Copyright (c) 2005-2006, 2017 Le-Jeng Shiue
//
// This software and related documentation is part of an INTERNAL release
// of the Computational Geometry Algorithms Library (CGAL). It is not
// intended for general use.
//
// ----------------------------------------------------------------------------
//
// release : $CGAL_Revision: $
// release_date : $CGAL_Date: $
//
// file : test/Subdivision_method_3/test_Subdivision_method_3.C
// package : Subdivision_method_3
// chapter : Subdivision Method
//
// revision : $Id$
// revision_date : $Date$
//
// author(s) : Le-Jeng Shiue <Andy.Shiue@gmail.com>
//
// Test subdivision methods
// ============================================================================
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/subdivision_method_3.h>
#include <iostream>
#include <fstream>
#include <cassert>
using namespace std;
using namespace CGAL;
#define TEST_DEPTH (3)
//#define TESTMESH_GENERAL "data/??.off"
#define TESTMESH_QUAD "data/corner.off"
#define TESTMESH_QUAD_OPEN "data/corner_with_hole.off"
#define TESTMESH_TRI "data/quint_tris.off"
#define TESTMESH_TRI_OPEN "data/nefertiti.off"
void test_Subdivision_surface_3() {
typedef CGAL::Simple_cartesian<double> Kernel;
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
// test Catmull-Clark subdivision on quad mesh
{
ifstream mesh(TESTMESH_QUAD);
Polyhedron P;
mesh >> P;
Subdivision_method_3::CatmullClark_subdivision(P,TEST_DEPTH);
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Catmull-Clark subdivision on 'opened' quad mesh
{
ifstream mesh(TESTMESH_QUAD_OPEN);
Polyhedron P;
mesh >> P;
Subdivision_method_3::CatmullClark_subdivision(P,TEST_DEPTH);
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Loop subdivision on tri mesh
{
ifstream mesh(TESTMESH_TRI);
Polyhedron P;
mesh >> P;
Subdivision_method_3::Loop_subdivision(P,TEST_DEPTH);
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Loop subdivision on 'opened' tri mesh
{
ifstream mesh(TESTMESH_TRI_OPEN);
Polyhedron P;
mesh >> P;
Subdivision_method_3::Loop_subdivision(P,TEST_DEPTH);
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Doo-Sabin subdivision on general mesh
{
ifstream mesh(TESTMESH_TRI_OPEN);
Polyhedron P;
mesh >> P;
Subdivision_method_3::DooSabin_subdivision(P,TEST_DEPTH);
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Sqrt-3 subdivision on tri mesh
{
ifstream mesh(TESTMESH_TRI);
Polyhedron P;
mesh >> P;
Subdivision_method_3::Sqrt3_subdivision(P,TEST_DEPTH);
assert(CGAL::is_valid_polygon_mesh(P));
}
}
void test_Subdivision_surface_3_SM() {
typedef CGAL::Simple_cartesian<double> Kernel;
typedef CGAL::Surface_mesh<Kernel::Point_3> Polyhedron;
// test Catmull-Clark subdivision on quad mesh
{
ifstream mesh(TESTMESH_QUAD);
Polyhedron P;
mesh >> P;
Subdivision_method_3::CatmullClark_subdivision(P,TEST_DEPTH);
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Catmull-Clark subdivision on 'opened' quad mesh
{
ifstream mesh(TESTMESH_QUAD_OPEN);
Polyhedron P;
mesh >> P;
Subdivision_method_3::CatmullClark_subdivision(P,TEST_DEPTH);
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Loop subdivision on tri mesh
{
ifstream mesh(TESTMESH_TRI);
Polyhedron P;
mesh >> P;
Subdivision_method_3::Loop_subdivision(P,TEST_DEPTH);
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Loop subdivision on 'opened' tri mesh
{
ifstream mesh(TESTMESH_TRI_OPEN);
Polyhedron P;
mesh >> P;
Subdivision_method_3::Loop_subdivision(P,TEST_DEPTH);
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Doo-Sabin subdivision on general mesh
{
ifstream mesh(TESTMESH_TRI_OPEN);
Polyhedron P;
mesh >> P;
Subdivision_method_3::DooSabin_subdivision(P,TEST_DEPTH);
assert(CGAL::is_valid_polygon_mesh(P, true));
}
// test Doo-Sabin subdivision on 'opened' quad mesh
{
ifstream mesh(TESTMESH_QUAD_OPEN);
Polyhedron P;
mesh >> P;
Subdivision_method_3::DooSabin_subdivision(P,TEST_DEPTH);
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Sqrt-3 subdivision on tri mesh
{
ifstream mesh(TESTMESH_TRI);
Polyhedron P;
mesh >> P;
Subdivision_method_3::Sqrt3_subdivision(P,TEST_DEPTH);
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Sqrt-3 subdivision on 'opened' tri mesh
{
ifstream mesh(TESTMESH_TRI_OPEN);
Polyhedron P;
mesh >> P;
Subdivision_method_3::Sqrt3_subdivision(P,TEST_DEPTH);
assert(CGAL::is_valid_polygon_mesh(P));
}
}
void test_Subdivision_surface_3_SM_NP() {
typedef CGAL::Simple_cartesian<double> Kernel;
typedef CGAL::Surface_mesh<Kernel::Point_3> Polyhedron;
// test Catmull-Clark subdivision on quad mesh
{
ifstream mesh(TESTMESH_QUAD);
Polyhedron P;
mesh >> P;
Subdivision_method_3::CatmullClark_subdivision(P,Subdivision_method_3::parameters::vertex_point_map(get(vertex_point, P))
.number_of_iterations(TEST_DEPTH));
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Catmull-Clark subdivision on 'opened' quad mesh
{
ifstream mesh(TESTMESH_QUAD_OPEN);
Polyhedron P;
mesh >> P;
Subdivision_method_3::CatmullClark_subdivision(P,Subdivision_method_3::parameters::vertex_point_map(get(vertex_point, P))
.number_of_iterations(TEST_DEPTH));
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Loop subdivision on tri mesh
{
ifstream mesh(TESTMESH_TRI);
Polyhedron P;
mesh >> P;
Subdivision_method_3::Loop_subdivision(P,Subdivision_method_3::parameters::vertex_point_map(get(vertex_point, P))
.number_of_iterations(TEST_DEPTH));
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Loop subdivision on 'opened' tri mesh
{
ifstream mesh(TESTMESH_TRI_OPEN);
Polyhedron P;
mesh >> P;
Subdivision_method_3::Loop_subdivision(P,Subdivision_method_3::parameters::vertex_point_map(get(vertex_point, P))
.number_of_iterations(TEST_DEPTH));
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Doo-Sabin subdivision on 'opened' tri mesh
{
ifstream mesh(TESTMESH_TRI_OPEN);
Polyhedron P;
mesh >> P;
Subdivision_method_3::DooSabin_subdivision(P,Subdivision_method_3::parameters::vertex_point_map(get(vertex_point, P))
.number_of_iterations(TEST_DEPTH));
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Doo-Sabin subdivision on 'opened' quad mesh
{
ifstream mesh(TESTMESH_QUAD_OPEN);
Polyhedron P;
mesh >> P;
Subdivision_method_3::DooSabin_subdivision(P,TEST_DEPTH);
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Sqrt-3 subdivision on tri mesh
{
ifstream mesh(TESTMESH_TRI);
Polyhedron P;
mesh >> P;
Subdivision_method_3::Sqrt3_subdivision(P,Subdivision_method_3::parameters::vertex_point_map(get(vertex_point, P))
.number_of_iterations(TEST_DEPTH));
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Sqrt-3 subdivision on 'opened' tri mesh
{
ifstream mesh(TESTMESH_TRI_OPEN);
Polyhedron P;
mesh >> P;
Subdivision_method_3::Sqrt3_subdivision(P,Subdivision_method_3::parameters::vertex_point_map(get(vertex_point, P))
.number_of_iterations(TEST_DEPTH));
std::ofstream out("out_0.off");
out << P;
assert(CGAL::is_valid_polygon_mesh(P));
}
// test Sqrt-3 subdivision on 'opened' tri mesh & with external property map
{
ifstream mesh(TESTMESH_TRI_OPEN);
Polyhedron P;
mesh >> P;
typedef Kernel::Point_3 Point;
typedef Kernel::Vector_3 Vector;
typedef boost::graph_traits<Polyhedron>::vertex_descriptor vertex_descriptor;
typedef boost::unordered_map<vertex_descriptor, Kernel::Point_3> Point_pmap;
typedef boost::associative_property_map<Point_pmap> APM;
typedef boost::property_map<Polyhedron, CGAL::vertex_point_t>::type VPM;
Point_pmap um;
APM apm(um);
VPM vpm = get(vertex_point, P);
// some arbitrary new coordinates (different from the internal vpm)
BOOST_FOREACH(vertex_descriptor vd, vertices(P)) {
boost::property_traits<VPM>::reference pt = get(vpm, vd);
Vector v = pt - Point(0., 0., -3.);
put(apm, vd, pt + 0.5*v);
}
Subdivision_method_3::Sqrt3_subdivision(P,
Subdivision_method_3::parameters::vertex_point_map(apm)
.number_of_iterations(TEST_DEPTH));
assert(CGAL::is_valid_polygon_mesh(P));
}
}
int main() {
test_Subdivision_surface_3();
test_Subdivision_surface_3_SM();
test_Subdivision_surface_3_SM_NP();
std::cerr << "Done" << std::endl;
return 0;
}
// EOF //

View File

@ -2159,10 +2159,18 @@ private: //------------------------------------------------------- private data
std::string off;
is >> sm_skip_comments;
is >> off;
CGAL_assertion( (off == "OFF") || (off == "COFF") || (off == "NOFF") || (off == "CNOFF"));
if(! (
(off == "OFF") || (off == "COFF") || (off == "NOFF") || (off == "CNOFF")
)
)
{
is.setstate(std::ios::failbit);
return false;
}
is >> n >> f >> e;
if(!is){
return false;
}
sm.reserve(sm.num_vertices()+n, sm.num_faces()+2*f, sm.num_edges()+e);
std::vector<Vertex_index> vertexmap(n);
P p;
@ -2219,6 +2227,10 @@ private: //------------------------------------------------------- private data
for(int i=0; i < f; i++){
is >> sm_skip_comments;
is >> d;
if(!is){
sm.clear();
return false;
}
vr.resize(d);
for(std::size_t j=0; j<d; j++){
is >> vi;
@ -2555,6 +2567,11 @@ void
Surface_mesh<P>::
collect_garbage(F& funct)
{
if (!has_garbage())
{
return;
}
int i, i0, i1,
nV(num_vertices()),
nE(num_edges()),

View File

@ -255,12 +255,10 @@ The <em>Laplacian representation</em> (referred to as <em>Laplace coordinates</e
of a vertex in a surface mesh is one way to <em>encode</em> the local neighborhood of a vertex in the surface mesh.
In this representation, a vertex \f$ \mathbf{v}_i \f$ is associated a 3D vector defined as:
\f[
\begin{equation}
\f{equation}{
L(\mathbf{v}_i) = \sum_{\mathbf{v}_j \in N(\mathbf{v}_i)} w_{ij}(\mathbf{v}_i - \mathbf{v}_j),
\label{eq:lap_open}
\end{equation}
\f]
\f}
where:
- \f$N(\mathbf{v}_i)\f$ denotes the set of vertices adjacent to \f$\mathbf{v}_i\f$;
@ -282,12 +280,10 @@ Laplacian representation of \f$ v_i \f$ with uniform weights: the red square ver
Considering a surface mesh with \f$n\f$ vertices, it is possible to define its <i>Laplacian representation</i> \f$\Delta\f$ as a \f$n \times 3\f$ matrix:
\f[
\begin{equation}
\f{equation}{
\mathbf{L}\mathbf{V} = \Delta,
\label{eq:lap_system}
\end{equation}
\f]
\f}
where:
- \f$\mathbf{L}\f$ is a \f$n \times n\f$ sparse matrix, referred to as the <em>Laplacian matrix</em>. Its elements \f$ m_{ij} \f$, \f$i,j \in \{1 \dots n\} \f$ are defined as follows:
@ -313,8 +309,7 @@ This package supports hard constraints, that is, target positions of control ver
Given a surface mesh deformation system with a ROI made of \f$ n \f$ vertices and \f$ k \f$ control vertices, we consider the following linear system:
\f[
\begin{equation}
\f{equation}{
\left[
\begin{array}{ccc}
\mathbf{L}_f\\
@ -329,8 +324,7 @@ Given a surface mesh deformation system with a ROI made of \f$ n \f$ vertices an
\end{array}
\right],
\label{eq:lap_energy_system}
\end{equation}
\f]
\f}
where:
- \f$\mathbf{V}\f$ is a \f$n \times 3\f$ matrix denoting the unknowns of the system that represent the vertex coordinates after deformation. The system is built so that the \f$ k \f$ last rows correspond to the control vertices.
@ -348,14 +342,12 @@ preserves the Laplacian representation of the surface mesh restricted to the unc
Given a surface mesh \f$M\f$ with \f$ n \f$ vertices \f$ \{\mathbf{v}_i\} i \in \{1 \dots n \} \f$ and some deformation
constraints, we consider the following energy function:
\f[
\begin{equation}
\f{equation}{
\sum_{\mathbf{v}_i \in M}
\sum_{\mathbf{v}_j \in N(\mathbf{v}_i)} w_{ij}
\left\| (\mathbf{v}'_i - \mathbf{v}'_j) - \mathbf{R}_i(\mathbf{v}_i - \mathbf{v}_j) \right\|^2,
\label{eq:arap_energy}
\end{equation}
\f]
\f}
where:
- \f$\mathbf{R}_i\f$ is a \f$ 3 \times 3 \f$ rotation matrix
@ -387,12 +379,10 @@ Each such term of the energy is minimized by using a two-step optimization appro
In the first step, the positions of the vertices are considered as fixed so that the rotation matrices are the only unknowns.
For the vertex \f$\mathbf{v}_i\f$, we consider the covariance matrix \f$\mathbf{S}_i\f$:
\f[
\begin{equation}
\f{equation}{
\mathbf{S}_i = \sum_{\mathbf{v}_j \in N(\mathbf{v}_i)} w_{ij} (\mathbf{v}_i - \mathbf{v}_j)(\mathbf{v}'_i - \mathbf{v}'_j)^T,
\label{eq:cov_matrix}
\end{equation}
\f]
\f}
It was shown \cgalCite{Sorkine2009LeastSquaresRigid} that minimizing the energy contribution of
\f$\mathbf{v}_i\f$ in Eq. \f$\eqref{eq:arap_energy}\f$ is equivalent to maximizing the trace of the matrix
@ -404,13 +394,11 @@ In the second step, the rotation matrices are substituted into the partial deriv
with respect to \f$\mathbf{v}'_i\f$. Assuming the weights are symmetric, setting the derivative to zero results in the
following equation:
\f[
\begin{equation}
\f{equation}{
\sum_{\mathbf{v}_j \in N(\mathbf{v}_i)} w_{ij}(\mathbf{v}'_i - \mathbf{v}'_j) =
\sum_{\mathbf{v}_j \in N(\mathbf{v}_i)} w_{ij} \frac{(\mathbf{R}_i + \mathbf{R}_j)}{2} (\mathbf{v}_i - \mathbf{v}_j).
\label{eq:lap_ber}
\end{equation}
\f]
\f}
The left-hand side of this equation corresponds to the one of Eq.\f$\eqref{eq:lap_open}\f$,
and we can set \f$\Delta\f$ to be the right-hand side.
@ -428,13 +416,11 @@ The original algorithm \cgalCite{Sorkine2007AsRigidAs} we described assumes that
- the weight between two vertices is symmetric. In order to support asymmetric weights in our implementation,
we slightly change Eq. \f$\eqref{eq:lap_ber}\f$ to:
\f[
\begin{equation}
\f{equation}{
\sum_{\mathbf{v}_j \in N(\mathbf{v}_i)} (w_{ij} + w_{ji})(\mathbf{v}'_i - \mathbf{v}'_j) =
\sum_{\mathbf{v}_j \in N(\mathbf{v}_i)} (w_{ij}\mathbf{R}_i + w_{ji}\mathbf{R}_j)(\mathbf{v}_i - \mathbf{v}_j).
\label{eq:lap_ber_asym}
\end{equation}
\f]
\f}
- The energy contribution of each vertex is positive. If the weight between two vertices is always positive, this is always the case.
However, when using the cotangent weighting scheme (the default in our implementation), if the sum of the angles opposite to an edge is greater than \f$ \pi \f$,
@ -448,14 +434,12 @@ A method minimizing another energy function is described next to avoid the latte
The elastic energy function proposed by \cgalCite{Chao2010SimpleGeomModel} additionally takes into account
all the opposite edges in the facets incident to a vertex. The energy function to minimize becomes:
\f[
\begin{equation}
\f{equation}{
\sum_{\mathbf{v}_i \in M}
\sum_{(\mathbf{v}_j, \mathbf{v}_k) \in E(\mathbf{v}_i)} w_{jk}
\left\| (\mathbf{v}'_j - \mathbf{v}'_k) - \mathbf{R}_i(\mathbf{v}_j - \mathbf{v}_k) \right\|^2,
\label{eq:arap_energy_rims}
\end{equation}
\f]
\f}
where \f$E(\mathbf{v}_i)\f$ consists of the set of edges incident to \f$\mathbf{v}_i\f$ (the <em>spokes</em>) and
the set of edges in the link (the <em>rims</em>) of \f$\mathbf{v}_i\f$ in the surface mesh \f$M\f$
@ -470,23 +454,19 @@ The method to get the new positions of the unconstrained vertices is similar to
method explained in \ref SMD_Overview_ARAP.
For the first step, the Eq. \f$\eqref{eq:cov_matrix}\f$ is modified to take into account the edges in \f$E(\mathbf{v}_i)\f$:
\f[
\begin{equation}
\f{equation}{
\mathbf{S}_i = \sum_{(\mathbf{v}_j, \mathbf{v}_k) \in E(\mathbf{v}_i)} w_{jk} (\mathbf{v}_j - \mathbf{v}_k)(\mathbf{v}'_j - \mathbf{v}'_k)^T,
\label{eq:cov_matrix_sr}
\end{equation}
\f]
\f}
For the second step, setting partial derivative of Eq. \f$\eqref{eq:arap_energy_rims}\f$ to zero with
respect to \f$\mathbf{v}_i\f$ gives the following equation:
\f[
\begin{equation}
\f{equation}{
\sum_{\mathbf{v}_j \in N(\mathbf{v}_i)} (w_{ij} + w_{ji})(\mathbf{v}'_i - \mathbf{v}'_j) =
\sum_{\mathbf{v}_j \in N(\mathbf{v}_i)} \frac{w_{ij}(\mathbf{R}_i + \mathbf{R}_j + \mathbf{R}_m) + w_{ji}(\mathbf{R}_i + \mathbf{R}_j + \mathbf{R}_n)}{3} (\mathbf{v}_i - \mathbf{v}_j).
\label{eq:lap_ber_rims}
\end{equation}
\f]
\f}
where \f$\mathbf{R}_m\f$ and \f$\mathbf{R}_n\f$ are the rotation matrices of the vertices \f$\mathbf{v}_m\f$,
\f$\mathbf{v}_n\f$ which are the opposite vertices of the edge \f$\mathbf{v}_i \mathbf{v}_j\f$
@ -504,14 +484,12 @@ The implementation in this package uses the cotangent weights by default (negati
\subsection SMD_Overview_SRE_ARAP Smoothed Rotation Enhanced As-Rigid-As Possible (SR_ARAP) Deformation
Using 1-ring elements, SR-ARAP adds a bending element to Eq. \f$\eqref{eq:arap_energy}\f$:
\f[
\begin{equation}
\f{equation}{
\sum_{\mathbf{v}_i \in M}
\sum_{\mathbf{v}_j \in N(\mathbf{v}_i)} w_{ij}
\left\| (\mathbf{v}'_i - \mathbf{v}'_j) - \mathbf{R}_i(\mathbf{v}_i - \mathbf{v}_j) \right\|^2 + \alpha A \left\| \mathbf{R}_i - \mathbf{R}_j \right\|^2_F
\label{eq:sre_arap_energy}
\end{equation}
\f]
\f}
where
- \f$\alpha=0.02\f$ is a weighting coefficient.

View File

@ -93,8 +93,8 @@ template < class Refs, class Point, class ID, class vertex_descriptor>
struct Skel_HDS_vertex_type : public HalfedgeDS_vertex_max_base_with_id<Refs, Point, ID>
{
typedef HalfedgeDS_vertex_max_base_with_id<Refs, Point, ID> Base;
Skel_HDS_vertex_type() : Base (), is_fixed(false) {}
Skel_HDS_vertex_type( Point const& p) : Base(p), is_fixed(false) {}
Skel_HDS_vertex_type() : Base (), pole(ORIGIN), is_fixed(false) {}
Skel_HDS_vertex_type( Point const& p) : Base(p), pole(ORIGIN), is_fixed(false) {}
std::vector<vertex_descriptor> vertices;
Point pole;
bool is_fixed;

View File

@ -266,7 +266,7 @@ Triangulation_line_face_circulator_2(const Point& pp,
int in;
switch(pqs) {
case LEFT_TURN:
*this = Line_face_circulator();
pos = Face_handle();
return;
case COLLINEAR:
fn = fc->neighbor(i);
@ -306,7 +306,7 @@ Triangulation_line_face_circulator_2(const Point& pp,
// if line (p,q) does not intersect the convex hull in an edge
// the circulator has a singular value
*this=Line_face_circulator();
pos=Face_handle();
return;
}
@ -368,7 +368,7 @@ Triangulation_line_face_circulator_2(const Point& pp,
return;
} else {
// singular value
*this = Line_face_circulator();
pos=Face_handle();
return;
}
case LEFT_TURN :

View File

@ -129,7 +129,6 @@ does not require preprocessing is advantageous.
The following example shows how to obtain the regularized and non-regularized visibility regions.
\cgalFigureBegin{simple_example, simple_example.png}
The visibility region of \f$ q \f$ in a simple polygon: (1) non-regularized visibility; and (2) regularized visibility.
\cgalFigureEnd
\cgalExample{Visibility_2/simple_polygon_visibility_2.cpp}