Merge remote-tracking branch 'cgal/releases/CGAL-5.0-branch'

This commit is contained in:
Sébastien Loriot 2020-04-22 13:27:29 +02:00
commit c5af2b25f3
8 changed files with 62 additions and 47 deletions

View File

@ -11,7 +11,7 @@ function mytime {
function build_examples {
mkdir -p build-travis
cd build-travis
mytime cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" ..
mytime cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCGAL_BUILD_THREE_DOC=TRUE ..
mytime make -j2 VERBOSE=1
}
@ -96,7 +96,7 @@ cd $ROOT
cd $ROOT
mkdir build_test
cd build_test
mytime cmake -DCMAKE_INSTALL_PREFIX=install/ ..
mytime cmake -DCMAKE_INSTALL_PREFIX=install/ -DCGAL_BUILD_THREE_DOC=TRUE ..
mytime make install
# test install with minimal downstream example
mkdir installtest
@ -110,7 +110,7 @@ cd $ROOT
echo 'target_link_libraries(${PROJECT_NAME} CGAL::CGAL)' >> CMakeLists.txt
echo '#include "CGAL/remove_outliers.h"' >> main.cpp
cd build
mytime cmake -DCMAKE_INSTALL_PREFIX=../../install ..
mytime cmake -DCMAKE_INSTALL_PREFIX=../../install -DCGAL_BUILD_THREE_DOC=TRUE ..
cd ..
exit 0
fi

View File

@ -950,11 +950,12 @@ _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::point_position
if ( p.is_rational() ){
const Rational& px = ((Rat_point_2) p).x();
const Rational px = ((Rat_point_2) p).x();
Integer denom_px=nt_traits.denominator(px);
Integer numer_px=nt_traits.numerator(px);
Polynomial poly_px = CGAL::sign(numer_px) == ZERO ? Polynomial() : nt_traits.construct_polynomial(&numer_px,0);
Integer poly_px_scale = numer_px * _curve.x_norm();
Polynomial poly_px = CGAL::sign(numer_px) == ZERO ? Polynomial() : nt_traits.construct_polynomial(&poly_px_scale,0);
Polynomial poly_x = nt_traits.scale(_curve.x_polynomial(),denom_px) - poly_px;
std::vector <Algebraic> roots;

View File

@ -68,14 +68,13 @@ The value type of the `OutputIterator` is either
`Polygon_with_holes_2` or
`General_polygon_with_holes_2`.
The signature of the function is
\code
OutputIterator difference(const Type1 & p1, const Type2 & p2, OutputIterator oi);
\endcode
The signature of the function is:
- `%OutputIterator %difference(const Type1 & p1, const Type2 & p2, %OutputIterator oi);`
\cgalHeading{Parameters}
The types of the paramters of the `difference()` function are any of the following combinations.
The types of the parameters of the `difference()` function are any of the following combinations.
<div align="left">
<table cellpadding=3 border="1">
@ -187,14 +186,13 @@ namespace CGAL {
Each one of these functions computes if the interior of two given
polygons `p1` and `p2` intersect.
The signature of the function is
\code
bool do_intersect(const Type1 & p1, const Type2 & p2);
\endcode
The signature of the function is:
- `bool do_intersect(const Type1 & p1, const Type2 & p2);`
\cgalHeading{Parameters}
The types of the paramters of the `do_intersect()` function are any of the following combinations.
The types of the parameters of the \link ref_bso_do_intersect `do_intersect()` \endlink function are any of the following combinations.
<div align="left">
<table cellpadding=3 border="1">
@ -316,15 +314,14 @@ holes into an output container through a given output iterator
`General_polygon_with_holes_2`.
The signature of the function is
\code
OutputIterator intersection(const Type1 & p1, const Type2 & p2, OutputIterator oi);
\endcode
The signature of the function is:
- `%OutputIterator %intersection(const Type1 & p1, const Type2 & p2, %OutputIterator oi);`
\cgalHeading{Parameters}
The types of the paramters of the `intersection()` function are any of the following combinations.
The types of the parameters of the `intersection()` function are any of the following combinations.
<div align="left">
@ -476,14 +473,13 @@ Each one of these functions computes the union of two given polygons
returns `false`.
The signature of the function is
\code
bool join(const Type1 & p1, const Type2 & p2, General_polygon_with_holes_2 & res);
\endcode
The signature of the function is:
- `bool join(const Type1 & p1, const Type2 & p2, General_polygon_with_holes_2 & res);`
\cgalHeading{Parameters}
The types of the paramters of the `join()` function are any of the following combinations.
The types of the parameters of the `join()` function are any of the following combinations.
<div align="left">
<table cellpadding=3 border="1">
@ -630,14 +626,12 @@ given polygons `p1` and `p2` intersect in their interior,
all, and `ON_ORIENTED_BOUNDARY` if `p1` and `p2` intersect
only in their boundaries.
The signature of the function is
\code
Oriented_side oriented_side(const Type1 & p1, const Type2 & p2);
\endcode
The signature of the function is:
- `Oriented_side oriented_side(const Type1 & p1, const Type2 & p2);`
\cgalHeading{Parameters}
The types of the paramters of the `oriented_side()` function are any of the following combinations.
The types of the parameters of the `oriented_side()` function are any of the following combinations.
<div align="left">
<table cellpadding=3 border="1">
@ -716,14 +710,12 @@ iterator `oi`. The value type of the `OutputIterator` is either
`Polygon_with_holes_2` or
`General_polygon_with_holes_2`.
The signature of the function is
\code
OutputIterator symmetric_difference(const Type1 & p1, const Type2 & p2, OutputIterator oi);
\endcode
The signature of the function is:
- `%OutputIterator symmetric_difference(const Type1 & p1, const Type2 & p2, %OutputIterator oi);`
\cgalHeading{Parameters}
The types of the paramters of the `symmetric_difference()` function are any of the following combinations.
The types of the parameters of the `symmetric_difference()` function are any of the following combinations.
<div align="left">
<table cellpadding=3 border="1">

View File

@ -344,6 +344,12 @@ else()
endforeach()
endif()
option(CGAL_BUILD_THREE_DOC "Build the documentation of the Three package" OFF)
if (NOT CGAL_BUILD_THREE_DOC)
list(REMOVE_ITEM CGAL_DOC_PACKAGES "Three")
endif()
foreach(package ${CGAL_DOC_PACKAGES})
configure_doxygen_package(${package})
endforeach()

View File

@ -1171,7 +1171,7 @@ You must disable CGAL_ENABLE_CHECK_HEADERS.")
# Build the doc
set(DOC_DIR "${CMAKE_BINARY_DIR}/build_doc")
file(MAKE_DIRECTORY "${DOC_DIR}")
execute_process(COMMAND "${CMAKE_COMMAND}" -DDOXYGEN_EXECUTABLE=${DOXYGEN_EXECUTABLE} "${CMAKE_SOURCE_DIR}/Documentation/doc"
execute_process(COMMAND "${CMAKE_COMMAND}" -DCGAL_BUILD_THREE_DOC=TRUE -DDOXYGEN_EXECUTABLE=${DOXYGEN_EXECUTABLE} "${CMAKE_SOURCE_DIR}/Documentation/doc"
WORKING_DIRECTORY "${DOC_DIR}"
)
execute_process(COMMAND "${CMAKE_COMMAND}" --build . --target "doc"

View File

@ -321,8 +321,8 @@ public:
void clear()
{
m_base.clear();
boost::tie (m_indices, boost::tuples::ignore) = this->add_property_map<Index>("index", typename Index::size_type(-1));
boost::tie (m_points, boost::tuples::ignore) = this->add_property_map<Point>("point", Point (0., 0., 0.));
m_indices = this->add_property_map<Index>("index", typename Index::size_type(-1)).first;
m_points = this->add_property_map<Point>("point", CGAL::ORIGIN).first;
m_nb_removed = 0;
}
@ -336,12 +336,12 @@ public:
{
Base other;
other.template add<Index>("index", typename Index::size_type(-1));
other.template add<Point>("point", Point (0., 0., 0.));
other.template add<Point>("point", CGAL::ORIGIN);
other.resize(m_base.size());
other.transfer(m_base);
m_base.swap(other);
boost::tie (m_indices, boost::tuples::ignore) = this->property_map<Index>("index");
boost::tie (m_points, boost::tuples::ignore) = this->property_map<Point>("point");
m_indices = this->property_map<Index>("index").first;
m_points = this->property_map<Point>("point").first;
}
/*!
@ -790,7 +790,7 @@ public:
{
Property_map<T> pm;
bool added = false;
boost::tie (pm, added) = m_base.template add<T> (name, t);
std::tie (pm, added) = m_base.template add<T> (name, t);
return std::make_pair (pm, added);
}
@ -811,7 +811,7 @@ public:
{
Property_map<T> pm;
bool okay = false;
boost::tie (pm, okay) = m_base.template get<T>(name);
std::tie (pm, okay) = m_base.template get<T>(name);
return std::make_pair (pm, okay);
}
@ -852,10 +852,10 @@ public:
that is `true` if the property was added and `false` if it already
exists (and was therefore not added but only returned).
*/
std::pair<Vector_map, bool> add_normal_map (const Vector& default_value = Vector(0., 0., 0.))
std::pair<Vector_map, bool> add_normal_map (const Vector& default_value = CGAL::NULL_VECTOR)
{
bool out = false;
boost::tie (m_normals, out) = this->add_property_map<Vector> ("normal", default_value);
std::tie (m_normals, out) = this->add_property_map<Vector> ("normal", default_value);
return std::make_pair (m_normals, out);
}
/*!

View File

@ -1109,9 +1109,25 @@ namespace internal {
std::size_t hash_value(const CC_iterator<DSC, Const>& i)
{
typedef Time_stamper_impl<typename DSC::value_type> Stamper;
return Stamper::hash_value(&*i);
return Stamper::hash_value(i.operator->());
}
namespace handle {
// supply a specialization for Hash_functor
// forward declare base template
template <class H> struct Hash_functor;
template<class DSC, bool Const>
struct Hash_functor<CC_iterator<DSC, Const>>{
std::size_t
operator()(const CC_iterator<DSC, Const>& i)
{
return hash_value(i);
}
};
} // namespace handle
} // namespace internal
} //namespace CGAL

View File

@ -30,7 +30,7 @@ do
fi
done
cmake -DCGAL_HEADER_ONLY=FALSE -DCGAL_ENABLE_CHECK_HEADERS=TRUE -DDOXYGEN_EXECUTABLE="$DOX_PATH" -DCGAL_COPY_DEPENDENCIES=TRUE -DCMAKE_CXX_FLAGS="-std=c++1y" ..
cmake -DCGAL_HEADER_ONLY=FALSE -DCGAL_BUILD_THREE_DOC=TRUE -DCGAL_ENABLE_CHECK_HEADERS=TRUE -DDOXYGEN_EXECUTABLE="$DOX_PATH" -DCGAL_COPY_DEPENDENCIES=TRUE -DCMAKE_CXX_FLAGS="-std=c++1y" ..
if [ -n "$DO_CHECK_HEADERS" ]; then
make -j$(nproc --all) -k check_headers
fi