Skip to content

Commit 1f45360

Browse files
committed
Merge remote-tracking branch 'cgal/master' into SDG-Fix_doc-GF
2 parents 41a3d1c + 2ac3a00 commit 1f45360

File tree

1,144 files changed

+114973
-22358
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,144 files changed

+114973
-22358
lines changed

.github/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ sudo add-apt-repository ppa:mikhailnov/pulseeffects -y
33
sudo apt-get update
44
sudo apt-get install -y libmpfr-dev \
55
libeigen3-dev qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev \
6-
libqt5svg5-dev qttools5-dev qttools5-dev-tools libboost1.72-dev
6+
libqt5svg5-dev qttools5-dev qttools5-dev-tools libboost1.72-dev zsh
77
#update cmake to 3.18.4
88
sudo apt purge --auto-remove cmake
99
cd /tmp

.github/workflows/checks.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CMake Test Merge Branch
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/[email protected]
12+
- name: install dependencies
13+
run: |
14+
.github/install.sh
15+
set -x
16+
sudo apt-get update && sudo apt-get install -y graphviz ssh bibtex2html
17+
sudo pip install lxml
18+
sudo pip install 'pyquery==1.4.1' # it seems to be the last py2 compatible version
19+
wget --no-verbose -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen/build_1_8_13/bin/doxygen
20+
sudo mv doxygen_exe /usr/bin/doxygen
21+
sudo chmod +x /usr/bin/doxygen
22+
git config --global user.email "[email protected]"
23+
git config --global user.name "Maxime Gimeno"
24+
25+
- name: Run checks
26+
run: |
27+
zsh Scripts/developer_scripts/test_merge_of_branch HEAD
28+
#test dependencies
29+
bash Scripts/developer_scripts/cgal_check_dependencies.sh --check_headers /usr/bin/doxygen
30+

.github/workflows/demo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Test Polyhedron Demo
22

3-
on: [pull_request]
3+
on: [push, pull_request]
44

55
jobs:
66
batch_1:

.travis.yml

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,36 +23,35 @@ env:
2323
- PACKAGE='Homogeneous_kernel Hyperbolic_triangulation_2 Inscribed_areas '
2424
- PACKAGE='Installation Interpolation Intersections_2 '
2525
- PACKAGE='Intersections_3 Interval_skip_list Interval_support '
26-
- PACKAGE='Inventor Jet_fitting_3 Kernel_23 '
27-
- PACKAGE='Kernel_d LEDA Linear_cell_complex '
28-
- PACKAGE='MacOSX Maintenance Matrix_search '
29-
- PACKAGE='Mesh_2 Mesh_3 Mesher_level '
30-
- PACKAGE='Minkowski_sum_2 Minkowski_sum_3 Modifier '
31-
- PACKAGE='Modular_arithmetic Nef_2 Nef_3 '
32-
- PACKAGE='Nef_S2 NewKernel_d Number_types '
33-
- PACKAGE='OpenNL Optimal_bounding_box Optimal_transportation_reconstruction_2 '
34-
- PACKAGE='Optimisation_basic Partition_2 Periodic_2_triangulation_2 '
35-
- PACKAGE='Periodic_3_mesh_3 Periodic_3_triangulation_3 Periodic_4_hyperbolic_triangulation_2 '
36-
- PACKAGE='Point_set_2 Point_set_3 Point_set_processing_3 '
37-
- PACKAGE='Poisson_surface_reconstruction_3 Polygon Polygon_mesh_processing '
38-
- PACKAGE='Polygonal_surface_reconstruction Polyhedron Polyhedron_IO '
39-
- PACKAGE='Polyline_simplification_2 Polynomial Polytope_distance_d '
40-
- PACKAGE='Principal_component_analysis Principal_component_analysis_LGPL Profiling_tools '
41-
- PACKAGE='Property_map QP_solver Random_numbers '
42-
- PACKAGE='Ridges_3 STL_Extension Scale_space_reconstruction_3 '
43-
- PACKAGE='Scripts SearchStructures Segment_Delaunay_graph_2 '
44-
- PACKAGE='Segment_Delaunay_graph_Linf_2 Set_movable_separability_2 Shape_detection '
45-
- PACKAGE='Skin_surface_3 Snap_rounding_2 Solver_interface '
46-
- PACKAGE='Spatial_searching Spatial_sorting Straight_skeleton_2 '
47-
- PACKAGE='Stream_lines_2 Stream_support Subdivision_method_3 '
48-
- PACKAGE='Surface_mesh Surface_mesh_approximation Surface_mesh_deformation '
49-
- PACKAGE='Surface_mesh_parameterization Surface_mesh_segmentation Surface_mesh_shortest_path '
50-
- PACKAGE='Surface_mesh_simplification Surface_mesh_skeletonization Surface_mesh_topology '
51-
- PACKAGE='Surface_mesher Surface_sweep_2 TDS_2 '
52-
- PACKAGE='TDS_3 Testsuite Tetrahedral_remeshing '
53-
- PACKAGE='Three Triangulation Triangulation_2 '
54-
- PACKAGE='Triangulation_3 Union_find Visibility_2 '
55-
- PACKAGE='Voronoi_diagram_2 wininst '
26+
- PACKAGE='Jet_fitting_3 Kernel_23 Kernel_d '
27+
- PACKAGE='LEDA Linear_cell_complex MacOSX '
28+
- PACKAGE='Maintenance Matrix_search Mesh_2 '
29+
- PACKAGE='Mesh_3 Mesher_level Minkowski_sum_2 '
30+
- PACKAGE='Minkowski_sum_3 Modifier Modular_arithmetic '
31+
- PACKAGE='Nef_2 Nef_3 Nef_S2 '
32+
- PACKAGE='NewKernel_d Number_types OpenNL '
33+
- PACKAGE='Optimal_bounding_box Optimal_transportation_reconstruction_2 Optimisation_basic '
34+
- PACKAGE='Partition_2 Periodic_2_triangulation_2 Periodic_3_mesh_3 '
35+
- PACKAGE='Periodic_3_triangulation_3 Periodic_4_hyperbolic_triangulation_2 Point_set_2 '
36+
- PACKAGE='Point_set_3 Point_set_processing_3 Poisson_surface_reconstruction_3 '
37+
- PACKAGE='Polygon Polygon_mesh_processing Polygonal_surface_reconstruction '
38+
- PACKAGE='Polyhedron Polyline_simplification_2 Polynomial '
39+
- PACKAGE='Polytope_distance_d Principal_component_analysis Principal_component_analysis_LGPL '
40+
- PACKAGE='Profiling_tools Property_map QP_solver '
41+
- PACKAGE='Random_numbers Ridges_3 STL_Extension '
42+
- PACKAGE='Scale_space_reconstruction_3 Scripts SearchStructures '
43+
- PACKAGE='Segment_Delaunay_graph_2 Segment_Delaunay_graph_Linf_2 Set_movable_separability_2 '
44+
- PACKAGE='Shape_detection Skin_surface_3 Snap_rounding_2 '
45+
- PACKAGE='Solver_interface Spatial_searching Spatial_sorting '
46+
- PACKAGE='Straight_skeleton_2 Stream_lines_2 Stream_support '
47+
- PACKAGE='Subdivision_method_3 Surface_mesh Surface_mesh_approximation '
48+
- PACKAGE='Surface_mesh_deformation Surface_mesh_parameterization Surface_mesh_segmentation '
49+
- PACKAGE='Surface_mesh_shortest_path Surface_mesh_simplification Surface_mesh_skeletonization '
50+
- PACKAGE='Surface_mesh_topology Surface_mesher Surface_sweep_2 '
51+
- PACKAGE='TDS_2 TDS_3 Testsuite '
52+
- PACKAGE='Tetrahedral_remeshing Three Triangulation '
53+
- PACKAGE='Triangulation_2 Triangulation_3 Union_find '
54+
- PACKAGE='Visibility_2 Voronoi_diagram_2 wininst '
5655
compiler: clang
5756
install:
5857
- echo "$PWD"

.travis/packages.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ Intersections_2
4949
Intersections_3
5050
Interval_skip_list
5151
Interval_support
52-
Inventor
5352
Jet_fitting_3
5453
Kernel_23
5554
Kernel_d
@@ -87,7 +86,6 @@ Polygon
8786
Polygon_mesh_processing
8887
Polygonal_surface_reconstruction
8988
Polyhedron
90-
Polyhedron_IO
9189
Polyline_simplification_2
9290
Polynomial
9391
Polytope_distance_d

AABB_tree/doc/AABB_tree/PackageDescription.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
\cgalCRPSection{Primitives}
3636
- `CGAL::AABB_triangle_primitive<GeomTraits, Iterator, CacheDatum>`
3737
- `CGAL::AABB_segment_primitive<GeomTraits, Iterator, CacheDatum>`
38-
- `CGAL::AABB_primitive<Id,ObjectPropertyMap,PointPropertyMapPolyhedron,ExternalPropertyMaps,CacheDatum>`
38+
- `CGAL::AABB_primitive<Id,ObjectPropertyMap,PointPropertyMap,ExternalPropertyMaps,CacheDatum>`
3939
- `CGAL::AABB_halfedge_graph_segment_primitive<HalfedgeGraph,Vpm,OneHalfedgeGraphPerTree,CacheDatum>`
4040
- `CGAL::AABB_face_graph_triangle_primitive<FaceGraph,Vpm,OneFaceGraphPerTree,CacheDatum>`
4141
*/

AABB_tree/examples/AABB_tree/AABB_cached_bbox_example.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
#include <iostream>
2-
#include <fstream>
3-
41
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
2+
53
#include <CGAL/AABB_tree.h>
64
#include <CGAL/AABB_traits.h>
75
#include <CGAL/Polyhedron_3.h>
86
#include <CGAL/Surface_mesh.h>
97
#include <CGAL/AABB_face_graph_triangle_primitive.h>
108
#include <CGAL/Timer.h>
119

10+
#include <iostream>
11+
#include <fstream>
12+
1213
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
1314
typedef K::FT FT;
1415
typedef K::Point_3 Point_3;
@@ -26,8 +27,12 @@ void triangle_mesh(const char* fname)
2627
typedef CGAL::AABB_tree<Traits> Tree;
2728

2829
TriangleMesh tmesh;
29-
std::ifstream in(fname);
30-
in >> tmesh;
30+
if(!CGAL::read_polygon_mesh(fname, tmesh) || CGAL::is_triangle_mesh(tmesh))
31+
{
32+
std::cerr << "Invalid input." << std::endl;
33+
return;
34+
}
35+
3136
Timer t;
3237
t.start();
3338
Tree tree(faces(tmesh).first, faces(tmesh).second, tmesh);
@@ -36,7 +41,6 @@ void triangle_mesh(const char* fname)
3641
std::cout << "Closest point to ORIGIN:" << tree.closest_point(CGAL::ORIGIN) << std::endl;
3742
}
3843

39-
4044
Bbox_3 bbox(boost::graph_traits<Surface_mesh>::face_descriptor fd,
4145
const Surface_mesh& p)
4246
{
@@ -47,7 +51,6 @@ Bbox_3 bbox(boost::graph_traits<Surface_mesh>::face_descriptor fd,
4751
return res;
4852
}
4953

50-
5154
void surface_mesh_cache_bbox(const char* fname)
5255
{
5356
typedef boost::graph_traits<Surface_mesh>::face_descriptor face_descriptor;
@@ -64,9 +67,9 @@ void surface_mesh_cache_bbox(const char* fname)
6467
t.start();
6568
Bbox_pmap bb = tmesh.add_property_map<face_descriptor,Bbox_3>("f:bbox",Bbox_3()).first;
6669

67-
for(face_descriptor fd : faces(tmesh)){
70+
for(face_descriptor fd : faces(tmesh))
6871
put(bb, fd, bbox(fd,tmesh));
69-
}
72+
7073
Traits traits(bb);
7174
Tree tree(traits);
7275
tree.insert(faces(tmesh).first, faces(tmesh).second, tmesh);
@@ -77,7 +80,6 @@ void surface_mesh_cache_bbox(const char* fname)
7780
std::cout << "Closest point to ORIGIN:" << tree.closest_point(CGAL::ORIGIN) << std::endl;
7881
}
7982

80-
8183
int main(int argc, char* argv[])
8284
{
8385
std::cout << "Polyhedron_3" << std::endl;

AABB_tree/examples/AABB_tree/AABB_ray_shooting_example.cpp

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
#include <iostream>
2-
#include <fstream>
3-
41
#include <CGAL/Simple_cartesian.h>
2+
#include <CGAL/Surface_mesh.h>
3+
54
#include <CGAL/AABB_tree.h>
65
#include <CGAL/AABB_traits.h>
7-
#include <CGAL/Surface_mesh.h>
86
#include <CGAL/AABB_face_graph_triangle_primitive.h>
97
#include <CGAL/Polygon_mesh_processing/compute_normal.h>
108
#include <CGAL/Polygon_mesh_processing/orientation.h>
119

10+
#include <iostream>
11+
#include <fstream>
12+
1213
typedef CGAL::Simple_cartesian<double> K;
1314
typedef K::FT FT;
1415
typedef K::Point_3 Point;
@@ -24,8 +25,8 @@ typedef CGAL::AABB_traits<K, Primitive> Traits;
2425
typedef CGAL::AABB_tree<Traits> Tree;
2526
typedef boost::optional<Tree::Intersection_and_primitive_id<Ray>::Type> Ray_intersection;
2627

27-
28-
struct Skip {
28+
struct Skip
29+
{
2930
face_descriptor fd;
3031

3132
Skip(const face_descriptor fd)
@@ -44,14 +45,20 @@ struct Skip {
4445
int main(int argc, char* argv[])
4546
{
4647
const char* filename = (argc > 1) ? argv[1] : "data/tetrahedron.off";
47-
std::ifstream input(filename);
48+
4849
Mesh mesh;
49-
input >> mesh;
50+
if(!CGAL::read_polygon_mesh(filename, mesh))
51+
{
52+
std::cerr << "Invalid input." << std::endl;
53+
return 1;
54+
}
55+
5056
Tree tree(faces(mesh).first, faces(mesh).second, mesh);
5157

5258
double d = CGAL::Polygon_mesh_processing::is_outward_oriented(mesh)?-1:1;
5359

54-
for(face_descriptor fd : faces(mesh)){
60+
for(face_descriptor fd : faces(mesh))
61+
{
5562
halfedge_descriptor hd = halfedge(fd,mesh);
5663
Point p = CGAL::centroid(mesh.point(source(hd,mesh)),
5764
mesh.point(target(hd,mesh)),
@@ -61,13 +68,16 @@ int main(int argc, char* argv[])
6168
Ray ray(p,d * v);
6269
Skip skip(fd);
6370
Ray_intersection intersection = tree.first_intersection(ray, skip);
64-
if(intersection){
71+
if(intersection)
72+
{
6573
if(boost::get<Point>(&(intersection->first))){
6674
const Point* p = boost::get<Point>(&(intersection->first) );
6775
std::cout << *p << std::endl;
6876
}
6977
}
7078
}
79+
7180
std::cerr << "done" << std::endl;
81+
7282
return 0;
7383
}

AABB_tree/include/CGAL/AABB_face_graph_triangle_primitive.h

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class AABB_face_graph_triangle_primitive
9898
}
9999

100100
public:
101-
#ifdef DOXYGEN_RUNNING
101+
#ifdef DOXYGEN_RUNNING
102102
/// \name Types
103103
/// @{
104104
/*!
@@ -122,37 +122,45 @@ class AABB_face_graph_triangle_primitive
122122
If `OneFaceGraphPerTree` is CGAL::Tag_true, constructs a `Shared_data` object from a reference to the polyhedon `graph`.
123123
*/
124124
static unspecified_type construct_shared_data( FaceGraph& graph );
125-
#else
125+
#else
126126
typedef typename Base::Id Id;
127-
#endif
127+
#endif
128128
typedef typename boost::graph_traits<FaceGraph>::face_descriptor face_descriptor;
129129

130130
// constructors
131+
132+
#ifdef DOXYGEN_RUNNING
131133
/*!
134+
constructs a primitive.
135+
132136
\tparam Iterator an input iterator with `Id` as value type.
137+
138+
If `VertexPointPMap` is the default of the class, an additional constructor
139+
is available with `vppm` set to `get(vertex_point, graph)`.
140+
*/
141+
template <class Iterator>
142+
AABB_face_graph_triangle_primitive(Iterator it, const FaceGraph& graph, VertexPointPMap vppm);
143+
144+
/*!
133145
constructs a primitive.
134146
If `VertexPointPMap` is the default of the class, an additional constructor
135147
is available with `vppm` set to `get(vertex_point, graph)`.
136148
*/
149+
AABB_face_graph_triangle_primitive(face_descriptor fd, const FaceGraph& graph, VertexPointPMap vppm);
150+
#else
137151
template <class Iterator>
138152
AABB_face_graph_triangle_primitive(Iterator it, const FaceGraph& graph, VertexPointPMap_ vppm)
139153
: Base( Id_(make_id(*it, graph, OneFaceGraphPerTree())),
140154
Triangle_property_map(const_cast<FaceGraph*>(&graph),vppm),
141155
Point_property_map(const_cast<FaceGraph*>(&graph),vppm) )
142156
{}
143157

144-
/*!
145-
constructs a primitive.
146-
If `VertexPointPMap` is the default of the class, an additional constructor
147-
is available with `vppm` set to `get(vertex_point, graph)`.
148-
*/
149158
AABB_face_graph_triangle_primitive(face_descriptor fd, const FaceGraph& graph, VertexPointPMap_ vppm)
150159
: Base( Id_(make_id(fd, graph, OneFaceGraphPerTree())),
151160
Triangle_property_map(const_cast<FaceGraph*>(&graph),vppm),
152161
Point_property_map(const_cast<FaceGraph*>(&graph),vppm) )
153162
{}
154163

155-
#ifndef DOXYGEN_RUNNING
156164
template <class Iterator>
157165
AABB_face_graph_triangle_primitive(Iterator it, const FaceGraph& graph)
158166
: Base( Id_(make_id(*it, graph, OneFaceGraphPerTree())),

0 commit comments

Comments
 (0)