Skip to content

Commit 6c41cc0

Browse files
authored
Merge branch 'master' into Filtered_kernel-Filtered_rational_kernel-GF
2 parents 8e89bfc + fea3a17 commit 6c41cc0

File tree

617 files changed

+56619
-10656
lines changed

Some content is hidden

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

617 files changed

+56619
-10656
lines changed

.travis.yml

+23-22
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,29 @@ env:
3030
- PACKAGE='Minkowski_sum_2 Minkowski_sum_3 Modifier '
3131
- PACKAGE='Modular_arithmetic Nef_2 Nef_3 '
3232
- PACKAGE='Nef_S2 NewKernel_d Number_types '
33-
- PACKAGE='OpenNL 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 Polyhedron_IO Polyline_simplification_2 '
39-
- PACKAGE='Polynomial Polytope_distance_d Principal_component_analysis '
40-
- PACKAGE='Principal_component_analysis_LGPL Profiling_tools Property_map '
41-
- PACKAGE='QP_solver Random_numbers Ridges_3 '
42-
- PACKAGE='STL_Extension Scale_space_reconstruction_3 Scripts '
43-
- PACKAGE='SearchStructures Segment_Delaunay_graph_2 Segment_Delaunay_graph_Linf_2 '
44-
- PACKAGE='Set_movable_separability_2 Shape_detection Skin_surface_3 '
45-
- PACKAGE='Snap_rounding_2 Solver_interface Spatial_searching '
46-
- PACKAGE='Spatial_sorting Straight_skeleton_2 Stream_lines_2 '
47-
- PACKAGE='Stream_support Subdivision_method_3 Surface_mesh '
48-
- PACKAGE='Surface_mesh_approximation Surface_mesh_deformation Surface_mesh_parameterization '
49-
- PACKAGE='Surface_mesh_segmentation Surface_mesh_shortest_path Surface_mesh_simplification '
50-
- PACKAGE='Surface_mesh_skeletonization Surface_mesh_topology Surface_mesher '
51-
- PACKAGE='Surface_sweep_2 TDS_2 TDS_3 '
52-
- PACKAGE='Testsuite Three Triangulation '
53-
- PACKAGE='Triangulation_2 Triangulation_3 Union_find '
54-
- PACKAGE='Visibility_2 Voronoi_diagram_2 wininst '
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 Three '
53+
- PACKAGE='Triangulation Triangulation_2 Triangulation_3 '
54+
- PACKAGE='Union_find Visibility_2 Voronoi_diagram_2 '
55+
- PACKAGE='wininst '
5556
compiler: clang
5657
install:
5758
- echo "$PWD"

.travis/build_package.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function mytime {
1111
function build_examples {
1212
mkdir -p build-travis
1313
cd build-travis
14-
mytime cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" ..
14+
mytime cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCGAL_BUILD_THREE_DOC=TRUE ..
1515
mytime make -j2 VERBOSE=1
1616
}
1717

@@ -96,7 +96,7 @@ cd $ROOT
9696
cd $ROOT
9797
mkdir build_test
9898
cd build_test
99-
mytime cmake -DCMAKE_INSTALL_PREFIX=install/ ..
99+
mytime cmake -DCMAKE_INSTALL_PREFIX=install/ -DCGAL_BUILD_THREE_DOC=TRUE ..
100100
mytime make install
101101
# test install with minimal downstream example
102102
mkdir installtest
@@ -110,7 +110,7 @@ cd $ROOT
110110
echo 'target_link_libraries(${PROJECT_NAME} CGAL::CGAL)' >> CMakeLists.txt
111111
echo '#include "CGAL/remove_outliers.h"' >> main.cpp
112112
cd build
113-
mytime cmake -DCMAKE_INSTALL_PREFIX=../../install ..
113+
mytime cmake -DCMAKE_INSTALL_PREFIX=../../install -DCGAL_BUILD_THREE_DOC=TRUE ..
114114
cd ..
115115
exit 0
116116
fi

.travis/packages.txt

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Nef_S2
7171
NewKernel_d
7272
Number_types
7373
OpenNL
74+
Optimal_bounding_box
7475
Optimal_transportation_reconstruction_2
7576
Optimisation_basic
7677
Partition_2

AABB_tree/demo/AABB_tree/Scene.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -855,8 +855,8 @@ void Scene::update_grid_size()
855855
}
856856

857857
void Scene::generate_points_in(const unsigned int nb_points,
858-
const double min,
859-
const double max)
858+
const double vmin,
859+
const double vmax)
860860
{
861861
if(m_pPolyhedron == NULL)
862862
{
@@ -875,7 +875,7 @@ void Scene::generate_points_in(const unsigned int nb_points,
875875
CGAL::Timer timer;
876876
timer.start();
877877
std::cout << "Generate " << nb_points << " points in interval ["
878-
<< min << ";" << max << "]";
878+
<< vmin << ";" << vmax << "]";
879879

880880
unsigned int nb_trials = 0;
881881
Vector vec = random_vector();
@@ -892,8 +892,8 @@ void Scene::generate_points_in(const unsigned int nb_points,
892892
if(nb_intersections % 2 != 0)
893893
signed_distance *= -1.0;
894894

895-
if(signed_distance >= min &&
896-
signed_distance <= max)
895+
if(signed_distance >= vmin &&
896+
signed_distance <= vmax)
897897
{
898898
m_points.push_back(p);
899899
if(m_points.size()%(nb_points/10) == 0)

AABB_tree/demo/AABB_tree/Scene.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ class Scene : public QObject
192192
void generate_boundary_points(const unsigned int nb_points);
193193
void generate_boundary_segments(const unsigned int nb_slices);
194194
void generate_points_in(const unsigned int nb_points,
195-
const double min, const double max);
195+
const double vmin, const double vmax);
196196

197197
// algorithms/refine
198198
void refine_loop();

Advancing_front_surface_reconstruction/doc/Advancing_front_surface_reconstruction/Advancing_front_surface_reconstruction.txt

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ not provide any guarantee on the topology of the surface.
4747

4848
We describe next the algorithm and provide examples.
4949

50+
\note A \ref tuto_reconstruction "detailed tutorial on surface reconstruction"
51+
is provided with a guide to choose the most appropriate method along
52+
with pre- and post-processing.
5053

5154
\section AFSR_Definitions Definitions and the Algorithm
5255

Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,11 @@ class Algebraic_curve_kernel_2 : public AlgebraicKernel_d_1{
430430

431431
Curve_analysis_2 operator()
432432
(const Polynomial_2& f) const {
433-
return _m_kernel->curve_cache_2()(f);
433+
if (_m_kernel->is_square_free_2_object()(f)) {
434+
return _m_kernel->curve_cache_2()(f);
435+
} else {
436+
return _m_kernel->curve_cache_2()(_m_kernel->make_square_free_2_object()(f));
437+
}
434438
}
435439

436440
protected:

Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Bitstream_coefficient_kernel_at_alpha_rep {
3939

4040
typedef typename Algebraic_kernel_d_1::Algebraic_real_1 Algebraic_real_1;
4141

42-
Bitstream_coefficient_kernel_at_alpha_rep() {}
42+
Bitstream_coefficient_kernel_at_alpha_rep() : _m_kernel(nullptr) {}
4343

4444
Bitstream_coefficient_kernel_at_alpha_rep(Algebraic_kernel_d_1* kernel,
4545
Algebraic_real_1 alpha)

Alpha_shapes_3/examples/Alpha_shapes_3/ex_weighted_periodic_alpha_shapes_3.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ int main()
4141
int n;
4242
is >> n;
4343
std::cout << "Reading " << n << " points " << std::endl;
44-
Bare_point bp;
45-
for( ; n>0 ; n--) {
46-
is >> bp;
47-
Weighted_point p(bp, 0.0001 * random.get_double(0., 0.015625)); // arbitrary weights
48-
pts.push_back(p);
44+
for( ; n>0 ; n--)
45+
{
46+
Bare_point bp;
47+
if(is >> bp)
48+
pts.emplace_back(bp, 0.0001 * random.get_double(0., 0.015625)); // arbitrary weights
4949
}
5050

5151
// Define the periodic cube

Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementDemoGraphicsView.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ QRectF ArrangementDemoGraphicsView::getViewportRect( ) const
109109
QPointF p1 = this->mapToScene( 0, 0 );
110110
QPointF p2 = this->mapToScene( this->width( ), this->height( ) );
111111

112-
double xmin = std::min( p1.x( ), p2.x( ) );
113-
double xmax = std::max( p1.x( ), p2.x( ) );
114-
double ymin = std::min( p1.y( ), p2.y( ) );
115-
double ymax = std::max( p1.y( ), p2.y( ) );
112+
double xmin = (std::min)( p1.x( ), p2.x( ) );
113+
double xmax = (std::max)( p1.x( ), p2.x( ) );
114+
double ymin = (std::min)( p1.y( ), p2.y( ) );
115+
double ymax = (std::max)( p1.y( ), p2.y( ) );
116116

117117
QRectF res = QRectF( QPointF( xmin, ymin ), QPointF( xmax, ymax ) );
118118

Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -950,11 +950,12 @@ _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::point_position
950950

951951

952952
if ( p.is_rational() ){
953-
const Rational& px = ((Rat_point_2) p).x();
953+
const Rational px = ((Rat_point_2) p).x();
954954

955955
Integer denom_px=nt_traits.denominator(px);
956956
Integer numer_px=nt_traits.numerator(px);
957-
Polynomial poly_px = CGAL::sign(numer_px) == ZERO ? Polynomial() : nt_traits.construct_polynomial(&numer_px,0);
957+
Integer poly_px_scale = numer_px * _curve.x_norm();
958+
Polynomial poly_px = CGAL::sign(numer_px) == ZERO ? Polynomial() : nt_traits.construct_polynomial(&poly_px_scale,0);
958959
Polynomial poly_x = nt_traits.scale(_curve.x_polynomial(),denom_px) - poly_px;
959960

960961
std::vector <Algebraic> roots;

Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class Td_X_trapezoid : public Handle
142142

143143
private:
144144

145-
Trpz_parameter_space* ptr() const { return (Trpz_parameter_space*)(PTR); }
145+
Trpz_parameter_space* ptr() const { return (Trpz_parameter_space*)(PTR.p); }
146146

147147

148148
#ifndef CGAL_TD_DEBUG
@@ -323,7 +323,7 @@ class Td_X_trapezoid : public Handle
323323
{
324324
//define the initial trapezoid: left, right, btm, top are at infinity.
325325
// its type is TD_TRAPEZOID ,it is on all boundaries, and has no neighbours
326-
PTR = new Trpz_parameter_space
326+
PTR.p = new Trpz_parameter_space
327327
(Traits::vtx_at_left_infinity(),
328328
Traits::vtx_at_right_infinity(),
329329
Traits::he_at_bottom_infinity(),
@@ -353,7 +353,7 @@ class Td_X_trapezoid : public Handle
353353
else //tp == TD_VERTEX
354354
type_flag |= CGAL_TD_VERTEX;
355355

356-
PTR = new Trpz_parameter_space
356+
PTR.p = new Trpz_parameter_space
357357
(l, r, b, t, type_flag | boundness_flag, lb, lt, rb, rt);
358358
m_dag_node = node;
359359
}
@@ -370,7 +370,7 @@ class Td_X_trapezoid : public Handle
370370
Self* rb = 0, Self* rt = 0,
371371
Dag_node* node = 0)
372372
{
373-
PTR = new Trpz_parameter_space
373+
PTR.p = new Trpz_parameter_space
374374
(l ? *l : Traits::vtx_at_left_infinity(),
375375
r ? *r : Traits::vtx_at_right_infinity(),
376376
b ? *b : Traits::he_at_bottom_infinity(),
@@ -436,7 +436,7 @@ class Td_X_trapezoid : public Handle
436436
/*! Access the trapezoid id (PTR). */
437437
CGAL_TD_INLINE unsigned long id() const
438438
{
439-
return (unsigned long) PTR;
439+
return (unsigned long) PTR.p;
440440
}
441441

442442
/*! Access trapezoid left. */

Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class Td_active_edge : public Handle
135135

136136
private:
137137

138-
Data* ptr() const { return (Data*)(PTR); }
138+
Data* ptr() const { return (Data*)(PTR.p); }
139139

140140

141141
#ifndef CGAL_TD_DEBUG
@@ -194,7 +194,7 @@ class Td_active_edge : public Handle
194194
Td_active_edge ()
195195
{
196196

197-
PTR = new Data
197+
PTR.p = new Data
198198
(Traits::empty_he_handle(), Td_map_item(0), nullptr);
199199
//m_dag_node = nullptr;
200200
}
@@ -204,7 +204,7 @@ class Td_active_edge : public Handle
204204
boost::optional<Td_map_item&> next = boost::none)
205205
{
206206

207-
PTR = new Data(he, (next) ? *next : Td_map_item(0), node);
207+
PTR.p = new Data(he, (next) ? *next : Td_map_item(0), node);
208208
//m_dag_node = node;
209209
}
210210

@@ -261,7 +261,7 @@ class Td_active_edge : public Handle
261261
/*! Access the trapezoid id (PTR). */
262262
CGAL_TD_INLINE unsigned long id() const
263263
{
264-
return (unsigned long) PTR;
264+
return (unsigned long) PTR.p;
265265
}
266266

267267

Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class Td_active_fictitious_vertex : public Handle {
129129
};
130130

131131
private:
132-
Data* ptr() const { return (Data*)(PTR); }
132+
Data* ptr() const { return (Data*)(PTR.p); }
133133

134134
Curve_end vtx_to_ce(Vertex_const_handle v) const
135135
{
@@ -180,14 +180,14 @@ class Td_active_fictitious_vertex : public Handle {
180180

181181
Td_active_fictitious_vertex()
182182
{
183-
PTR = new Data(Traits::empty_vtx_handle(), Traits::empty_he_handle(), nullptr);
183+
PTR.p = new Data(Traits::empty_vtx_handle(), Traits::empty_he_handle(), nullptr);
184184
}
185185

186186
/*! Constructor given Vertex & Halfedge handles. */
187187
Td_active_fictitious_vertex(Vertex_const_handle v,
188188
Halfedge_const_handle cw_he,
189189
Dag_node* node = 0)
190-
{ PTR = new Data(v, cw_he, node); }
190+
{ PTR.p = new Data(v, cw_he, node); }
191191

192192

193193
/*! Copy constructor. */
@@ -224,7 +224,7 @@ class Td_active_fictitious_vertex : public Handle {
224224
inline const Self& self() const { return *this; }
225225

226226
/*! Access the trapezoid id (PTR). */
227-
inline unsigned long id() const { return (unsigned long) PTR; }
227+
inline unsigned long id() const { return (unsigned long) PTR.p; }
228228

229229
/*! Access trapezoid left.
230230
* filters out the infinite case which returns predefined dummy values

Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class Td_active_trapezoid : public Handle
144144

145145
private:
146146

147-
Data* ptr() const { return (Data*)(PTR); }
147+
Data* ptr() const { return (Data*)(PTR.p); }
148148

149149
public:
150150

@@ -255,7 +255,7 @@ class Td_active_trapezoid : public Handle
255255
{
256256
//define the initial trapezoid: left, right, btm, top are at infinity.
257257
// has no neighbours
258-
PTR = new Data
258+
PTR.p = new Data
259259
(Traits::empty_vtx_handle(),
260260
Traits::empty_vtx_handle(),
261261
Traits::empty_he_handle(),
@@ -274,7 +274,7 @@ class Td_active_trapezoid : public Handle
274274
boost::optional<Td_map_item&> rt = boost::none,
275275
Dag_node* node = 0)
276276
{
277-
PTR = new Data (l, r, b, t, (lb) ? *lb : Td_map_item(0), (lt) ? *lt : Td_map_item(0),
277+
PTR.p = new Data (l, r, b, t, (lb) ? *lb : Td_map_item(0), (lt) ? *lt : Td_map_item(0),
278278
(rb) ? *rb : Td_map_item(0), (rt) ? *rt : Td_map_item(0), node);
279279
//m_dag_node = node;
280280
}
@@ -332,7 +332,7 @@ class Td_active_trapezoid : public Handle
332332
/*! Access the trapezoid id (PTR). */
333333
inline unsigned long id() const
334334
{
335-
return (unsigned long) PTR;
335+
return (unsigned long) PTR.p;
336336
}
337337

338338
/*! Access trapezoid left.

Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class Td_active_vertex : public Handle {
134134
};
135135

136136
private:
137-
Data* ptr() const { return (Data*)(PTR); }
137+
Data* ptr() const { return (Data*)(PTR.p); }
138138

139139
Curve_end vtx_to_ce(Vertex_const_handle v) const
140140
{
@@ -184,14 +184,14 @@ class Td_active_vertex : public Handle {
184184

185185
Td_active_vertex()
186186
{
187-
PTR = new Data(Traits::empty_vtx_handle(), Traits::empty_he_handle(), nullptr);
187+
PTR.p = new Data(Traits::empty_vtx_handle(), Traits::empty_he_handle(), nullptr);
188188
}
189189

190190
/*! Constructor given Vertex & Halfedge handles. */
191191
Td_active_vertex(Vertex_const_handle v, Halfedge_const_handle cw_he,
192192
Dag_node* node = 0)
193193

194-
{ PTR = new Data(v, cw_he, node); }
194+
{ PTR.p = new Data(v, cw_he, node); }
195195

196196

197197
/*! Copy constructor. */
@@ -228,7 +228,7 @@ class Td_active_vertex : public Handle {
228228
inline const Self& self() const { return *this; }
229229

230230
/*! Access the trapezoid id (PTR). */
231-
inline unsigned long id() const { return (unsigned long) PTR; }
231+
inline unsigned long id() const { return (unsigned long) PTR.p; }
232232

233233
inline Vertex_const_handle vertex() const { return ptr()->v; }
234234

0 commit comments

Comments
 (0)