Skip to content

Commit

Permalink
Merge remote-tracking branch 'cgal/master' into Frechet-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
afabri committed Sep 9, 2024
2 parents 160cb3e + 9ff7098 commit 33ebf55
Show file tree
Hide file tree
Showing 125 changed files with 1,712 additions and 712 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: REUSE version
uses: fsfe/reuse-action@v3
uses: fsfe/reuse-action@v4
with:
args: --version
- name: REUSE lint
uses: fsfe/reuse-action@v3
uses: fsfe/reuse-action@v4
with:
args: --include-submodules lint
- name: REUSE SPDX SBOM
uses: fsfe/reuse-action@v3
uses: fsfe/reuse-action@v4
with:
args: spdx
- name: install dependencies
Expand All @@ -30,6 +30,6 @@ jobs:
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@v3
uses: fsfe/reuse-action@v4
with:
args: --root ./release/CGAL-9.9 --include-submodules lint
12 changes: 0 additions & 12 deletions .reuse/dep5

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ void test_algebraic_structure_intern(
//commutative
assert(a+b+c==c+b+a);
assert(a*b*c==c*b*a);
//distributiv
//distributive
assert((a-b)*c==a*c-b*c);
assert((a+b)*c==a*c+b*c);
//binom
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ namespace Qt
{
class Callback;
class ArrangementGraphicsItemBase;
class ArrangementGraphicsItemBase;
class GraphicsViewCurveInputBase;
class GraphicsViewNavigation;
enum class CurveType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,10 @@ void CurveInputMethod::beginInput_()

static inline void clearPainterPath(QPainterPath& ppath)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0))
ppath.clear();
#else
ppath = {};
#endif
}


void CurveInputMethod::reset()
{
this->resetInput();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,7 @@ void GridGraphicsItem::setSpacing(int spacing_)
static inline qreal
horizontalAdvance(const QFontMetrics& fm, const QString& text)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
return fm.horizontalAdvance(text);
#else
return fm.boundingRect(text).width();
#endif
}

void GridGraphicsItem::paint(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ {
* \param[in] plane the containing plane.
* \param[in] source the source-point direction.
* \param[in] target the target-point direction.
* \pre Both endpoint lie on the given plane.
* \pre Both endpoint lie on the given plane.
* \pre Both endpoints lie on the given plane.
*/
X_monotone_curve_2 operator()(const Point_2& source, const Point_2& target,
const Direction_3& normal) const
Expand Down Expand Up @@ -3113,7 +3112,7 @@ class Arr_x_monotone_geodesic_arc_on_sphere_3 {
* \param is_directed_right is the arc directed from left to right?
* \param is_full is the arc a full circle?
* \param is_degenerate is the arc degenerate (single point)?
* \pre Both endpoint lie on the given plane.
* \pre Both endpoints lie on the given plane.
*/
Arr_x_monotone_geodesic_arc_on_sphere_3
(const Arr_extended_direction_3& src,
Expand Down Expand Up @@ -3312,8 +3311,7 @@ class Arr_x_monotone_geodesic_arc_on_sphere_3 {
* \param plane the containing plane.
* \param source the source-point direction.
* \param target the target-point direction.
* \pre Both endpoint lie on the given plane.
* \pre Both endpoint lie on the given plane.
* \pre Both endpoints lie on the given plane.
*/
Arr_x_monotone_geodesic_arc_on_sphere_3
(const Arr_extended_direction_3& source,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Input is based on the curves and points indexes from intersect.pt
# intersect.xcv. The first two numbers are the numbers of the input curves
# to be intersected. After that there is the number of intesections and
# to be intersected. After that there is the number of intersections and
# 2-3 numbers representing each intersection. Meaning, the input is of the form:
# intersect <id of 1st x-curve> <id of 2nd x-curve> \
# <expected number of intersections> [<type of intersection> \
Expand Down
4 changes: 2 additions & 2 deletions BGL/examples/BGL_OpenMesh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ find_package(CGAL REQUIRED)

find_package(OpenMesh)
if(OpenMesh_FOUND)
include(UseOpenMesh)
include(CGAL_OpenMesh_support)
create_single_source_cgal_program("TriMesh.cpp")
target_link_libraries(TriMesh PRIVATE ${OPENMESH_LIBRARIES})
target_link_libraries(TriMesh PRIVATE CGAL::OpenMesh_support)
else()
message("NOTICE: This project requires OpenMesh and will not be compiled.")
endif()
4 changes: 2 additions & 2 deletions BGL/examples/BGL_polyhedron_3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ create_single_source_cgal_program("copy_polyhedron.cpp")

find_package(OpenMesh QUIET)
if(OpenMesh_FOUND)
target_link_libraries(copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES})
target_compile_definitions(copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH)
include(CGAL_OpenMesh_support)
target_link_libraries(copy_polyhedron PRIVATE CGAL::OpenMesh_support)
else()
message(STATUS "NOTICE: The example 'copy_polyhedron' will not use OpenMesh.")
endif()
Expand Down
18 changes: 10 additions & 8 deletions BGL/include/CGAL/boost/graph/copy_face_graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm,
const tm_face_descriptor tm_null_face = boost::graph_traits<TargetMesh>::null_face();
const tm_vertex_descriptor tm_null_vertex = boost::graph_traits<TargetMesh>::null_vertex();

reserve(tm, static_cast<typename boost::graph_traits<TargetMesh>::vertices_size_type>(vertices(tm).size()+vertices(sm).size()),
static_cast<typename boost::graph_traits<TargetMesh>::edges_size_type>(edges(tm).size()+edges(sm).size()),
static_cast<typename boost::graph_traits<TargetMesh>::faces_size_type>(faces(tm).size()+faces(sm).size()) );
reserve(tm, static_cast<typename boost::graph_traits<TargetMesh>::vertices_size_type>(internal::exact_num_vertices(tm)+internal::exact_num_vertices(sm)),
static_cast<typename boost::graph_traits<TargetMesh>::edges_size_type>(internal::exact_num_edges(tm)+internal::exact_num_edges(sm)),
static_cast<typename boost::graph_traits<TargetMesh>::faces_size_type>(internal::exact_num_faces(tm)+internal::exact_num_faces(sm)) );

//insert halfedges and create each vertex when encountering its halfedge
std::vector<tm_edge_descriptor> new_edges;
new_edges.reserve(edges(sm).size());
std::vector<tm_halfedge_descriptor> new_vertices;
new_edges.reserve(internal::exact_num_edges(sm));
new_vertices.reserve(internal::exact_num_vertices(sm));
for(sm_edge_descriptor sm_e : edges(sm))
{
tm_edge_descriptor tm_e = add_edge(tm);
Expand Down Expand Up @@ -106,6 +108,7 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm,
tm_vertex_descriptor tm_h_tgt = add_vertex(tm);
*v2v++=std::make_pair(sm_h_tgt, tm_h_tgt);
set_halfedge(tm_h_tgt, tm_h, tm);
new_vertices.push_back(tm_h);
set_target(tm_h, tm_h_tgt, tm);
put(tm_vpm, tm_h_tgt, conv(get(sm_vpm, sm_h_tgt)));
}
Expand All @@ -116,6 +119,7 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm,
tm_vertex_descriptor tm_h_src = add_vertex(tm);
*v2v++=std::make_pair(sm_h_src, tm_h_src);
set_halfedge(tm_h_src, tm_h_opp, tm);
new_vertices.push_back(tm_h_opp);
set_target(tm_h_opp, tm_h_src, tm);
put(tm_vpm, tm_h_src, conv(get(sm_vpm, sm_h_src)));
}
Expand Down Expand Up @@ -163,11 +167,9 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm,
}
}
// update halfedge vertex of all but the vertex halfedge
for(tm_vertex_descriptor v : vertices(tm))
for(tm_halfedge_descriptor h : new_vertices)
{
tm_halfedge_descriptor h = halfedge(v, tm);
if (h==boost::graph_traits<TargetMesh>::null_halfedge())
continue;
tm_vertex_descriptor v = target(h, tm);
tm_halfedge_descriptor next_around_vertex=h;
do{
next_around_vertex=opposite(next(next_around_vertex, tm), tm);
Expand Down
55 changes: 18 additions & 37 deletions BGL/test/BGL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,50 +42,31 @@ create_single_source_cgal_program("test_deprecated_io.cpp")

find_package(OpenMesh QUIET)
if(OpenMesh_FOUND)
include(UseOpenMesh)
add_definitions(-DCGAL_USE_OPENMESH)
include(CGAL_OpenMesh_support)

target_link_libraries(test_clear PRIVATE ${OPENMESH_LIBRARIES})
target_compile_definitions(test_clear PRIVATE -DCGAL_USE_OPENMESH)
target_link_libraries(test_Euler_operations PRIVATE ${OPENMESH_LIBRARIES})
target_compile_definitions(test_Euler_operations PRIVATE -DCGAL_USE_OPENMESH)
target_link_libraries(test_Collapse_edge PRIVATE ${OPENMESH_LIBRARIES})
target_compile_definitions(test_Collapse_edge PRIVATE -DCGAL_USE_OPENMESH)
target_link_libraries(test_Face_filtered_graph PRIVATE ${OPENMESH_LIBRARIES})
target_compile_definitions(test_Face_filtered_graph PRIVATE -DCGAL_USE_OPENMESH)
target_link_libraries(test_graph_traits PRIVATE ${OPENMESH_LIBRARIES} )
target_compile_definitions(test_graph_traits PRIVATE -DCGAL_USE_OPENMESH)
target_link_libraries(test_Properties PRIVATE ${OPENMESH_LIBRARIES})
target_compile_definitions(test_Properties PRIVATE -DCGAL_USE_OPENMESH)
target_link_libraries(test_bgl_read_write PRIVATE ${OPENMESH_LIBRARIES})
target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_OPENMESH)
target_link_libraries(test_clear PRIVATE CGAL::OpenMesh_support)
target_link_libraries(test_Euler_operations PRIVATE CGAL::OpenMesh_support)
target_link_libraries(test_Collapse_edge PRIVATE CGAL::OpenMesh_support)
target_link_libraries(test_Face_filtered_graph PRIVATE CGAL::OpenMesh_support)
target_link_libraries(test_graph_traits PRIVATE CGAL::OpenMesh_support )
target_link_libraries(test_Properties PRIVATE CGAL::OpenMesh_support)
target_link_libraries(test_bgl_read_write PRIVATE CGAL::OpenMesh_support)

create_single_source_cgal_program("graph_concept_OpenMesh.cpp")
target_link_libraries(graph_concept_OpenMesh PRIVATE ${OPENMESH_LIBRARIES})
target_link_libraries(graph_concept_OpenMesh PRIVATE CGAL::OpenMesh_support)
else()
message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.")
endif()

find_package(VTK QUIET COMPONENTS vtkCommonCore vtkIOCore vtkIOLegacy vtkIOXML vtkFiltersCore vtkFiltersSources)
if (VTK_FOUND)
if(VTK_USE_FILE)
include(${VTK_USE_FILE})
endif()

if ("${VTK_VERSION_MAJOR}" GREATER "5" OR VTK_VERSION VERSION_GREATER 5)
if(TARGET VTK::CommonCore)
set(VTK_LIBRARIES VTK::CommonCore VTK::IOCore VTK::IOLegacy VTK::IOXML VTK::FiltersCore VTK::FiltersSources)
endif()

if(VTK_LIBRARIES)
target_link_libraries(test_bgl_read_write PRIVATE ${VTK_LIBRARIES})
target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
target_link_libraries(test_deprecated_io PRIVATE ${VTK_LIBRARIES})
target_compile_definitions(test_deprecated_io PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
else()
message(STATUS "Tests that use VTK will not be compiled.")
endif()
endif()
find_package(VTK 9.0 QUIET COMPONENTS CommonCore IOCore IOLegacy IOXML FiltersCore FiltersSources)
if (VTK_FOUND AND VTK_LIBRARIES)
message(STATUS "VTK ${VTK_VERSION} found ${VTK_LIBRARIES}")
target_link_libraries(test_bgl_read_write PRIVATE ${VTK_LIBRARIES})
target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
target_link_libraries(test_deprecated_io PRIVATE ${VTK_LIBRARIES})
target_compile_definitions(test_deprecated_io PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
else()
message(STATUS "Tests that use VTK will not be compiled.")
endif() #VTK_FOUND

find_path(3MF_INCLUDE_DIR
Expand Down
1 change: 1 addition & 0 deletions BGL/test/BGL/test_Euler_operations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_copy_face_graph_nm_umbrella()
T g;
Kernel::Point_3 p(0,0,0);

// make two connected components
CGAL::make_tetrahedron(p, p, p, p, g);
CGAL::make_tetrahedron(p, p, p, p, g);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ do_intersect(const General_polygon_with_holes_2<General_polygon_2<ArrTraits>>& p
* \param traits a traits object.
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
* otherwise.
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
*
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
*/
template <typename Polygon, typename GpsTraits>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ class Gps_on_surface_base_2
unsigned int i = 1;
for (InputIterator itr = begin; itr != end; ++itr, ++i)
{
ValidationPolicy::is_valid((*itr), *m_traits);
arr_vec[i].first = new Aos_2(m_traits);
_insert(*itr, *(arr_vec[i].first));
}
Expand All @@ -666,6 +667,7 @@ class Gps_on_surface_base_2
unsigned int i = 1;
for (InputIterator itr = begin; itr!=end; ++itr, ++i)
{
ValidationPolicy::is_valid((*itr), *m_traits);
arr_vec[i].first = new Aos_2(m_traits);
_insert(*itr, *(arr_vec[i].first));
}
Expand Down
12 changes: 0 additions & 12 deletions Circulator/test/Circulator/test_circ1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2380,7 +2380,6 @@ void test_circulator_from_iterator() {
assert( ! (i == nullptr));
assert( i != nullptr);
assert( i == c);
assert( i == c);
// Do I reach myself.
++i;
Circulator j = i;
Expand Down Expand Up @@ -2493,7 +2492,6 @@ void test_circulator_from_iterator() {
assert( ! (i == nullptr));
assert( i != nullptr);
assert( i == c);
assert( i == c);
// Do I reach myself.
++i;
Circulator j = i;
Expand Down Expand Up @@ -2735,7 +2733,6 @@ void test_circulator_from_iterator() {
assert( ! (i == nullptr));
assert( i != nullptr);
assert( i == c);
assert( i == c);
// Do I reach myself.
++i;
Circulator j = i;
Expand Down Expand Up @@ -2897,7 +2894,6 @@ void test_circulator_from_iterator() {
assert( ! (i == nullptr));
assert( i != nullptr);
assert( i == c);
assert( i == c);
// Do I reach myself.
++i;
Circulator j = i;
Expand Down Expand Up @@ -3308,7 +3304,6 @@ void test_circulator_from_iterator() {
assert( ! (i == nullptr));
assert( i != nullptr);
assert( i == c);
assert( i == c);
// Do I reach myself.
++i;
Circulator j = i;
Expand Down Expand Up @@ -3533,7 +3528,6 @@ void test_circulator_from_iterator() {
assert( ! (i == nullptr));
assert( i != nullptr);
assert( i == c);
assert( i == c);
// Do I reach myself.
++i;
Circulator j = i;
Expand Down Expand Up @@ -3742,7 +3736,6 @@ void test_circulator_from_container() {
assert( ! (i == nullptr));
assert( i != nullptr);
assert( i == c);
assert( i == c);
// Do I reach myself.
++i;
Circulator j = i;
Expand Down Expand Up @@ -3855,7 +3848,6 @@ void test_circulator_from_container() {
assert( ! (i == nullptr));
assert( i != nullptr);
assert( i == c);
assert( i == c);
// Do I reach myself.
++i;
Circulator j = i;
Expand Down Expand Up @@ -4097,7 +4089,6 @@ void test_circulator_from_container() {
assert( ! (i == nullptr));
assert( i != nullptr);
assert( i == c);
assert( i == c);
// Do I reach myself.
++i;
Circulator j = i;
Expand Down Expand Up @@ -4260,7 +4251,6 @@ void test_circulator_from_container() {
assert( ! (i == nullptr));
assert( i != nullptr);
assert( i == c);
assert( i == c);
// Do I reach myself.
++i;
Circulator j = i;
Expand Down Expand Up @@ -4671,7 +4661,6 @@ void test_circulator_from_container() {
assert( ! (i == nullptr));
assert( i != nullptr);
assert( i == c);
assert( i == c);
// Do I reach myself.
++i;
Circulator j = i;
Expand Down Expand Up @@ -4897,7 +4886,6 @@ void test_circulator_from_container() {
assert( ! (i == nullptr));
assert( i != nullptr);
assert( i == c);
assert( i == c);
// Do I reach myself.
++i;
Circulator j = i;
Expand Down
Loading

0 comments on commit 33ebf55

Please sign in to comment.