Skip to content

Commit

Permalink
Merge branch 'master' into CORE-boost_mp_number-GF
Browse files Browse the repository at this point in the history
  • Loading branch information
sloriot authored Mar 25, 2024
2 parents 5b88dfa + a5f7ffb commit a42ffde
Show file tree
Hide file tree
Showing 219 changed files with 7,879 additions and 2,890 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: REUSE version
uses: fsfe/reuse-action@v2
uses: fsfe/reuse-action@v3
with:
args: --version
- name: REUSE lint
uses: fsfe/reuse-action@v2
uses: fsfe/reuse-action@v3
with:
args: --include-submodules lint
- name: REUSE SPDX SBOM
uses: fsfe/reuse-action@v2
uses: fsfe/reuse-action@v3
with:
args: spdx
- name: install dependencies
run: sudo apt-get install -y cmake
run: sudo apt-get update && sudo apt-get install -y cmake
- name: Create CGAL internal release
run: |
mkdir -p ./release
cmake -DDESTINATION=./release -DCGAL_VERSION=9.9 -P ./Scripts/developer_scripts/cgal_create_release_with_cmake.cmake
- name: REUSE lint release tarball
uses: fsfe/reuse-action@v2
uses: fsfe/reuse-action@v3
with:
args: --root ./release/CGAL-9.9 --include-submodules lint
1 change: 1 addition & 0 deletions CGAL_Core/examples/Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ if(NOT CGAL_Core_FOUND)
return()
endif()

create_single_source_cgal_program("zero-one.cpp")
create_single_source_cgal_program("delaunay.cpp")
32 changes: 32 additions & 0 deletions CGAL_Core/examples/Core/zero-one.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

#include <CGAL/CORE_Expr.h>

typedef CORE::Expr Real;

int main()
{
Real r(3.14);

CGAL::is_zero(r);

CGAL::is_one(r);

r = CGAL::sqrt(r);


CGAL::is_zero(r);

CGAL::is_one(r);

r = r * r;

CGAL::is_zero(r);

CGAL::is_one(r);

r = r - r;

CGAL::is_zero(r);

return 0;
}
1 change: 1 addition & 0 deletions Documentation/doc/Documentation/packages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
\cgalPackageSection{PartPolygons,Polygons}

\package_listing{Polygon}
\package_listing{Polygon_repair}
\package_listing{Boolean_set_operations_2}
\package_listing{Nef_2}
\package_listing{Nef_S2}
Expand Down
10 changes: 10 additions & 0 deletions Documentation/doc/biblio/geom.bib
Original file line number Diff line number Diff line change
Expand Up @@ -152054,3 +152054,13 @@ @inproceedings{tang2009interactive
year={2009},
organization={ACM}
}

@article{ledoux2014triangulation,
title={A triangulation-based approach to automatically repair GIS polygons},
author={Ledoux, Hugo and Ohori, Ken Arroyo and Meijers, Martijn},
journal={Computers \& Geosciences},
volume={66},
pages={121--131},
year={2014},
publisher={Elsevier}
}
4 changes: 2 additions & 2 deletions Documentation/doc/resources/1.10.0/menu_version.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
var all_versions = [
'master',
'6.0-beta1',
'5.6',
'5.6.1',
'latest',
'5.5.2',
'5.5.4',
'5.4.4',
'5.3.2',
'5.2.4',
Expand Down
4 changes: 2 additions & 2 deletions Documentation/doc/resources/1.8.13/menu_version.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
var all_versions = [
'master',
'6.0-beta1',
'5.6',
'5.6.1',
'latest',
'5.5.2',
'5.5.4',
'5.4.4',
'5.3.2',
'5.2.4',
Expand Down
4 changes: 2 additions & 2 deletions Documentation/doc/resources/1.9.6/menu_version.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
var all_versions = [
'master',
'6.0-beta1',
'5.6',
'5.6.1',
'latest',
'5.5.2',
'5.5.4',
'5.4.4',
'5.3.2',
'5.2.4',
Expand Down
8 changes: 4 additions & 4 deletions Documentation/doc/scripts/html_output_post_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def automagically_number_figures():
for el in d('a.elRef'):
text = pq(el).attr('href')
if text.find("index.html")!=-1:
re_pkg_index=re.compile("\.\./([A-Z_a-z0-9]+)/index\.html")
re_pkg_index=re.compile(r'\.\./([A-Z_a-z0-9]+)/index\.html')
res=re_pkg_index.match(text)
if res:
all_packages.append(res.group(1))
Expand Down Expand Up @@ -248,7 +248,7 @@ def main():
#workaround issue with operator<< in pyquery
all_pages=glob.glob('*/*.html')
for f in all_pages:
re_replace_in_file("operator<<\(\)", "operator&lt;&lt;()", f)
re_replace_in_file(r'operator<<\(\)', "operator&lt;&lt;()", f)

# number figure
automagically_number_figures()
Expand Down Expand Up @@ -319,7 +319,7 @@ def main():

filesjs_files=package_glob('./*/files.js')
for fn in filesjs_files:
re_replace_in_file('^.*\[ "Concepts",.*$', '', fn)
re_replace_in_file(r'^.*\[ "Concepts",.*$', '', fn)

#Rewrite the path of some images
re_replace_in_file("'src','ftv2",
Expand All @@ -329,7 +329,7 @@ def main():
# external is placed by doxygen to mark a class from a tagfile, this
# is more confusing then helpful in our case
if path.isfile(os.path.join('Manual','annotated.html')):
re_replace_in_file('\[external\]', '', os.path.join('Manual','annotated.html'))
re_replace_in_file(r'\[external\]', '', os.path.join('Manual','annotated.html'))
else:
stderr.write("Error: ./Manual/annotated.html does not exists\n")
# fix class/concept mismatch in generated pages
Expand Down
15 changes: 15 additions & 0 deletions Filtered_kernel/include/CGAL/Lazy.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,26 @@ template<class T>inline std::enable_if_t<std::is_arithmetic<T>::value||std::is_e
template<class T>inline std::enable_if_t<std::is_arithmetic<T>::value||std::is_enum<T>::value, T> exact (T d){return d;}
template<class T>inline std::enable_if_t<std::is_arithmetic<T>::value||std::is_enum<T>::value, int> depth(T){return -1;}

template<class T>inline std::enable_if_t<std::is_arithmetic<T>::value, Quotient<T>> approx(Quotient<T> d){return d;}
template<class T>inline std::enable_if_t<std::is_arithmetic<T>::value, Quotient<T>> exact (Quotient<T> d){return d;}
template<class T>inline std::enable_if_t<std::is_arithmetic<T>::value, int> depth(Quotient<T>){return -1;}

// For tag classes: Return_base_tag, Homogeneous_tag, Null_vector, Origin
template<class T>inline std::enable_if_t<std::is_empty<T>::value, T> exact(T){return {};}
template<class T>inline std::enable_if_t<std::is_empty<T>::value, T> approx(T){return {};}
template<class T>inline std::enable_if_t<std::is_empty<T>::value, int> depth(T){return -1;}

namespace internal{
template <typename AT, typename ET, typename E2A>
struct Evaluate<Lazy<AT,ET,E2A>>
{
void operator()(const Lazy<AT,ET,E2A>& l)
{
exact(l);
}
};
} // internal namespace

// For an iterator, exact/approx applies to the objects it points to
template <class T, class=std::enable_if_t<is_iterator_type<T,std::input_iterator_tag>::value>>
auto exact(T const& t) {return make_transforming_iterator(t,[](auto const&u)->decltype(auto){return CGAL::exact(u);});}
Expand Down
3 changes: 3 additions & 0 deletions GraphicsView/include/CGAL/Qt/qglviewer_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,9 @@ static QString mouseButtonsString(::Qt::MouseButtons b) {

CGAL_INLINE_FUNCTION
void CGAL::QGLViewer::performClickAction(qglviewer::ClickAction ca, const QMouseEvent *const e) {
// the following call is needed to update the pixel ratio
camera()->setScreenWidthAndHeight(this->width(), this->height(), this->devicePixelRatio());

// Note: action that need it should call update().
switch (ca) {
// # CONNECTION setMouseBinding prevents adding NO_CLICK_ACTION in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <CGAL/Dynamic_property_map.h>
#include <CGAL/squared_distance_3.h>
#include <CGAL/number_utils.h>
#include <CGAL/Default.h>

#ifdef CGAL_EIGEN3_ENABLED
#include <CGAL/Eigen_solver_traits.h>
#endif
Expand Down
11 changes: 11 additions & 0 deletions Installation/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ Release date: October 2023

- The CGAL\_Core library is no longer based on GMP but boost multiprecision now, and can be used with either gmp backend or boost backend.

### [Polygon Repair](https://doc.cgal.org/6.0/Manual/packages.html#PkgPolygonRepair) (new package)

- This package provides functions to repair polygons, polygons with holes, and multipolygons with holes
using the odd-even heuristic.

#### 2D Arrangements

- **Breaking change**: The type of the result of point location queries changed to
Expand Down Expand Up @@ -48,6 +53,12 @@ Release date: October 2023
- Removed the class templates `Gray_image_mesh_domain_3`, `Implicit_mesh_domain_3`, and `Labeled_image_mesh_domain_3`
which are deprecated since CGAL-4.13.

### [Quadtrees, Octrees, and Orthtrees](https://doc.cgal.org/6.0/Manual/packages.html#PkgOrthtree)
- **Breaking change**:
- Node splitting behavior and per-node data are now customizable via the Traits class.
- Nodes are now stored as a property map, with properties of each node accessed by index.
- Nearest neighbors functions only work for Orthtrees which provide the necessary functionality.

### [Polygon Mesh Processing](https://doc.cgal.org/6.0/Manual/packages.html#PkgPolygonMeshProcessing)

- Added the function `CGAL::Polygon_mesh_processing::interpolated_corrected_curvatures()` which can be used to compute
Expand Down
54 changes: 54 additions & 0 deletions Installation/include/CGAL/license/Polygon_repair.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Copyright (c) 2016 GeometryFactory SARL (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
// Author(s) : Andreas Fabri
//
// Warning: this file is generated, see include/CGAL/license/README.md

#ifndef CGAL_LICENSE_POLYGON_REPAIR_H
#define CGAL_LICENSE_POLYGON_REPAIR_H

#include <CGAL/config.h>
#include <CGAL/license.h>

#ifdef CGAL_POLYGON_REPAIR_COMMERCIAL_LICENSE

# if CGAL_POLYGON_REPAIR_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE

# if defined(CGAL_LICENSE_WARNING)

CGAL_pragma_warning("Your commercial license for CGAL does not cover "
"this release of the 2D Polygon Repair package.")
# endif

# ifdef CGAL_LICENSE_ERROR
# error "Your commercial license for CGAL does not cover this release \
of the 2D Polygon Repair package. \
You get this error, as you defined CGAL_LICENSE_ERROR."
# endif // CGAL_LICENSE_ERROR
# endif // CGAL_POLYGON_REPAIR_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE
#else // no CGAL_POLYGON_REPAIR_COMMERCIAL_LICENSE
# if defined(CGAL_LICENSE_WARNING)
CGAL_pragma_warning("\nThe macro CGAL_POLYGON_REPAIR_COMMERCIAL_LICENSE is not defined."
"\nYou use the CGAL 2D Polygon Repair package under "
"the terms of the GPLv3+.")
# endif // CGAL_LICENSE_WARNING
# ifdef CGAL_LICENSE_ERROR
# error "The macro CGAL_POLYGON_REPAIR_COMMERCIAL_LICENSE is not defined.\
You use the CGAL 2D Polygon Repair package under the terms of \
the GPLv3+. You get this error, as you defined CGAL_LICENSE_ERROR."
# endif // CGAL_LICENSE_ERROR
#endif // no CGAL_POLYGON_REPAIR_COMMERCIAL_LICENSE
#endif // CGAL_LICENSE_POLYGON_REPAIR_H
Loading

0 comments on commit a42ffde

Please sign in to comment.