mirror of https://github.com/CGAL/cgal
Merge remote-tracking branch 'cgal/master' into Kernel_23-Fix_dangling_ref_in_CC3-GF
This commit is contained in:
commit
d3e701473e
|
|
@ -44,11 +44,9 @@ Documentation/Doxyfile text eol=lf
|
||||||
Documentation/pkglist_filter text eol=lf
|
Documentation/pkglist_filter text eol=lf
|
||||||
Installation/update_CHANGES text eol=lf
|
Installation/update_CHANGES text eol=lf
|
||||||
Scripts/developer_scripts/autotest_cgal text eol=lf
|
Scripts/developer_scripts/autotest_cgal text eol=lf
|
||||||
Scripts/developer_scripts/autotest_cgal_with_cmake text eol=lf
|
|
||||||
Scripts/developer_scripts/cgal_build text eol=lf
|
Scripts/developer_scripts/cgal_build text eol=lf
|
||||||
Scripts/developer_scripts/cgal_depend text eol=lf
|
Scripts/developer_scripts/cgal_depend text eol=lf
|
||||||
Scripts/developer_scripts/cgal_git_update_hooks_for_client text eol=lf
|
Scripts/developer_scripts/cgal_git_update_hooks_for_client text eol=lf
|
||||||
Scripts/developer_scripts/cgal_test_with_cmake text eol=lf
|
|
||||||
Scripts/developer_scripts/cgal2gml text eol=lf
|
Scripts/developer_scripts/cgal2gml text eol=lf
|
||||||
Scripts/developer_scripts/check_library_uses_no_gpl_files text eol=lf
|
Scripts/developer_scripts/check_library_uses_no_gpl_files text eol=lf
|
||||||
Scripts/developer_scripts/check_licenses text eol=lf
|
Scripts/developer_scripts/check_licenses text eol=lf
|
||||||
|
|
@ -56,7 +54,6 @@ Scripts/developer_scripts/check_macro_names text eol=lf
|
||||||
Scripts/developer_scripts/check_no_CGAL_USE_without_includes_before text eol=lf
|
Scripts/developer_scripts/check_no_CGAL_USE_without_includes_before text eol=lf
|
||||||
Scripts/developer_scripts/check_svn_keywords text eol=lf
|
Scripts/developer_scripts/check_svn_keywords text eol=lf
|
||||||
Scripts/developer_scripts/create_cgal_test text eol=lf
|
Scripts/developer_scripts/create_cgal_test text eol=lf
|
||||||
Scripts/developer_scripts/create_cgal_test_with_cmake text eol=lf
|
|
||||||
Scripts/developer_scripts/create_internal_release text eol=lf
|
Scripts/developer_scripts/create_internal_release text eol=lf
|
||||||
Scripts/developer_scripts/create_new_release text eol=lf
|
Scripts/developer_scripts/create_new_release text eol=lf
|
||||||
Scripts/developer_scripts/detect_files_with_mixed_eol_styles text eol=lf
|
Scripts/developer_scripts/detect_files_with_mixed_eol_styles text eol=lf
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ AABB_tree/demo/AABB_tree/Makefile
|
||||||
AABB_tree/examples/AABB_tree/*.kdev*
|
AABB_tree/examples/AABB_tree/*.kdev*
|
||||||
AABB_tree/examples/AABB_tree/*_example
|
AABB_tree/examples/AABB_tree/*_example
|
||||||
AABB_tree/examples/AABB_tree/Makefile
|
AABB_tree/examples/AABB_tree/Makefile
|
||||||
AABB_tree/examples/AABB_tree/cgal_test_with_cmake
|
|
||||||
AABB_tree/test/AABB_tree/*.kdev*
|
AABB_tree/test/AABB_tree/*.kdev*
|
||||||
AABB_tree/test/AABB_tree/Makefile
|
AABB_tree/test/AABB_tree/Makefile
|
||||||
AABB_tree/test/AABB_tree/aabb_correctness_triangle_test
|
AABB_tree/test/AABB_tree/aabb_correctness_triangle_test
|
||||||
|
|
@ -18,17 +17,14 @@ AABB_tree/test/AABB_tree/aabb_distance_triangle_test
|
||||||
AABB_tree/test/AABB_tree/aabb_intersection_triangle_test
|
AABB_tree/test/AABB_tree/aabb_intersection_triangle_test
|
||||||
AABB_tree/test/AABB_tree/aabb_naive_vs_tree_distance_segment_test
|
AABB_tree/test/AABB_tree/aabb_naive_vs_tree_distance_segment_test
|
||||||
AABB_tree/test/AABB_tree/aabb_projection_triangle_test
|
AABB_tree/test/AABB_tree/aabb_projection_triangle_test
|
||||||
AABB_tree/test/AABB_tree/cgal_test_with_cmake
|
|
||||||
Algebraic_foundations/test/Algebraic_foundations/Algebraic_extension_traits
|
Algebraic_foundations/test/Algebraic_foundations/Algebraic_extension_traits
|
||||||
Algebraic_foundations/test/Algebraic_foundations/Algebraic_structure_traits
|
Algebraic_foundations/test/Algebraic_foundations/Algebraic_structure_traits
|
||||||
Algebraic_foundations/test/Algebraic_foundations/Chinese_remainder_traits
|
Algebraic_foundations/test/Algebraic_foundations/Chinese_remainder_traits
|
||||||
Algebraic_foundations/test/Algebraic_foundations/Coercion_traits
|
Algebraic_foundations/test/Algebraic_foundations/Coercion_traits
|
||||||
Algebraic_foundations/test/Algebraic_foundations/Real_embeddable_traits
|
Algebraic_foundations/test/Algebraic_foundations/Real_embeddable_traits
|
||||||
Algebraic_foundations/test/Algebraic_foundations/Scalar_factor_traits
|
Algebraic_foundations/test/Algebraic_foundations/Scalar_factor_traits
|
||||||
Algebraic_foundations/test/Algebraic_foundations/cgal_test_with_cmake
|
|
||||||
Algebraic_foundations/test/Algebraic_foundations/extended_euclidean_algorithm
|
Algebraic_foundations/test/Algebraic_foundations/extended_euclidean_algorithm
|
||||||
Algebraic_foundations/test/Algebraic_foundations/ipower
|
Algebraic_foundations/test/Algebraic_foundations/ipower
|
||||||
Algebraic_kernel_d/test/Algebraic_kernel_d/cgal_test_with_cmake
|
|
||||||
Algebraic_kernel_d/test/Algebraic_kernel_d/rs_isolator
|
Algebraic_kernel_d/test/Algebraic_kernel_d/rs_isolator
|
||||||
Alpha_shapes_2/demo/Alpha_shapes_2/Makefile
|
Alpha_shapes_2/demo/Alpha_shapes_2/Makefile
|
||||||
Alpha_shapes_2/demo/Alpha_shapes_2/alpha_shapes_2
|
Alpha_shapes_2/demo/Alpha_shapes_2/alpha_shapes_2
|
||||||
|
|
@ -37,7 +33,6 @@ Alpha_shapes_2/examples/Alpha_shapes_2/alpha_shapes_2
|
||||||
Alpha_shapes_3/demo/Alpha_shapes_3/Makefile
|
Alpha_shapes_3/demo/Alpha_shapes_3/Makefile
|
||||||
Alpha_shapes_3/demo/Alpha_shapes_3/alpha_shapes_3
|
Alpha_shapes_3/demo/Alpha_shapes_3/alpha_shapes_3
|
||||||
Alpha_shapes_3/demo/Alpha_shapes_3/weighted_alpha_shapes_3
|
Alpha_shapes_3/demo/Alpha_shapes_3/weighted_alpha_shapes_3
|
||||||
Alpha_shapes_3/test/Alpha_shapes_3/cgal_test_with_cmake
|
|
||||||
Alpha_shapes_3/test/Alpha_shapes_3/test_alpha_shape_3
|
Alpha_shapes_3/test/Alpha_shapes_3/test_alpha_shape_3
|
||||||
Alpha_shapes_3/test/Alpha_shapes_3/test_fixed_alpha_shape_3
|
Alpha_shapes_3/test/Alpha_shapes_3/test_fixed_alpha_shape_3
|
||||||
Alpha_shapes_3/test/Alpha_shapes_3/test_weighted_alpha_shape_3
|
Alpha_shapes_3/test/Alpha_shapes_3/test_weighted_alpha_shape_3
|
||||||
|
|
@ -60,7 +55,6 @@ Arrangement_on_surface_2/examples/Arrangement_on_surface_2/batched_point_locatio
|
||||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_dual_adapter
|
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_dual_adapter
|
||||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_primal_adapter
|
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_primal_adapter
|
||||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bounded_planar_vertical_decomposition
|
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bounded_planar_vertical_decomposition
|
||||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/cgal_test_with_cmake
|
|
||||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circles
|
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circles
|
||||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circular_arcs
|
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circular_arcs
|
||||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circular_line_arcs
|
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circular_line_arcs
|
||||||
|
|
@ -103,30 +97,24 @@ Arrangement_on_surface_2/examples/Arrangement_on_surface_2/unbounded_rational_fu
|
||||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/vertical_ray_shooting
|
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/vertical_ray_shooting
|
||||||
Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_point_location.cpp
|
Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_point_location.cpp
|
||||||
BGL/examples/BGL_arrangement_2/Makefile
|
BGL/examples/BGL_arrangement_2/Makefile
|
||||||
BGL/examples/BGL_arrangement_2/cgal_test_with_cmake
|
|
||||||
BGL/examples/BGL_arrangement_2/dual
|
BGL/examples/BGL_arrangement_2/dual
|
||||||
BGL/examples/BGL_arrangement_2/primal
|
BGL/examples/BGL_arrangement_2/primal
|
||||||
BGL/test/BGL/cgal_test_with_cmake
|
|
||||||
Boolean_set_operations_2/demo/Boolean_set_operations_2/Makefile
|
Boolean_set_operations_2/demo/Boolean_set_operations_2/Makefile
|
||||||
Boolean_set_operations_2/demo/Boolean_set_operations_2/boolean_operations_2
|
Boolean_set_operations_2/demo/Boolean_set_operations_2/boolean_operations_2
|
||||||
Box_intersection_d/test/Box_intersection_d/automated_test
|
Box_intersection_d/test/Box_intersection_d/automated_test
|
||||||
Box_intersection_d/test/Box_intersection_d/benchmark.data
|
Box_intersection_d/test/Box_intersection_d/benchmark.data
|
||||||
Box_intersection_d/test/Box_intersection_d/benchmark_box_intersection
|
Box_intersection_d/test/Box_intersection_d/benchmark_box_intersection
|
||||||
Box_intersection_d/test/Box_intersection_d/box_grid
|
Box_intersection_d/test/Box_intersection_d/box_grid
|
||||||
Box_intersection_d/test/Box_intersection_d/cgal_test_with_cmake
|
|
||||||
Box_intersection_d/test/Box_intersection_d/random_set_test
|
Box_intersection_d/test/Box_intersection_d/random_set_test
|
||||||
CGAL_ImageIO/demo/CGALimageIO/Makefile
|
CGAL_ImageIO/demo/CGALimageIO/Makefile
|
||||||
CGAL_ImageIO/demo/CGALimageIO/cgal_test_with_cmake
|
|
||||||
CGAL_ImageIO/demo/CGALimageIO/image_to_vtk_viewer
|
CGAL_ImageIO/demo/CGALimageIO/image_to_vtk_viewer
|
||||||
CGAL_ImageIO/examples/CGALimageIO/Makefile
|
CGAL_ImageIO/examples/CGALimageIO/Makefile
|
||||||
CGAL_ImageIO/examples/CGALimageIO/cgal_test_with_cmake
|
|
||||||
CGAL_ImageIO/examples/CGALimageIO/convert_raw_image_to_inr
|
CGAL_ImageIO/examples/CGALimageIO/convert_raw_image_to_inr
|
||||||
CGAL_ImageIO/examples/CGALimageIO/makefile
|
CGAL_ImageIO/examples/CGALimageIO/makefile
|
||||||
CGAL_ImageIO/examples/CGALimageIO/test_imageio
|
CGAL_ImageIO/examples/CGALimageIO/test_imageio
|
||||||
CGAL_ImageIO/src/CGAL_ImageIO/Makefile
|
CGAL_ImageIO/src/CGAL_ImageIO/Makefile
|
||||||
Circular_kernel_3/demo/Circular_kernel_3/Circular_kernel_3_demo
|
Circular_kernel_3/demo/Circular_kernel_3/Circular_kernel_3_demo
|
||||||
Circular_kernel_3/demo/Circular_kernel_3/Makefile
|
Circular_kernel_3/demo/Circular_kernel_3/Makefile
|
||||||
Circular_kernel_3/test/Circular_kernel_3/cgal_test_with_cmake
|
|
||||||
Circular_kernel_3/test/Circular_kernel_3/test_Exact_spherical_kernel
|
Circular_kernel_3/test/Circular_kernel_3/test_Exact_spherical_kernel
|
||||||
Circular_kernel_3/test/Circular_kernel_3/test_Lazy_Spherical_kernel
|
Circular_kernel_3/test/Circular_kernel_3/test_Lazy_Spherical_kernel
|
||||||
Circular_kernel_3/test/Circular_kernel_3/test_Lazy_spherical_kernel_basics
|
Circular_kernel_3/test/Circular_kernel_3/test_Lazy_spherical_kernel_basics
|
||||||
|
|
@ -137,7 +125,6 @@ Documentation/log/*.*
|
||||||
Documentation/output
|
Documentation/output
|
||||||
Documentation/tags/*.*
|
Documentation/tags/*.*
|
||||||
Generator/examples/Generator/ball_d
|
Generator/examples/Generator/ball_d
|
||||||
Generator/examples/Generator/cgal_test_with_cmake
|
|
||||||
Generator/examples/Generator/cube_d
|
Generator/examples/Generator/cube_d
|
||||||
Generator/examples/Generator/grid_d
|
Generator/examples/Generator/grid_d
|
||||||
Generator/examples/Generator/random_convex_set
|
Generator/examples/Generator/random_convex_set
|
||||||
|
|
@ -149,7 +136,6 @@ Generator/examples/Generator/random_segments1
|
||||||
Generator/examples/Generator/random_segments2
|
Generator/examples/Generator/random_segments2
|
||||||
Generator/examples/Generator/sphere_d
|
Generator/examples/Generator/sphere_d
|
||||||
Generator/test/Generator/bug
|
Generator/test/Generator/bug
|
||||||
Generator/test/Generator/cgal_test_with_cmake
|
|
||||||
Generator/test/Generator/random_poly_test
|
Generator/test/Generator/random_poly_test
|
||||||
Generator/test/Generator/rcs_test
|
Generator/test/Generator/rcs_test
|
||||||
Generator/test/Generator/test_combination_enumerator
|
Generator/test/Generator/test_combination_enumerator
|
||||||
|
|
@ -178,7 +164,6 @@ GraphicsView/demo/Triangulation_2/Makefile
|
||||||
GraphicsView/demo/Triangulation_2/Regular_triangulation_2
|
GraphicsView/demo/Triangulation_2/Regular_triangulation_2
|
||||||
GraphicsView/demo/Triangulation_2/qrc_*.cxx
|
GraphicsView/demo/Triangulation_2/qrc_*.cxx
|
||||||
GraphicsView/demo/Triangulation_2/ui_*.h
|
GraphicsView/demo/Triangulation_2/ui_*.h
|
||||||
HalfedgeDS/test/HalfedgeDS/cgal_test_with_cmake
|
|
||||||
HalfedgeDS/test/HalfedgeDS/test_hds
|
HalfedgeDS/test/HalfedgeDS/test_hds
|
||||||
HalfedgeDS/test/HalfedgeDS/test_hds_decorator
|
HalfedgeDS/test/HalfedgeDS/test_hds_decorator
|
||||||
Inscribed_areas/test/Inscribed_areas/Makefile
|
Inscribed_areas/test/Inscribed_areas/Makefile
|
||||||
|
|
@ -188,11 +173,8 @@ Installation/auxiliary/gdb/python/CGAL/printers.pyc
|
||||||
Installation/auxiliary/gdb/test
|
Installation/auxiliary/gdb/test
|
||||||
Installation/cmake/modules/*.tmp
|
Installation/cmake/modules/*.tmp
|
||||||
Installation/test/Installation/cgal_test
|
Installation/test/Installation/cgal_test
|
||||||
/Installation/test/Installation/cgal_test_with_cmake
|
|
||||||
Installation/test/Installation/deprecation_warning
|
Installation/test/Installation/deprecation_warning
|
||||||
Interpolation/demo/Interpolation/cgal_test_with_cmake
|
|
||||||
Intersections_3/test/Intersections_3/bbox_other_do_intersect_test
|
Intersections_3/test/Intersections_3/bbox_other_do_intersect_test
|
||||||
Intersections_3/test/Intersections_3/cgal_test_with_cmake
|
|
||||||
Intersections_3/test/Intersections_3/circle_other
|
Intersections_3/test/Intersections_3/circle_other
|
||||||
Intersections_3/test/Intersections_3/line_line
|
Intersections_3/test/Intersections_3/line_line
|
||||||
Intersections_3/test/Intersections_3/segment_segment
|
Intersections_3/test/Intersections_3/segment_segment
|
||||||
|
|
@ -206,7 +188,6 @@ Jet_fitting_3/examples/Jet_fitting_3/Single_estimation
|
||||||
Jet_fitting_3/examples/Jet_fitting_3/VC
|
Jet_fitting_3/examples/Jet_fitting_3/VC
|
||||||
Jet_fitting_3/test/Jet_fitting_3/Makefile
|
Jet_fitting_3/test/Jet_fitting_3/Makefile
|
||||||
Jet_fitting_3/test/Jet_fitting_3/blind_1pt
|
Jet_fitting_3/test/Jet_fitting_3/blind_1pt
|
||||||
/Jet_fitting_3/examples/Jet_fitting_3/cgal_test_with_cmake
|
|
||||||
/Jet_fitting_3/examples/Jet_fitting_3/data_ellipe0.003.off.4ogl.txt
|
/Jet_fitting_3/examples/Jet_fitting_3/data_ellipe0.003.off.4ogl.txt
|
||||||
Kernel_23/test/Kernel_23/Cartesian
|
Kernel_23/test/Kernel_23/Cartesian
|
||||||
Kernel_23/test/Kernel_23/Dimension
|
Kernel_23/test/Kernel_23/Dimension
|
||||||
|
|
@ -220,7 +201,6 @@ Kernel_23/test/Kernel_23/Simple_cartesian
|
||||||
Kernel_23/test/Kernel_23/Simple_homogeneous
|
Kernel_23/test/Kernel_23/Simple_homogeneous
|
||||||
Kernel_23/test/Kernel_23/Test_IO.out
|
Kernel_23/test/Kernel_23/Test_IO.out
|
||||||
/Kernel_23/test/Kernel_23/Test-*IO.out
|
/Kernel_23/test/Kernel_23/Test-*IO.out
|
||||||
Kernel_23/test/Kernel_23/cgal_test_with_cmake
|
|
||||||
Kernel_23/test/Kernel_23/test_kernel__
|
Kernel_23/test/Kernel_23/test_kernel__
|
||||||
Kinetic_data_structures/demo/Kinetic_data_structures/Delaunay_triangulation_2
|
Kinetic_data_structures/demo/Kinetic_data_structures/Delaunay_triangulation_2
|
||||||
Kinetic_data_structures/demo/Kinetic_data_structures/Delaunay_triangulation_stable_subset_2
|
Kinetic_data_structures/demo/Kinetic_data_structures/Delaunay_triangulation_stable_subset_2
|
||||||
|
|
@ -229,13 +209,11 @@ Kinetic_data_structures/demo/Kinetic_data_structures/KDS_Delaunay_triangulation_
|
||||||
Kinetic_data_structures/demo/Kinetic_data_structures/KDS_generate_data
|
Kinetic_data_structures/demo/Kinetic_data_structures/KDS_generate_data
|
||||||
Kinetic_data_structures/demo/Kinetic_data_structures/KDS_gui_2
|
Kinetic_data_structures/demo/Kinetic_data_structures/KDS_gui_2
|
||||||
Kinetic_data_structures/demo/Kinetic_data_structures/Makefile
|
Kinetic_data_structures/demo/Kinetic_data_structures/Makefile
|
||||||
Kinetic_data_structures/demo/Kinetic_data_structures/cgal_test_with_cmake
|
|
||||||
Kinetic_data_structures/demo/Kinetic_data_structures/generate_data
|
Kinetic_data_structures/demo/Kinetic_data_structures/generate_data
|
||||||
Kinetic_data_structures/demo/Kinetic_data_structures/gui_2
|
Kinetic_data_structures/demo/Kinetic_data_structures/gui_2
|
||||||
Kinetic_data_structures/test/Kinetic_data_structures/Delaunay_triangulation_2
|
Kinetic_data_structures/test/Kinetic_data_structures/Delaunay_triangulation_2
|
||||||
Kinetic_data_structures/test/Kinetic_data_structures/Delaunay_triangulation_3
|
Kinetic_data_structures/test/Kinetic_data_structures/Delaunay_triangulation_3
|
||||||
Kinetic_data_structures/test/Kinetic_data_structures/active_objects_tables
|
Kinetic_data_structures/test/Kinetic_data_structures/active_objects_tables
|
||||||
Kinetic_data_structures/test/Kinetic_data_structures/cgal_test_with_cmake
|
|
||||||
Kinetic_data_structures/test/Kinetic_data_structures/exact_kds
|
Kinetic_data_structures/test/Kinetic_data_structures/exact_kds
|
||||||
Kinetic_data_structures/test/Kinetic_data_structures/instantaneous_kernel
|
Kinetic_data_structures/test/Kinetic_data_structures/instantaneous_kernel
|
||||||
Kinetic_data_structures/test/Kinetic_data_structures/numbers
|
Kinetic_data_structures/test/Kinetic_data_structures/numbers
|
||||||
|
|
@ -248,8 +226,6 @@ Kinetic_data_structures/test/Kinetic_data_structures/test_KDS_Delaunay_triangula
|
||||||
Kinetic_data_structures/test/Kinetic_data_structures/timings
|
Kinetic_data_structures/test/Kinetic_data_structures/timings
|
||||||
Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3.qrc.depends
|
Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3.qrc.depends
|
||||||
Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3_demo
|
Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3_demo
|
||||||
Linear_cell_complex/demo/Linear_cell_complex/cgal_test_with_cmake
|
|
||||||
Linear_cell_complex/examples/Linear_cell_complex/cgal_test_with_cmake
|
|
||||||
Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3
|
Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3
|
||||||
Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_triangulation
|
Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_triangulation
|
||||||
Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_with_colored_vertices
|
Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_with_colored_vertices
|
||||||
|
|
@ -297,7 +273,6 @@ Mesh_2/demo/Mesh_2/*.core
|
||||||
Mesh_2/demo/Mesh_2/*.moc
|
Mesh_2/demo/Mesh_2/*.moc
|
||||||
Mesh_2/demo/Mesh_2/.*.deps
|
Mesh_2/demo/Mesh_2/.*.deps
|
||||||
Mesh_2/demo/Mesh_2/Makefile
|
Mesh_2/demo/Mesh_2/Makefile
|
||||||
Mesh_2/demo/Mesh_2/cgal_test_with_cmake
|
|
||||||
Mesh_2/demo/Mesh_2/conform
|
Mesh_2/demo/Mesh_2/conform
|
||||||
Mesh_2/demo/Mesh_2/depends
|
Mesh_2/demo/Mesh_2/depends
|
||||||
Mesh_2/demo/Mesh_2/filename.edg
|
Mesh_2/demo/Mesh_2/filename.edg
|
||||||
|
|
@ -309,7 +284,6 @@ Mesh_2/demo/Mesh_2/semantic.cache
|
||||||
Mesh_2/doxygen
|
Mesh_2/doxygen
|
||||||
Mesh_2/examples/Mesh_2/*.core
|
Mesh_2/examples/Mesh_2/*.core
|
||||||
Mesh_2/examples/Mesh_2/.*.deps
|
Mesh_2/examples/Mesh_2/.*.deps
|
||||||
Mesh_2/examples/Mesh_2/cgal_test_with_cmake
|
|
||||||
Mesh_2/examples/Mesh_2/conform
|
Mesh_2/examples/Mesh_2/conform
|
||||||
Mesh_2/examples/Mesh_2/conforming
|
Mesh_2/examples/Mesh_2/conforming
|
||||||
Mesh_2/examples/Mesh_2/depends
|
Mesh_2/examples/Mesh_2/depends
|
||||||
|
|
@ -324,7 +298,6 @@ Mesh_2/test/Mesh_2/*.core
|
||||||
Mesh_2/test/Mesh_2/.*.deps
|
Mesh_2/test/Mesh_2/.*.deps
|
||||||
Mesh_2/test/Mesh_2/Makefile
|
Mesh_2/test/Mesh_2/Makefile
|
||||||
Mesh_2/test/Mesh_2/bench_double_map
|
Mesh_2/test/Mesh_2/bench_double_map
|
||||||
Mesh_2/test/Mesh_2/cgal_test_with_cmake
|
|
||||||
Mesh_2/test/Mesh_2/conform_plus
|
Mesh_2/test/Mesh_2/conform_plus
|
||||||
Mesh_2/test/Mesh_2/depends
|
Mesh_2/test/Mesh_2/depends
|
||||||
Mesh_2/test/Mesh_2/my_makefile
|
Mesh_2/test/Mesh_2/my_makefile
|
||||||
|
|
@ -373,7 +346,6 @@ Mesh_3/examples/Mesh_3/.*.deps
|
||||||
Mesh_3/examples/Mesh_3/random-image.inr
|
Mesh_3/examples/Mesh_3/random-image.inr
|
||||||
Mesh_3/examples/Mesh_3/Makefile
|
Mesh_3/examples/Mesh_3/Makefile
|
||||||
Mesh_3/examples/Mesh_3/applications
|
Mesh_3/examples/Mesh_3/applications
|
||||||
Mesh_3/examples/Mesh_3/cgal_test_with_cmake
|
|
||||||
Mesh_3/examples/Mesh_3/cgal_to_medit
|
Mesh_3/examples/Mesh_3/cgal_to_medit
|
||||||
Mesh_3/examples/Mesh_3/chair-after.mesh
|
Mesh_3/examples/Mesh_3/chair-after.mesh
|
||||||
Mesh_3/examples/Mesh_3/chair-after.png
|
Mesh_3/examples/Mesh_3/chair-after.png
|
||||||
|
|
@ -411,7 +383,6 @@ Mesh_3/examples/Mesh_3/test_off
|
||||||
/Mesh_3/test/Mesh_3/a.lua
|
/Mesh_3/test/Mesh_3/a.lua
|
||||||
/Mesh_3/test/Mesh_3/applications
|
/Mesh_3/test/Mesh_3/applications
|
||||||
/Mesh_3/test/Mesh_3/*.cgal
|
/Mesh_3/test/Mesh_3/*.cgal
|
||||||
/Mesh_3/test/Mesh_3/cgal_test_with_cmake
|
|
||||||
/Mesh_3/test/Mesh_3/cgal_to_medit
|
/Mesh_3/test/Mesh_3/cgal_to_medit
|
||||||
/Mesh_3/test/Mesh_3/combined_spheres
|
/Mesh_3/test/Mesh_3/combined_spheres
|
||||||
/Mesh_3/test/Mesh_3/combined_spheres-with-sphere-oracle
|
/Mesh_3/test/Mesh_3/combined_spheres-with-sphere-oracle
|
||||||
|
|
@ -513,11 +484,9 @@ Min_ellipse_2/.tmp
|
||||||
Min_ellipse_2/Makefile
|
Min_ellipse_2/Makefile
|
||||||
Min_ellipse_2/bin
|
Min_ellipse_2/bin
|
||||||
Min_ellipse_2/doc_ps
|
Min_ellipse_2/doc_ps
|
||||||
Minkowski_sum_3/test/Minkowski_sum_3/cgal_test_with_cmake
|
|
||||||
Nef_2/test/Nef_2/EPoint-test
|
Nef_2/test/Nef_2/EPoint-test
|
||||||
Nef_2/test/Nef_2/Nef_polyhedron_2-test
|
Nef_2/test/Nef_2/Nef_polyhedron_2-test
|
||||||
Nef_2/test/Nef_2/Polynomial-test
|
Nef_2/test/Nef_2/Polynomial-test
|
||||||
Nef_2/test/Nef_2/cgal_test_with_cmake
|
|
||||||
Nef_2/test/Nef_2/nef_2_point_location
|
Nef_2/test/Nef_2/nef_2_point_location
|
||||||
Nef_3/demo/Nef_3/Makefile
|
Nef_3/demo/Nef_3/Makefile
|
||||||
Nef_3/examples/Nef_3/Makefile
|
Nef_3/examples/Nef_3/Makefile
|
||||||
|
|
@ -575,7 +544,6 @@ Number_types/test/Number_types/_test_valid_finite_double
|
||||||
Number_types/test/Number_types/_test_valid_finite_float
|
Number_types/test/Number_types/_test_valid_finite_float
|
||||||
Number_types/test/Number_types/bench_interval
|
Number_types/test/Number_types/bench_interval
|
||||||
Number_types/test/Number_types/cgal_test
|
Number_types/test/Number_types/cgal_test
|
||||||
Number_types/test/Number_types/cgal_test_with_cmake
|
|
||||||
Number_types/test/Number_types/constant
|
Number_types/test/Number_types/constant
|
||||||
Number_types/test/Number_types/double
|
Number_types/test/Number_types/double
|
||||||
Number_types/test/Number_types/doubletst
|
Number_types/test/Number_types/doubletst
|
||||||
|
|
@ -626,7 +594,6 @@ Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/moc_*.cpp
|
||||||
Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/ui_*.h
|
Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/ui_*.h
|
||||||
Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qch
|
Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qch
|
||||||
Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/Test_tds_IO_3
|
Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/Test_tds_IO_3
|
||||||
Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/cgal_test_with_cmake
|
|
||||||
Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_alpha_shape_3
|
Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_alpha_shape_3
|
||||||
Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_delaunay_3
|
Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_delaunay_3
|
||||||
Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_delaunay_hierarchy_3
|
Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_delaunay_hierarchy_3
|
||||||
|
|
@ -637,7 +604,6 @@ Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_trian
|
||||||
Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_triangulation_traits_H_3
|
Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_triangulation_traits_H_3
|
||||||
Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_triangulation_traits_SC_3
|
Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_triangulation_traits_SC_3
|
||||||
Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_triangulation_traits_SH_3
|
Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_triangulation_traits_SH_3
|
||||||
Point_set_2/test/Point_set_2/cgal_test_with_cmake
|
|
||||||
Point_set_2/test/Point_set_2/nearest_nb1
|
Point_set_2/test/Point_set_2/nearest_nb1
|
||||||
Point_set_2/test/Point_set_2/nearest_nb_fcn
|
Point_set_2/test/Point_set_2/nearest_nb_fcn
|
||||||
Point_set_2/test/Point_set_2/range_search_fcn
|
Point_set_2/test/Point_set_2/range_search_fcn
|
||||||
|
|
@ -683,7 +649,6 @@ Point_set_processing_3/test/Point_set_processing_3/smoothing_test
|
||||||
/Polygon_mesh_processing/test/Polygon_mesh_processing/elephant-oriented.off
|
/Polygon_mesh_processing/test/Polygon_mesh_processing/elephant-oriented.off
|
||||||
/Polygon_mesh_processing/test/Polygon_mesh_processing/elephant-shuffled.off
|
/Polygon_mesh_processing/test/Polygon_mesh_processing/elephant-shuffled.off
|
||||||
/Polygon_mesh_processing/test/Polygon_mesh_processing/blobby_2cc_no_id.off
|
/Polygon_mesh_processing/test/Polygon_mesh_processing/blobby_2cc_no_id.off
|
||||||
/Polygon_mesh_processing/test/Polygon_mesh_processing/cgal_test_with_cmake
|
|
||||||
/Polygon_mesh_processing/test/Polygon_mesh_processing/data/U.polylines.txt.off
|
/Polygon_mesh_processing/test/Polygon_mesh_processing/data/U.polylines.txt.off
|
||||||
/Polygon_mesh_processing/test/Polygon_mesh_processing/data/hole1.txt.off
|
/Polygon_mesh_processing/test/Polygon_mesh_processing/data/hole1.txt.off
|
||||||
/Polygon_mesh_processing/test/Polygon_mesh_processing/data/hole2.txt.off
|
/Polygon_mesh_processing/test/Polygon_mesh_processing/data/hole2.txt.off
|
||||||
|
|
@ -707,7 +672,6 @@ Polyhedron/demo/Polyhedron/snapshot.*
|
||||||
Polyhedron/demo/Polyhedron/ui_*.h
|
Polyhedron/demo/Polyhedron/ui_*.h
|
||||||
Polyhedron/test/Polyhedron/*.kdev*
|
Polyhedron/test/Polyhedron/*.kdev*
|
||||||
Polyhedron/test/Polyhedron/Makefile
|
Polyhedron/test/Polyhedron/Makefile
|
||||||
Polyhedron/test/Polyhedron/cgal_test_with_cmake
|
|
||||||
Polyhedron/test/Polyhedron/test_polyhedron
|
Polyhedron/test/Polyhedron/test_polyhedron
|
||||||
Polynomial/test/Polynomial/Exponent_vector
|
Polynomial/test/Polynomial/Exponent_vector
|
||||||
Polynomial/test/Polynomial/Interpolator
|
Polynomial/test/Polynomial/Interpolator
|
||||||
|
|
@ -715,7 +679,6 @@ Polynomial/test/Polynomial/Polynomial_traits_d
|
||||||
Polynomial/test/Polynomial/Polynomial_type_generator
|
Polynomial/test/Polynomial/Polynomial_type_generator
|
||||||
Polynomial/test/Polynomial/Polynomial_using_core
|
Polynomial/test/Polynomial/Polynomial_using_core
|
||||||
Polynomial/test/Polynomial/Polynomial_using_leda
|
Polynomial/test/Polynomial/Polynomial_using_leda
|
||||||
Polynomial/test/Polynomial/cgal_test_with_cmake
|
|
||||||
Polynomial/test/Polynomial/modular_gcd_utcf_algorithm_M
|
Polynomial/test/Polynomial/modular_gcd_utcf_algorithm_M
|
||||||
Polynomial/test/Polynomial/modular_gcd_utcf_dfai
|
Polynomial/test/Polynomial/modular_gcd_utcf_dfai
|
||||||
Polynomial/test/Polynomial/modular_gcd_utcf_pure_wang
|
Polynomial/test/Polynomial/modular_gcd_utcf_pure_wang
|
||||||
|
|
@ -745,10 +708,8 @@ Polytope_distance_d/.obj
|
||||||
Polytope_distance_d/.tmp
|
Polytope_distance_d/.tmp
|
||||||
Polytope_distance_d/Makefile
|
Polytope_distance_d/Makefile
|
||||||
Polytope_distance_d/bin
|
Polytope_distance_d/bin
|
||||||
Polytope_distance_d/test/Polytope_distance_d/cgal_test_with_cmake
|
|
||||||
Polytope_distance_d/test/Polytope_distance_d/test_Polytope_distance_d_d
|
Polytope_distance_d/test/Polytope_distance_d/test_Polytope_distance_d_d
|
||||||
Principal_component_analysis/test/Principal_component_analysis/bounding_box
|
Principal_component_analysis/test/Principal_component_analysis/bounding_box
|
||||||
Principal_component_analysis/test/Principal_component_analysis/cgal_test_with_cmake
|
|
||||||
Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_circles_2
|
Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_circles_2
|
||||||
Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_cuboids_3
|
Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_cuboids_3
|
||||||
Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_points_2
|
Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_points_2
|
||||||
|
|
@ -773,7 +734,6 @@ Principal_component_analysis/test/Principal_component_analysis/test_linear_least
|
||||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_tetrahedra_3
|
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_tetrahedra_3
|
||||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_triangles_2
|
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_triangles_2
|
||||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_triangles_3
|
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_triangles_3
|
||||||
/Profiling_tools/test/Profiling_tools/cgal_test_with_cmake
|
|
||||||
/Profiling_tools/test/Profiling_tools/test_memory_sizer
|
/Profiling_tools/test/Profiling_tools/test_memory_sizer
|
||||||
/Profiling_tools/test/Profiling_tools/test_timer
|
/Profiling_tools/test/Profiling_tools/test_timer
|
||||||
QP_solver/documentation/Degeneracies.aux
|
QP_solver/documentation/Degeneracies.aux
|
||||||
|
|
@ -805,7 +765,6 @@ Ridges_3/examples/Ridges_3/Compute_Ridges_Umbilics
|
||||||
Ridges_3/examples/Ridges_3/Makefile
|
Ridges_3/examples/Ridges_3/Makefile
|
||||||
Ridges_3/test/Ridges_3/Makefile
|
Ridges_3/test/Ridges_3/Makefile
|
||||||
Ridges_3/test/Ridges_3/ridge_test
|
Ridges_3/test/Ridges_3/ridge_test
|
||||||
STL_Extension/test/STL_Extension/cgal_test_with_cmake
|
|
||||||
STL_Extension/test/STL_Extension/test_Cache
|
STL_Extension/test/STL_Extension/test_Cache
|
||||||
STL_Extension/test/STL_Extension/test_Compact_container
|
STL_Extension/test/STL_Extension/test_Compact_container
|
||||||
STL_Extension/test/STL_Extension/test_Concatenate_iterator
|
STL_Extension/test/STL_Extension/test_Concatenate_iterator
|
||||||
|
|
@ -827,7 +786,6 @@ STL_Extension/test/STL_Extension/test_nth_element
|
||||||
STL_Extension/test/STL_Extension/test_stl_extension
|
STL_Extension/test/STL_Extension/test_stl_extension
|
||||||
STL_Extension/test/STL_Extension/test_type_traits
|
STL_Extension/test/STL_Extension/test_type_traits
|
||||||
STL_Extension/test/STL_Extension/test_vector
|
STL_Extension/test/STL_Extension/test_vector
|
||||||
SearchStructures/test/RangeSegmentTrees/cgal_test_with_cmake
|
|
||||||
SearchStructures/test/RangeSegmentTrees/test_segment_tree_set_2
|
SearchStructures/test/RangeSegmentTrees/test_segment_tree_set_2
|
||||||
Skin_surface_3/.cdtproject
|
Skin_surface_3/.cdtproject
|
||||||
Skin_surface_3/.project
|
Skin_surface_3/.project
|
||||||
|
|
@ -838,7 +796,6 @@ Skin_surface_3/test/Skin_surface_3/err.txt
|
||||||
Skin_surface_3/test/Skin_surface_3/makefile
|
Skin_surface_3/test/Skin_surface_3/makefile
|
||||||
Skin_surface_3/test/Skin_surface_3/msgs.txt
|
Skin_surface_3/test/Skin_surface_3/msgs.txt
|
||||||
Skin_surface_3/test/Skin_surface_3/subdivision_test
|
Skin_surface_3/test/Skin_surface_3/subdivision_test
|
||||||
Spatial_sorting/test/Spatial_sorting/cgal_test_with_cmake
|
|
||||||
Stream_lines_2/demo/Stream_lines_2/Makefile
|
Stream_lines_2/demo/Stream_lines_2/Makefile
|
||||||
Stream_lines_2/demo/Stream_lines_2/streamlines
|
Stream_lines_2/demo/Stream_lines_2/streamlines
|
||||||
Surface_mesh_parameterization/examples/Surface_mesh_parameterization/*.eps
|
Surface_mesh_parameterization/examples/Surface_mesh_parameterization/*.eps
|
||||||
|
|
@ -966,20 +923,15 @@ Triangulation/test/Triangulation/output-pcds*
|
||||||
Triangulation/test/Triangulation/pc
|
Triangulation/test/Triangulation/pc
|
||||||
Triangulation/test/Triangulation/pcds
|
Triangulation/test/Triangulation/pcds
|
||||||
Triangulation/test/Triangulation/torture
|
Triangulation/test/Triangulation/torture
|
||||||
/Triangulation/examples/Triangulation/cgal_test_with_cmake
|
|
||||||
/Triangulation/test/Triangulation/cgal_test_with_cmake
|
|
||||||
/Triangulation/test/Triangulation/output-tds-*
|
/Triangulation/test/Triangulation/output-tds-*
|
||||||
Triangulation_2/cgal_test_with_cmake
|
|
||||||
Triangulation_2/demo/Triangulation_2/Makefile
|
Triangulation_2/demo/Triangulation_2/Makefile
|
||||||
Triangulation_2/demo/Triangulation_2/constrained
|
Triangulation_2/demo/Triangulation_2/constrained
|
||||||
Triangulation_2/demo/Triangulation_2/constrained_delaunay_triangulation_2
|
Triangulation_2/demo/Triangulation_2/constrained_delaunay_triangulation_2
|
||||||
Triangulation_2/demo/Triangulation_2/delaunay_triangulation_2
|
Triangulation_2/demo/Triangulation_2/delaunay_triangulation_2
|
||||||
Triangulation_2/demo/Triangulation_2/regular_triangulation_2
|
Triangulation_2/demo/Triangulation_2/regular_triangulation_2
|
||||||
Triangulation_2/examples/Triangulation_2/cgal_test_with_cmake
|
|
||||||
Triangulation_2/examples/Triangulation_2/regular
|
Triangulation_2/examples/Triangulation_2/regular
|
||||||
Triangulation_2/test/Triangulation_2/Makefile
|
Triangulation_2/test/Triangulation_2/Makefile
|
||||||
Triangulation_2/test/Triangulation_2/T??.triangulation
|
Triangulation_2/test/Triangulation_2/T??.triangulation
|
||||||
Triangulation_2/test/Triangulation_2/cgal_test_with_cmake
|
|
||||||
Triangulation_2/test/Triangulation_2/file_tds*
|
Triangulation_2/test/Triangulation_2/file_tds*
|
||||||
Triangulation_2/test/Triangulation_2/makefile
|
Triangulation_2/test/Triangulation_2/makefile
|
||||||
Triangulation_2/test/Triangulation_2/test_cdt_degenerate_case
|
Triangulation_2/test/Triangulation_2/test_cdt_degenerate_case
|
||||||
|
|
@ -997,10 +949,8 @@ Triangulation_2/test/Triangulation_2/test_triangulation_2_bis
|
||||||
Triangulation_2/test/Triangulation_2/test_triangulation_geom_traits
|
Triangulation_2/test/Triangulation_2/test_triangulation_geom_traits
|
||||||
Triangulation_2/test/Triangulation_2/test_triangulation_tds
|
Triangulation_2/test/Triangulation_2/test_triangulation_tds
|
||||||
Triangulation_2/test/Triangulation_2/vrml_tds*
|
Triangulation_2/test/Triangulation_2/vrml_tds*
|
||||||
Triangulation_3/benchmark/Triangulation_3/cgal_test_with_cmake
|
|
||||||
Triangulation_3/benchmark/Triangulation_3/simple
|
Triangulation_3/benchmark/Triangulation_3/simple
|
||||||
Triangulation_3/examples/Triangulation_3/adding_handles_3
|
Triangulation_3/examples/Triangulation_3/adding_handles_3
|
||||||
Triangulation_3/examples/Triangulation_3/cgal_test_with_cmake
|
|
||||||
Triangulation_3/examples/Triangulation_3/color
|
Triangulation_3/examples/Triangulation_3/color
|
||||||
Triangulation_3/examples/Triangulation_3/fast_location_3
|
Triangulation_3/examples/Triangulation_3/fast_location_3
|
||||||
Triangulation_3/examples/Triangulation_3/find_conflicts_3
|
Triangulation_3/examples/Triangulation_3/find_conflicts_3
|
||||||
|
|
@ -1026,7 +976,6 @@ Triangulation_3/test/Triangulation_3/Test8_triangulation_IO_3_binary
|
||||||
Triangulation_3/test/Triangulation_3/Test??_triangulation_IO_3
|
Triangulation_3/test/Triangulation_3/Test??_triangulation_IO_3
|
||||||
Triangulation_3/test/Triangulation_3/Test?_triangulation_IO_3
|
Triangulation_3/test/Triangulation_3/Test?_triangulation_IO_3
|
||||||
Triangulation_3/test/Triangulation_3/Test_tds_IO_3
|
Triangulation_3/test/Triangulation_3/Test_tds_IO_3
|
||||||
Triangulation_3/test/Triangulation_3/cgal_test_with_cmake
|
|
||||||
Triangulation_3/test/Triangulation_3/makefile
|
Triangulation_3/test/Triangulation_3/makefile
|
||||||
Triangulation_3/test/Triangulation_3/test_delaunay_3
|
Triangulation_3/test/Triangulation_3/test_delaunay_3
|
||||||
Triangulation_3/test/Triangulation_3/test_delaunay_hierarchy_3
|
Triangulation_3/test/Triangulation_3/test_delaunay_hierarchy_3
|
||||||
|
|
@ -1083,7 +1032,6 @@ ProgramOutput*
|
||||||
ErrorOutput*
|
ErrorOutput*
|
||||||
CompilerOutput*
|
CompilerOutput*
|
||||||
error.txt
|
error.txt
|
||||||
cgal_test_with_cmake.log
|
|
||||||
|
|
||||||
# File created by the Semantic Bovinator (an Emacs package)
|
# File created by the Semantic Bovinator (an Emacs package)
|
||||||
semantic.cache
|
semantic.cache
|
||||||
|
|
@ -1140,9 +1088,7 @@ Doxyfile
|
||||||
gmon.*
|
gmon.*
|
||||||
|
|
||||||
# Unsorted file names:
|
# Unsorted file names:
|
||||||
/Point_set_processing_3/test/Point_set_processing_3/cgal_test_with_cmake
|
|
||||||
/Point_set_processing_3/test/Point_set_processing_3/read_test
|
/Point_set_processing_3/test/Point_set_processing_3/read_test
|
||||||
/Nef_S2/test/Nef_S2/cgal_test_with_cmake
|
|
||||||
/Arrangement_on_surface_2/test/Arrangement_on_surface_2/construction_test_suite_generator
|
/Arrangement_on_surface_2/test/Arrangement_on_surface_2/construction_test_suite_generator
|
||||||
/Arrangement_on_surface_2/test/Arrangement_on_surface_2/ex_kernel_point
|
/Arrangement_on_surface_2/test/Arrangement_on_surface_2/ex_kernel_point
|
||||||
/Arrangement_on_surface_2/test/Arrangement_on_surface_2/ex_kernel_segment
|
/Arrangement_on_surface_2/test/Arrangement_on_surface_2/ex_kernel_segment
|
||||||
|
|
@ -1190,15 +1136,11 @@ gmon.*
|
||||||
/Principal_component_analysis/examples/Principal_component_analysis/barycenter
|
/Principal_component_analysis/examples/Principal_component_analysis/barycenter
|
||||||
/Principal_component_analysis/examples/Principal_component_analysis/bounding_box
|
/Principal_component_analysis/examples/Principal_component_analysis/bounding_box
|
||||||
/Principal_component_analysis/examples/Principal_component_analysis/centroid
|
/Principal_component_analysis/examples/Principal_component_analysis/centroid
|
||||||
/Principal_component_analysis/examples/Principal_component_analysis/cgal_test_with_cmake
|
|
||||||
/Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_points_2
|
/Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_points_2
|
||||||
/Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_triangles_3
|
/Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_triangles_3
|
||||||
/Polygon/examples/Polygon/cgal_test_with_cmake
|
|
||||||
/Polygon/test/Polygon/cgal_test_with_cmake
|
|
||||||
/Polygon/test/Polygon/polytest.ascii
|
/Polygon/test/Polygon/polytest.ascii
|
||||||
/Polygon/test/Polygon/polytest.binary
|
/Polygon/test/Polygon/polytest.binary
|
||||||
/Polygon/test/Polygon/polytest.pretty
|
/Polygon/test/Polygon/polytest.pretty
|
||||||
/Stream_support/test/Stream_support/cgal_test_with_cmake
|
|
||||||
/*.html
|
/*.html
|
||||||
/Snap_rounding_2/test/Snap_rounding_2/data/out
|
/Snap_rounding_2/test/Snap_rounding_2/data/out
|
||||||
Polygonal_surface_reconstruction/examples/build*
|
Polygonal_surface_reconstruction/examples/build*
|
||||||
|
|
|
||||||
|
|
@ -1438,14 +1438,15 @@ vary according to the user choice.} for answering queries:
|
||||||
points or choosing points on a grid, are also available; see the
|
points or choosing points on a grid, are also available; see the
|
||||||
Reference Manual for more details.
|
Reference Manual for more details.
|
||||||
|
|
||||||
The landmark strategy requires that the type of the attached
|
The arrangement attached to the landmark strategy must be either (i)
|
||||||
arrangement be an instance of the `Arrangement_2<Traits,Dcel>` class
|
an instance of the `Arrangement_2<Geom,Dcel>` class template, where
|
||||||
template, where the `Traits` parameter is substituted by a
|
the `Traits` parameter is substituted by a geometry-traits class
|
||||||
geometry-traits class that models the `ArrangementLandmarkTraits_2`
|
that models the `ArrangementLandmarkTraits_2` concept, or (ii) an
|
||||||
concept, which refines the basic `ArrangementBasicTraits_2` concept;
|
instance of the `Arrangement_on_surface_2<GeomTraits,TopolTraits>`
|
||||||
see Section \ref aos_sssec-tr_landmarks_concept for details. Most
|
class template, where the `GeomTraits` is similarly substituted;
|
||||||
traits classes included in the \ref PkgArrangementOnSurface2 package
|
see Section \ref aos_sssec-tr_landmarks_concept for details about
|
||||||
are models of this refined concept.
|
this concept. Most traits classes included in the \ref
|
||||||
|
PkgArrangementOnSurface2 package are models of this refined concept.
|
||||||
|
|
||||||
<LI>`Arr_trapezoid_ric_point_location<Arrangement>` implements an
|
<LI>`Arr_trapezoid_ric_point_location<Arrangement>` implements an
|
||||||
improved variant of Mulmuley's point-location algorithm
|
improved variant of Mulmuley's point-location algorithm
|
||||||
|
|
|
||||||
|
|
@ -36,13 +36,6 @@ using Trap_pl = CGAL::Arr_trapezoid_ric_point_location<Gm>;
|
||||||
using Geom_traits = Gm::Geometry_traits_2;
|
using Geom_traits = Gm::Geometry_traits_2;
|
||||||
using Point_2 = Geom_traits::Point_2;
|
using Point_2 = Geom_traits::Point_2;
|
||||||
|
|
||||||
using Point_location_result = CGAL::Arr_point_location_result<Gm>;
|
|
||||||
using Query_result = std::pair<Point_2, Point_location_result::Type>;
|
|
||||||
|
|
||||||
using Vertex_const_handle = Gm::Vertex_const_handle;
|
|
||||||
using Halfedge_const_handle = Gm::Halfedge_const_handle;
|
|
||||||
using Face_const_handle = Gm::Face_const_handle;
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
Gm_polyhedron p;
|
Gm_polyhedron p;
|
||||||
p.make_tetrahedron(Point_3(1.0, 0.0, 0.0), Point_3(0.0, 1.0, 0.0),
|
p.make_tetrahedron(Point_3(1.0, 0.0, 0.0), Point_3(0.0, 1.0, 0.0),
|
||||||
|
|
@ -50,7 +43,7 @@ int main() {
|
||||||
Gm gm;
|
Gm gm;
|
||||||
|
|
||||||
Naive_pl naive_pl(gm);
|
Naive_pl naive_pl(gm);
|
||||||
// Landmarks_pl landmarks_pl(gm);
|
Landmarks_pl landmarks_pl(gm);
|
||||||
Walk_pl walk_pl(gm);
|
Walk_pl walk_pl(gm);
|
||||||
// Trap_pl trap_pl(gm);
|
// Trap_pl trap_pl(gm);
|
||||||
|
|
||||||
|
|
@ -70,30 +63,17 @@ int main() {
|
||||||
locate_point(naive_pl, points[1]);
|
locate_point(naive_pl, points[1]);
|
||||||
locate_point(naive_pl, points[2]);
|
locate_point(naive_pl, points[2]);
|
||||||
|
|
||||||
|
// locate_point(walk_pl, points[0]);
|
||||||
|
// locate_point(walk_pl, points[1]);
|
||||||
|
// locate_point(walk_pl, points[2]);
|
||||||
|
|
||||||
|
locate_point(landmarks_pl, points[0]);
|
||||||
|
locate_point(landmarks_pl, points[1]);
|
||||||
|
locate_point(landmarks_pl, points[2]);
|
||||||
|
|
||||||
// locate_point(trap_pl, points[0]);
|
// locate_point(trap_pl, points[0]);
|
||||||
|
// locate_point(trap_pl, points[1]);
|
||||||
////////
|
// locate_point(trap_pl, points[2]);
|
||||||
std::list<Query_result> results;
|
|
||||||
// The following cause an assertion failure.
|
|
||||||
// CGAL::locate(gm, &points[0], &points[3], std::back_inserter(results));
|
|
||||||
|
|
||||||
// Print the results.
|
|
||||||
for (auto it = results.begin(); it != results.end(); ++it) {
|
|
||||||
std::cout << "The point (" << it->first << ") is located ";
|
|
||||||
if (const Face_const_handle* f =
|
|
||||||
std::get_if<Face_const_handle>(&(it->second))) // inside a face
|
|
||||||
std::cout << "inside "
|
|
||||||
<< (((*f)->is_unbounded()) ? "the unbounded" : "a bounded")
|
|
||||||
<< " face.\n";
|
|
||||||
else if (const Halfedge_const_handle* e =
|
|
||||||
std::get_if<Halfedge_const_handle>(&(it->second))) // on an edge
|
|
||||||
std::cout << "on an edge: " << (*e)->curve() << std::endl;
|
|
||||||
else if (const Vertex_const_handle* v =
|
|
||||||
std::get_if<Vertex_const_handle>(&(it->second))) // on a vertex
|
|
||||||
std::cout << "on "
|
|
||||||
<< (((*v)->is_isolated()) ? "an isolated" : "a")
|
|
||||||
<< " vertex: " << (*v)->point() << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Idit Haran <haranidi@post.tau.ac.il>
|
// Author(s) : Idit Haran <haranidi@post.tau.ac.il>
|
||||||
// Ron Wein <wein@post.tau.ac.il>
|
// Ron Wein <wein@post.tau.ac.il>
|
||||||
|
|
||||||
#ifndef CGAL_ARR_LANDMARKS_POINT_LOCATION_H
|
#ifndef CGAL_ARR_LANDMARKS_POINT_LOCATION_H
|
||||||
#define CGAL_ARR_LANDMARKS_POINT_LOCATION_H
|
#define CGAL_ARR_LANDMARKS_POINT_LOCATION_H
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
#include <CGAL/Arr_point_location_result.h>
|
#include <CGAL/Arr_point_location_result.h>
|
||||||
#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
|
#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
|
||||||
#include <CGAL/Arr_point_location/Arr_lm_vertices_generator.h>
|
#include <CGAL/Arr_point_location/Arr_lm_vertices_generator.h>
|
||||||
|
#include <CGAL/Arr_tags.h>
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
|
@ -42,44 +43,54 @@ namespace CGAL {
|
||||||
* Generator is a class that generates the set of landmarks.
|
* Generator is a class that generates the set of landmarks.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template <class Arrangement_,
|
template <typename Arrangement_,
|
||||||
class Generator_ = Arr_landmarks_vertices_generator<Arrangement_> >
|
typename Generator_ = Arr_landmarks_vertices_generator<Arrangement_>>
|
||||||
class Arr_landmarks_point_location
|
class Arr_landmarks_point_location {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
typedef Arrangement_ Arrangement_2;
|
using Arrangement_2 = Arrangement_;
|
||||||
typedef typename Arrangement_2::Geometry_traits_2 Geometry_traits_2;
|
using Generator = Generator_;
|
||||||
typedef Generator_ Generator;
|
using Geometry_traits_2 = typename Arrangement_2::Geometry_traits_2;
|
||||||
|
|
||||||
typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle;
|
using Vertex_const_handle = typename Arrangement_2::Vertex_const_handle;
|
||||||
typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle;
|
using Halfedge_const_handle = typename Arrangement_2::Halfedge_const_handle;
|
||||||
typedef typename Arrangement_2::Face_const_handle Face_const_handle;
|
using Face_const_handle = typename Arrangement_2::Face_const_handle;
|
||||||
|
|
||||||
typedef typename Arrangement_2::Vertex_const_iterator Vertex_const_iterator;
|
using Vertex_const_iterator = typename Arrangement_2::Vertex_const_iterator;
|
||||||
typedef typename Arrangement_2::Halfedge_const_iterator
|
using Halfedge_const_iterator =
|
||||||
Halfedge_const_iterator;
|
typename Arrangement_2::Halfedge_const_iterator;
|
||||||
typedef typename Arrangement_2::Halfedge_around_vertex_const_circulator
|
|
||||||
Halfedge_around_vertex_const_circulator;
|
|
||||||
typedef typename Arrangement_2::Ccb_halfedge_const_circulator
|
|
||||||
Ccb_halfedge_const_circulator;
|
|
||||||
typedef typename Arrangement_2::Outer_ccb_const_iterator
|
|
||||||
Outer_ccb_const_iterator;
|
|
||||||
typedef typename Arrangement_2::Inner_ccb_const_iterator
|
|
||||||
Inner_ccb_const_iterator;
|
|
||||||
typedef typename Arrangement_2::Isolated_vertex_const_iterator
|
|
||||||
Isolated_vertex_const_iterator;
|
|
||||||
|
|
||||||
typedef typename Arrangement_2::Point_2 Point_2;
|
using Halfedge_around_vertex_const_circulator =
|
||||||
typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2;
|
typename Arrangement_2::Halfedge_around_vertex_const_circulator;
|
||||||
|
using Ccb_halfedge_const_circulator =
|
||||||
|
typename Arrangement_2::Ccb_halfedge_const_circulator;
|
||||||
|
using Outer_ccb_const_iterator =
|
||||||
|
typename Arrangement_2::Outer_ccb_const_iterator;
|
||||||
|
using Inner_ccb_const_iterator =
|
||||||
|
typename Arrangement_2::Inner_ccb_const_iterator;
|
||||||
|
using Isolated_vertex_const_iterator =
|
||||||
|
typename Arrangement_2::Isolated_vertex_const_iterator;
|
||||||
|
|
||||||
typedef Arr_point_location_result<Arrangement_2> Result;
|
using Point_2 = typename Arrangement_2::Point_2;
|
||||||
typedef typename Result::Type Result_type;
|
using X_monotone_curve_2 = typename Arrangement_2::X_monotone_curve_2;
|
||||||
|
|
||||||
|
using Result = Arr_point_location_result<Arrangement_2>;
|
||||||
|
using Result_type = typename Result::Type;
|
||||||
|
|
||||||
// Support cpp11::result_of
|
// Support cpp11::result_of
|
||||||
typedef Result_type result_type;
|
using result_type = Result_type;
|
||||||
|
|
||||||
|
private:
|
||||||
|
using Gt2 = Geometry_traits_2;
|
||||||
|
using Left_side_category =
|
||||||
|
typename internal::Arr_complete_left_side_category<Gt2>::Category;
|
||||||
|
using Right_side_category =
|
||||||
|
typename internal::Arr_complete_right_side_category<Gt2>::Category;
|
||||||
|
using Left_or_right_sides_category =
|
||||||
|
typename Arr_two_sides_category<Left_side_category,
|
||||||
|
Right_side_category>::result;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
typedef Arr_traits_basic_adaptor_2<Geometry_traits_2> Traits_adaptor_2;
|
using Traits_adaptor_2 = Arr_traits_basic_adaptor_2<Geometry_traits_2>;
|
||||||
|
|
||||||
/*! \struct Less_halfedge_handle
|
/*! \struct Less_halfedge_handle
|
||||||
* Used to sort handles.
|
* Used to sort handles.
|
||||||
|
|
@ -92,10 +103,10 @@ protected:
|
||||||
typedef std::set<Halfedge_const_handle, Less_halfedge_handle> Halfedge_set;
|
typedef std::set<Halfedge_const_handle, Less_halfedge_handle> Halfedge_set;
|
||||||
|
|
||||||
// Data members:
|
// Data members:
|
||||||
const Arrangement_2* p_arr; // The associated arrangement.
|
const Arrangement_2* p_arr; // The associated arrangement.
|
||||||
const Traits_adaptor_2* m_traits; // Its associated traits object.
|
const Traits_adaptor_2* m_traits; // Its associated traits object.
|
||||||
Generator* lm_gen; // The associated landmark generator.
|
Generator* lm_gen; // The associated landmark generator.
|
||||||
bool own_gen; // Indicates whether the generator
|
bool own_gen; // Indicates whether the generator
|
||||||
// has been locally allocated.
|
// has been locally allocated.
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
@ -103,7 +114,7 @@ protected:
|
||||||
inline Result_type default_result() const { return Result::default_result(); }
|
inline Result_type default_result() const { return Result::default_result(); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Default constructor. */
|
/*! constructs default. */
|
||||||
Arr_landmarks_point_location() :
|
Arr_landmarks_point_location() :
|
||||||
p_arr(nullptr),
|
p_arr(nullptr),
|
||||||
m_traits(nullptr),
|
m_traits(nullptr),
|
||||||
|
|
@ -111,34 +122,32 @@ public:
|
||||||
own_gen(false)
|
own_gen(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Constructor given an arrangement only. */
|
/*! constructs given an arrangement only. */
|
||||||
Arr_landmarks_point_location(const Arrangement_2& arr) :
|
Arr_landmarks_point_location(const Arrangement_2& arr) :
|
||||||
p_arr(&arr),
|
p_arr(&arr),
|
||||||
m_traits(static_cast<const Traits_adaptor_2*>(p_arr->geometry_traits())),
|
m_traits(static_cast<const Traits_adaptor_2*>(p_arr->geometry_traits())),
|
||||||
lm_gen(new Generator(arr)), // allocate the landmarks generator.
|
lm_gen(new Generator(arr)), // allocate the landmarks generator.
|
||||||
own_gen(true)
|
own_gen(true)
|
||||||
{ }
|
{}
|
||||||
|
|
||||||
/*! Constructor given an arrangement, and landmarks generator. */
|
/*! constructs given an arrangement, and landmarks generator. */
|
||||||
Arr_landmarks_point_location(const Arrangement_2& arr, Generator* gen) :
|
Arr_landmarks_point_location(const Arrangement_2& arr, Generator* gen) :
|
||||||
p_arr(&arr),
|
p_arr(&arr),
|
||||||
m_traits(static_cast<const Traits_adaptor_2*>(p_arr->geometry_traits())),
|
m_traits(static_cast<const Traits_adaptor_2*>(p_arr->geometry_traits())),
|
||||||
lm_gen(gen),
|
lm_gen(gen),
|
||||||
own_gen(false)
|
own_gen(false)
|
||||||
{ }
|
{}
|
||||||
|
|
||||||
/*! Destructor. */
|
/*! destructs. */
|
||||||
~Arr_landmarks_point_location()
|
~Arr_landmarks_point_location() {
|
||||||
{
|
|
||||||
if (own_gen) {
|
if (own_gen) {
|
||||||
delete lm_gen;
|
delete lm_gen;
|
||||||
lm_gen = nullptr;
|
lm_gen = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Attach an arrangement object (and a generator, if supplied). */
|
/*! attaches an arrangement object (and a generator, if supplied). */
|
||||||
void attach(const Arrangement_2& arr, Generator* gen = nullptr)
|
void attach(const Arrangement_2& arr, Generator* gen = nullptr) {
|
||||||
{
|
|
||||||
// Keep a pointer to the associated arrangement.
|
// Keep a pointer to the associated arrangement.
|
||||||
p_arr = &arr;
|
p_arr = &arr;
|
||||||
m_traits = static_cast<const Traits_adaptor_2*>(p_arr->geometry_traits());
|
m_traits = static_cast<const Traits_adaptor_2*>(p_arr->geometry_traits());
|
||||||
|
|
@ -163,9 +172,8 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Detach the instance from the arrangement object. */
|
/*! detaches the instance from the arrangement object. */
|
||||||
void detach()
|
void detach() {
|
||||||
{
|
|
||||||
p_arr = nullptr;
|
p_arr = nullptr;
|
||||||
m_traits = nullptr;
|
m_traits = nullptr;
|
||||||
|
|
||||||
|
|
@ -174,8 +182,7 @@ public:
|
||||||
lm_gen->detach();
|
lm_gen->detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! locates the arrangement feature containing the given point.
|
||||||
* Locate the arrangement feature containing the given point.
|
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
* \return An object representing the arrangement feature containing the
|
* \return An object representing the arrangement feature containing the
|
||||||
* query point. This object is either a Face_const_handle or a
|
* query point. This object is either a Face_const_handle or a
|
||||||
|
|
@ -184,7 +191,7 @@ public:
|
||||||
result_type locate(const Point_2& p) const;
|
result_type locate(const Point_2& p) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/*! Walk from the given vertex to the query point.
|
/*! walks from the given vertex to the query point.
|
||||||
* \param vh The given vertex handle.
|
* \param vh The given vertex handle.
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
* \param crossed_edges In/Out: The set of edges crossed so far.
|
* \param crossed_edges In/Out: The set of edges crossed so far.
|
||||||
|
|
@ -196,7 +203,7 @@ protected:
|
||||||
const Point_2& p,
|
const Point_2& p,
|
||||||
Halfedge_set& crossed_edges) const;
|
Halfedge_set& crossed_edges) const;
|
||||||
|
|
||||||
/*! Locate an edge around a given vertex that is the predecessor of the
|
/*! locates an edge around a given vertex that is the predecessor of the
|
||||||
* curve connecting the vertex to the query point in a clockwise order.
|
* curve connecting the vertex to the query point in a clockwise order.
|
||||||
* \param vh The vertex.
|
* \param vh The vertex.
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
|
|
@ -207,7 +214,7 @@ protected:
|
||||||
const Point_2& p,
|
const Point_2& p,
|
||||||
bool& new_vertex) const;
|
bool& new_vertex) const;
|
||||||
|
|
||||||
/*! Walk from a point on a given halfedge to the query point.
|
/*! walks from a point on a given halfedge to the query point.
|
||||||
* \param eh The given halfedge handle.
|
* \param eh The given halfedge handle.
|
||||||
* \param np The point that the walk starts from.
|
* \param np The point that the walk starts from.
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
|
|
@ -220,7 +227,7 @@ protected:
|
||||||
const Point_2& np,
|
const Point_2& np,
|
||||||
const Point_2& p,
|
const Point_2& p,
|
||||||
Halfedge_set& crossed_edges) const;
|
Halfedge_set& crossed_edges) const;
|
||||||
/*! In case the arrangement's curve contained in the segment
|
/*! handles the arrangement curve contained in the segment
|
||||||
* from the nearest landmark to the query point
|
* from the nearest landmark to the query point
|
||||||
* \param he The given halfedge handle.
|
* \param he The given halfedge handle.
|
||||||
* \param p_is_left Is the query point the left endpoint of seg.
|
* \param p_is_left Is the query point the left endpoint of seg.
|
||||||
|
|
@ -236,7 +243,7 @@ protected:
|
||||||
const Point_2& p,
|
const Point_2& p,
|
||||||
Halfedge_set& crossed_edges) const;
|
Halfedge_set& crossed_edges) const;
|
||||||
|
|
||||||
/*! Walk from a point in a face to the query point.
|
/*! walks from a point in a face to the query point.
|
||||||
* \param fh A halfedge handle that points to the face.
|
* \param fh A halfedge handle that points to the face.
|
||||||
* \param np The point that the walk starts from.
|
* \param np The point that the walk starts from.
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
|
|
@ -250,7 +257,7 @@ protected:
|
||||||
const Point_2& p,
|
const Point_2& p,
|
||||||
Halfedge_set& crossed_edges) const;
|
Halfedge_set& crossed_edges) const;
|
||||||
|
|
||||||
/*! Find a halfedge on the given CCB that intersects the given x-monotone
|
/*! finds a halfedge on the given CCB that intersects the given x-monotone
|
||||||
* curve, connecting the current landmark to the query point.
|
* curve, connecting the current landmark to the query point.
|
||||||
* \param circ The CCB circulator.
|
* \param circ The CCB circulator.
|
||||||
* \param seg The segment connecting the landmark and the query point.
|
* \param seg The segment connecting the landmark and the query point.
|
||||||
|
|
@ -275,7 +282,7 @@ protected:
|
||||||
bool& cv_is_contained_in_seg,
|
bool& cv_is_contained_in_seg,
|
||||||
Vertex_const_handle& new_vertex) const;
|
Vertex_const_handle& new_vertex) const;
|
||||||
|
|
||||||
/*! Return the halfedge that contains the query point.
|
/*! returns the halfedge that contains the query point.
|
||||||
* \param he The halfedge handle.
|
* \param he The halfedge handle.
|
||||||
* \param crossed_edges In/Out: The set of edges crossed so far.
|
* \param crossed_edges In/Out: The set of edges crossed so far.
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
|
|
@ -287,7 +294,7 @@ protected:
|
||||||
const Point_2& p,
|
const Point_2& p,
|
||||||
bool& is_target) const;
|
bool& is_target) const;
|
||||||
|
|
||||||
/*! Check whether the given curve intersects a simple segment, which connects
|
/*! checks whether the given curve intersects a simple segment, which connects
|
||||||
* the current landmark to the query point, an odd number of times.
|
* the current landmark to the query point, an odd number of times.
|
||||||
* \param cv The curve.
|
* \param cv The curve.
|
||||||
* \param seg The segment connecting the landmark and the query point.
|
* \param seg The segment connecting the landmark and the query point.
|
||||||
|
|
@ -303,9 +310,62 @@ protected:
|
||||||
bool& p_on_curve,
|
bool& p_on_curve,
|
||||||
bool& cv_and_seg_overlap,
|
bool& cv_and_seg_overlap,
|
||||||
bool& cv_is_contained_in_seg) const;
|
bool& cv_is_contained_in_seg) const;
|
||||||
|
|
||||||
|
//!
|
||||||
|
template <typename T>
|
||||||
|
std::pair<X_monotone_curve_2, Comparison_result>
|
||||||
|
construct_segment(const Point_2& p, const Point_2& q, T const& traits,
|
||||||
|
...) const {
|
||||||
|
X_monotone_curve_2 seg = traits.construct_x_monotone_curve_2_object()(p, q);
|
||||||
|
Comparison_result res = traits.compare_xy_2_object()(p, q);
|
||||||
|
return std::make_pair(seg, res);
|
||||||
|
}
|
||||||
|
|
||||||
|
//*!
|
||||||
|
template <typename T, typename = typename T::Compare_endpoints_xy_2>
|
||||||
|
std::pair<X_monotone_curve_2, Comparison_result>
|
||||||
|
construct_segment(const Point_2& p, const Point_2& q, T const& traits,
|
||||||
|
int) const {
|
||||||
|
X_monotone_curve_2 seg = traits.construct_x_monotone_curve_2_object()(p, q);
|
||||||
|
Comparison_result res = traits.compare_endpoints_xy_2_object()(seg);
|
||||||
|
return std::make_pair(seg, res);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*! Determines whether the $x$-coordinates of two points are equal.
|
||||||
|
*/
|
||||||
|
bool equal_x_2(const Point_2& p, const Point_2& q,
|
||||||
|
Arr_all_sides_oblivious_tag) const
|
||||||
|
{ return (m_traits->compare_x_2_object()(p, q) == EQUAL); }
|
||||||
|
|
||||||
|
/*! Determines whether the $x$-coordinates of two points are equal.
|
||||||
|
*/
|
||||||
|
bool equal_x_2(const Point_2& p, const Point_2& q,
|
||||||
|
Arr_has_identified_side_tag) const {
|
||||||
|
auto is_on_y_identification = m_traits->is_on_y_identification_2_object();
|
||||||
|
if (is_on_y_identification(p)) {
|
||||||
|
return is_on_y_identification(q);
|
||||||
|
}
|
||||||
|
if (is_on_y_identification(q)) return false;
|
||||||
|
return (m_traits->compare_x_2_object()(p, q) == EQUAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*! Determines whether the $x$-coordinates of two points are equal.
|
||||||
|
*/
|
||||||
|
bool equal_x_2(const Point_2& p, const Point_2& q,
|
||||||
|
Arr_boundary_cond_tag) const {
|
||||||
|
auto param_space_in_x = m_traits->parameter_space_in_x_2_object();
|
||||||
|
switch (param_space_in_x(p)) {
|
||||||
|
case ARR_LEFT_BOUNDARY: return (param_space_in_x(q) == ARR_LEFT_BOUNDARY);
|
||||||
|
case ARR_RIGHT_BOUNDARY: return (param_space_in_x(q) == ARR_LEFT_BOUNDARY);
|
||||||
|
case ARR_INTERIOR: return (m_traits->compare_x_2_object()(p, q) == EQUAL);
|
||||||
|
default: CGAL_error();
|
||||||
|
}
|
||||||
|
CGAL_error();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} //namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
// The member-function definitions can be found under:
|
// The member-function definitions can be found under:
|
||||||
#include <CGAL/Arr_point_location/Arr_landmarks_pl_impl.h>
|
#include <CGAL/Arr_point_location/Arr_landmarks_pl_impl.h>
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,15 @@
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
// Author(s) : Idit Haran <haranidi@post.tau.ac.il>
|
// Author(s) : Idit Haran <haranidi@post.tau.ac.il>
|
||||||
// Ron Wein <wein@post.tau.ac.il>
|
// Ron Wein <wein@post.tau.ac.il>
|
||||||
// Efi Fogel <efif@post.tau.ac.il>
|
// Efi Fogel <efif@post.tau.ac.il>
|
||||||
|
|
||||||
#ifndef CGAL_ARR_LANDMARKS_PL_IMPL_H
|
#ifndef CGAL_ARR_LANDMARKS_PL_IMPL_H
|
||||||
#define CGAL_ARR_LANDMARKS_PL_IMPL_H
|
#define CGAL_ARR_LANDMARKS_PL_IMPL_H
|
||||||
|
|
||||||
#include <CGAL/license/Arrangement_on_surface_2.h>
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
/*! \file
|
/*! \file
|
||||||
* Member-function definitions for the
|
* Member-function definitions for the
|
||||||
* Arr_landmarks_point_location<Arrangement, Generator> class.
|
* Arr_landmarks_point_location<Arrangement, Generator> class.
|
||||||
|
|
@ -24,60 +23,53 @@
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
/*! locates the arrangement feature containing the given point.
|
||||||
// Locate the arrangement feature containing the given point.
|
*/
|
||||||
//
|
|
||||||
template <typename Arr, typename Gen>
|
template <typename Arr, typename Gen>
|
||||||
typename Arr_landmarks_point_location<Arr, Gen>::result_type
|
typename Arr_landmarks_point_location<Arr, Gen>::result_type
|
||||||
Arr_landmarks_point_location<Arr, Gen>::locate(const Point_2& p) const
|
Arr_landmarks_point_location<Arr, Gen>::locate(const Point_2& p) const {
|
||||||
{
|
|
||||||
// If the arrangement is empty, return its initial (empty and
|
// If the arrangement is empty, return its initial (empty and
|
||||||
// non-fictitious) face.
|
// non-fictitious) face.
|
||||||
if (p_arr->number_of_vertices() == 0) {
|
if (p_arr->number_of_vertices() == 0) {
|
||||||
CGAL_assertion(p_arr->number_of_faces() == 1);
|
CGAL_assertion(p_arr->number_of_faces() == 1);
|
||||||
Face_const_handle fh = p_arr->faces_begin();
|
Face_const_handle fh = p_arr->faces_begin();
|
||||||
return make_result(fh);
|
return make_result(fh);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use the generator and to find the closest landmark to the query point.
|
// Use the generator and to find the closest landmark to the query point.
|
||||||
result_type lm_location_obj;
|
result_type lm_location_obj;
|
||||||
const Point_2& landmark_point = lm_gen->closest_landmark(p, lm_location_obj);
|
const Point_2& landmark_point = lm_gen->closest_landmark(p, lm_location_obj);
|
||||||
|
|
||||||
// If the query point and the landmark point are equal, return the landmark.
|
// If the query point and the landmark point are equal, return the landmark.
|
||||||
if (m_traits->equal_2_object()(landmark_point, p))
|
if (m_traits->equal_2_object()(landmark_point, p)) return lm_location_obj;
|
||||||
return lm_location_obj;
|
|
||||||
|
|
||||||
// Walk from the nearest_vertex to the point p, using walk algorithm,
|
// Walk from the nearest_vertex to the point p, using walk algorithm,
|
||||||
// and find the location of the query point p. Note that the set of edges
|
// and find the location of the query point p. Note that the set of edges
|
||||||
// we have crossed so far is initially empty.
|
// we have crossed so far is initially empty.
|
||||||
Halfedge_set crossed_edges;
|
Halfedge_set crossed_edges;
|
||||||
result_type out_obj;
|
result_type out_obj;
|
||||||
|
|
||||||
// Locate the arrangement feature that contains the landmark.
|
// Locate the arrangement feature that contains the landmark.
|
||||||
const Vertex_const_handle* vh;
|
if (const auto* v = std::get_if<Vertex_const_handle>(&lm_location_obj))
|
||||||
const Halfedge_const_handle* hh;
|
out_obj = _walk_from_vertex(*v, p, crossed_edges);
|
||||||
const Face_const_handle* fh;
|
else if (const auto* e = std::get_if<Halfedge_const_handle>(&lm_location_obj))
|
||||||
if ( ( vh = Result().template assign<Vertex_const_handle>(&lm_location_obj) ) )
|
out_obj = _walk_from_edge(*e, landmark_point, p, crossed_edges);
|
||||||
out_obj = _walk_from_vertex(*vh, p, crossed_edges);
|
else if (const auto* f = std::get_if<Face_const_handle>(&lm_location_obj))
|
||||||
else if ( ( hh = Result().template assign<Halfedge_const_handle>(&lm_location_obj) ) )
|
out_obj = _walk_from_face(*f, landmark_point, p, crossed_edges);
|
||||||
out_obj = _walk_from_edge(*hh, landmark_point, p, crossed_edges);
|
|
||||||
else if ( ( fh = Result().template assign<Face_const_handle>(&lm_location_obj) ) )
|
|
||||||
out_obj = _walk_from_face(*fh, landmark_point, p, crossed_edges);
|
|
||||||
else CGAL_error_msg("lm_location_obj of an unknown type.");
|
else CGAL_error_msg("lm_location_obj of an unknown type.");
|
||||||
|
|
||||||
if ( ( fh = Result().template assign<Face_const_handle>(&out_obj) ) ) {
|
if (const auto* fp = std::get_if<Face_const_handle>(&out_obj)) {
|
||||||
|
const auto& f = *fp;
|
||||||
// If we reached here, we did not locate the query point in any of the
|
// If we reached here, we did not locate the query point in any of the
|
||||||
// holes inside the current face, so we conclude it is contained in this
|
// holes inside the current face, so we conclude it is contained in this
|
||||||
// face.
|
// face. However, we first have to check whether the query point coincides
|
||||||
// However, we first have to check whether the query point coincides with
|
// with any of the isolated vertices contained inside this face.
|
||||||
// any of the isolated vertices contained inside this face.
|
auto equal = m_traits->equal_2_object();
|
||||||
Isolated_vertex_const_iterator iso_verts_it;
|
// Do not use 'auto' to define the iterator, as MSVC2017 complains.
|
||||||
typename Traits_adaptor_2::Equal_2 equal = m_traits->equal_2_object();
|
for (Isolated_vertex_const_iterator iso_verts_it = f->isolated_vertices_begin();
|
||||||
|
iso_verts_it != f->isolated_vertices_end(); ++iso_verts_it) {
|
||||||
for (iso_verts_it = (*fh)->isolated_vertices_begin();
|
|
||||||
iso_verts_it != (*fh)->isolated_vertices_end(); ++iso_verts_it)
|
|
||||||
{
|
|
||||||
if (equal(p, iso_verts_it->point())) {
|
if (equal(p, iso_verts_it->point())) {
|
||||||
Vertex_const_handle ivh = iso_verts_it;
|
Vertex_const_handle ivh = iso_verts_it;
|
||||||
return make_result(ivh);
|
return make_result(ivh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -86,28 +78,24 @@ Arr_landmarks_point_location<Arr, Gen>::locate(const Point_2& p) const
|
||||||
return out_obj;
|
return out_obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
/*! walks from a given vertex to the query point.
|
||||||
// Walk from a given vertex to the query point.
|
*/
|
||||||
//
|
|
||||||
template <typename Arr, typename Gen>
|
template <typename Arr, typename Gen>
|
||||||
typename Arr_landmarks_point_location<Arr, Gen>::result_type
|
typename Arr_landmarks_point_location<Arr, Gen>::result_type
|
||||||
Arr_landmarks_point_location<Arr, Gen>::
|
Arr_landmarks_point_location<Arr, Gen>::
|
||||||
_walk_from_vertex(Vertex_const_handle nearest_vertex,
|
_walk_from_vertex(Vertex_const_handle nearest_vertex, const Point_2& p,
|
||||||
const Point_2& p,
|
Halfedge_set& crossed_edges) const {
|
||||||
Halfedge_set& crossed_edges) const
|
|
||||||
{
|
|
||||||
Vertex_const_handle vh = nearest_vertex;
|
Vertex_const_handle vh = nearest_vertex;
|
||||||
CGAL_assertion_msg(! vh->is_at_open_boundary(),
|
CGAL_assertion_msg(! vh->is_at_open_boundary(),
|
||||||
"_walk_from_vertex() from a vertex at infinity.");
|
"_walk_from_vertex() from a vertex at infinity.");
|
||||||
|
|
||||||
// Check if the query point p coincides with the vertex.
|
// Check if the query point p coincides with the vertex.
|
||||||
if (m_traits->equal_2_object()(vh->point(), p))
|
if (m_traits->equal_2_object()(vh->point(), p)) return make_result(vh);
|
||||||
return make_result(vh);
|
|
||||||
|
|
||||||
// In case of an isolated vertex, walk to from the face that contains
|
// In case of an isolated vertex, walk to from the face that contains
|
||||||
// it toward the query point.
|
// it toward the query point.
|
||||||
if (vh->is_isolated()) {
|
if (vh->is_isolated()) {
|
||||||
Face_const_handle fh = vh->face();
|
Face_const_handle fh = vh->face();
|
||||||
return (_walk_from_face(fh, vh->point(), p, crossed_edges));
|
return (_walk_from_face(fh, vh->point(), p, crossed_edges));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -116,16 +104,15 @@ _walk_from_vertex(Vertex_const_handle nearest_vertex,
|
||||||
Halfedge_around_vertex_const_circulator first = vh->incident_halfedges();
|
Halfedge_around_vertex_const_circulator first = vh->incident_halfedges();
|
||||||
// Create an x-monotone curve connecting the point associated with the
|
// Create an x-monotone curve connecting the point associated with the
|
||||||
// vertex vp and the query point p.
|
// vertex vp and the query point p.
|
||||||
const Point_2& vp = vh->point();
|
const Point_2& vp = vh->point();
|
||||||
X_monotone_curve_2 seg =
|
X_monotone_curve_2 seg;
|
||||||
m_traits->construct_x_monotone_curve_2_object()(vp, p);
|
Comparison_result res;
|
||||||
const bool seg_dir_right =
|
std::tie(seg, res) = construct_segment(vp, p, *m_traits, 0);
|
||||||
(m_traits->compare_xy_2_object()(vp, p) == SMALLER);
|
bool seg_dir_right = (res == SMALLER);
|
||||||
Halfedge_around_vertex_const_circulator curr_iter = first;
|
Halfedge_around_vertex_const_circulator curr_iter = first;
|
||||||
Halfedge_around_vertex_const_circulator next_iter = curr_iter;
|
Halfedge_around_vertex_const_circulator next_iter = curr_iter;
|
||||||
++next_iter;
|
++next_iter;
|
||||||
typename Traits_adaptor_2::Is_between_cw_2 is_between_cw =
|
auto is_between_cw = m_traits->is_between_cw_2_object();
|
||||||
m_traits->is_between_cw_2_object();
|
|
||||||
// Traverse the halfedges around vp until we find the pair of adjacent
|
// Traverse the halfedges around vp until we find the pair of adjacent
|
||||||
// halfedges such as seg is located clockwise in between them.
|
// halfedges such as seg is located clockwise in between them.
|
||||||
do {
|
do {
|
||||||
|
|
@ -134,12 +121,11 @@ _walk_from_vertex(Vertex_const_handle nearest_vertex,
|
||||||
(curr_iter->direction() == ARR_RIGHT_TO_LEFT),
|
(curr_iter->direction() == ARR_RIGHT_TO_LEFT),
|
||||||
next_iter->curve(),
|
next_iter->curve(),
|
||||||
(next_iter->direction() == ARR_RIGHT_TO_LEFT),
|
(next_iter->direction() == ARR_RIGHT_TO_LEFT),
|
||||||
vp, eq_curr_iter, eq_next_iter))
|
vp, eq_curr_iter, eq_next_iter)) {
|
||||||
{
|
|
||||||
// the assumption is that each edge is crossed at most twice
|
// the assumption is that each edge is crossed at most twice
|
||||||
CGAL_assertion_msg(crossed_edges.count (curr_iter) < 2,
|
CGAL_assertion_msg(crossed_edges.count(curr_iter) < 2,
|
||||||
"crossed_edges should contain each halfedge at most twice.");
|
"crossed_edges should contain each halfedge at most twice.");
|
||||||
CGAL_assertion_msg(crossed_edges.count (next_iter) < 2,
|
CGAL_assertion_msg(crossed_edges.count(next_iter) < 2,
|
||||||
"crossed_edges should contain each halfedge at most twice.");
|
"crossed_edges should contain each halfedge at most twice.");
|
||||||
crossed_edges.insert(curr_iter);
|
crossed_edges.insert(curr_iter);
|
||||||
crossed_edges.insert(curr_iter->twin());
|
crossed_edges.insert(curr_iter->twin());
|
||||||
|
|
@ -158,8 +144,7 @@ _walk_from_vertex(Vertex_const_handle nearest_vertex,
|
||||||
result_type obj = _find_face_around_vertex(vh, p, new_vertex);
|
result_type obj = _find_face_around_vertex(vh, p, new_vertex);
|
||||||
if (new_vertex) {
|
if (new_vertex) {
|
||||||
// We found a vertex closer to p; Continue using this vertex.
|
// We found a vertex closer to p; Continue using this vertex.
|
||||||
const Vertex_const_handle* p_vh =
|
const auto* p_vh = std::get_if<Vertex_const_handle>(&obj);
|
||||||
Result().template assign<Vertex_const_handle>(&obj);
|
|
||||||
CGAL_assertion(p_vh != nullptr);
|
CGAL_assertion(p_vh != nullptr);
|
||||||
vh = *p_vh;
|
vh = *p_vh;
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -167,15 +152,13 @@ _walk_from_vertex(Vertex_const_handle nearest_vertex,
|
||||||
|
|
||||||
// If p is located on an edge or on a vertex, return the object
|
// If p is located on an edge or on a vertex, return the object
|
||||||
// that wraps this arrangement feature.
|
// that wraps this arrangement feature.
|
||||||
if (Result().template assign<Halfedge_const_handle>(&obj) ||
|
if (std::get_if<Halfedge_const_handle>(&obj) ||
|
||||||
Result().template assign<Vertex_const_handle>(&obj))
|
std::get_if<Vertex_const_handle>(&obj))
|
||||||
return obj;
|
return obj;
|
||||||
|
|
||||||
const Face_const_handle* p_fh =
|
const auto* p_fh = std::get_if<Face_const_handle>(&obj);
|
||||||
Result().template assign<Face_const_handle>(&obj);
|
// Walk to p from the face we have located:
|
||||||
if (p_fh)
|
if (p_fh) return _walk_from_face(*p_fh, vh->point(), p, crossed_edges);
|
||||||
// Walk to p from the face we have located:
|
|
||||||
return _walk_from_face(*p_fh, vh->point(), p, crossed_edges);
|
|
||||||
|
|
||||||
CGAL_error_msg("_find_face_around_vertex() returned an unknown object.");
|
CGAL_error_msg("_find_face_around_vertex() returned an unknown object.");
|
||||||
}
|
}
|
||||||
|
|
@ -185,31 +168,27 @@ _walk_from_vertex(Vertex_const_handle nearest_vertex,
|
||||||
return default_result();
|
return default_result();
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
/*! locates an edge around a given vertex that is the predecessor of the curve
|
||||||
// Locate an edge around a given vertex that is the predecessor of the curve
|
* connecting the vertex to the query point in a clockwise order.
|
||||||
// connecting the vertex to the query point in a clockwise order.
|
*/
|
||||||
//
|
|
||||||
template <typename Arr, typename Gen>
|
template <typename Arr, typename Gen>
|
||||||
typename Arr_landmarks_point_location<Arr, Gen>::result_type
|
typename Arr_landmarks_point_location<Arr, Gen>::result_type
|
||||||
Arr_landmarks_point_location<Arr, Gen>::
|
Arr_landmarks_point_location<Arr, Gen>::
|
||||||
_find_face_around_vertex(Vertex_const_handle vh,
|
_find_face_around_vertex(Vertex_const_handle vh, const Point_2& p,
|
||||||
const Point_2& p,
|
bool& new_vertex) const {
|
||||||
bool& new_vertex) const
|
|
||||||
{
|
|
||||||
new_vertex = false;
|
new_vertex = false;
|
||||||
|
|
||||||
// Create an x-monotone curve connecting the point associated with the
|
// Create an x-monotone curve connecting the point associated with the
|
||||||
// vertex vp and the query point p.
|
// vertex vp and the query point p.
|
||||||
const Point_2& vp = vh->point();
|
const Point_2& vp = vh->point();
|
||||||
X_monotone_curve_2 seg =
|
X_monotone_curve_2 seg;
|
||||||
m_traits->construct_x_monotone_curve_2_object()(vp, p);
|
Comparison_result res;
|
||||||
const bool seg_dir_right =
|
std::tie(seg, res) = construct_segment(vp, p, *m_traits, 0);
|
||||||
(m_traits->compare_xy_2_object()(vp, p) == SMALLER);
|
bool seg_dir_right = (res == SMALLER);
|
||||||
|
|
||||||
// Get the first incident halfedge around v and the next halfedge.
|
// Get the first incident halfedge around v and the next halfedge.
|
||||||
Halfedge_around_vertex_const_circulator first = vh->incident_halfedges();
|
Halfedge_around_vertex_const_circulator first = vh->incident_halfedges();
|
||||||
Halfedge_around_vertex_const_circulator curr, next;
|
Halfedge_around_vertex_const_circulator curr, next;
|
||||||
bool equal_curr = false;
|
bool equal_curr = false;
|
||||||
|
|
||||||
next = curr = first;
|
next = curr = first;
|
||||||
++next;
|
++next;
|
||||||
|
|
@ -241,16 +220,14 @@ _find_face_around_vertex(Vertex_const_handle vh,
|
||||||
else {
|
else {
|
||||||
// Traverse the halfedges around v until we find the pair of adjacent
|
// Traverse the halfedges around v until we find the pair of adjacent
|
||||||
// halfedges such as seg is located clockwise in between them.
|
// halfedges such as seg is located clockwise in between them.
|
||||||
typename Traits_adaptor_2::Is_between_cw_2 is_between_cw =
|
auto is_between_cw = m_traits->is_between_cw_2_object();
|
||||||
m_traits->is_between_cw_2_object();
|
bool eq_curr, eq_next;
|
||||||
bool eq_curr, eq_next;
|
|
||||||
|
|
||||||
while (! is_between_cw(seg, seg_dir_right, curr->curve(),
|
while (! is_between_cw(seg, seg_dir_right, curr->curve(),
|
||||||
(curr->direction() == ARR_RIGHT_TO_LEFT),
|
(curr->direction() == ARR_RIGHT_TO_LEFT),
|
||||||
next->curve(),
|
next->curve(),
|
||||||
(next->direction() == ARR_RIGHT_TO_LEFT),
|
(next->direction() == ARR_RIGHT_TO_LEFT),
|
||||||
vp, eq_curr, eq_next))
|
vp, eq_curr, eq_next)) {
|
||||||
{
|
|
||||||
// Break the loop if seg equals one of the halfedges next to v.
|
// Break the loop if seg equals one of the halfedges next to v.
|
||||||
if (eq_curr) {
|
if (eq_curr) {
|
||||||
equal_curr = true;
|
equal_curr = true;
|
||||||
|
|
@ -291,10 +268,9 @@ _find_face_around_vertex(Vertex_const_handle vh,
|
||||||
|
|
||||||
// Check whether p lies on the curve associated with the edge.
|
// Check whether p lies on the curve associated with the edge.
|
||||||
if (m_traits->is_in_x_range_2_object()(curr->curve(), p) &&
|
if (m_traits->is_in_x_range_2_object()(curr->curve(), p) &&
|
||||||
m_traits->compare_y_at_x_2_object()(p, curr->curve()) == EQUAL)
|
m_traits->compare_y_at_x_2_object()(p, curr->curve()) == EQUAL) {
|
||||||
{
|
|
||||||
// p is located on the interior of the edge.
|
// p is located on the interior of the edge.
|
||||||
Halfedge_const_handle he = curr;
|
Halfedge_const_handle he = curr;
|
||||||
return make_result(he);
|
return make_result(he);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -304,22 +280,18 @@ _find_face_around_vertex(Vertex_const_handle vh,
|
||||||
return make_result(curr->source());
|
return make_result(curr->source());
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
/*! walks from the edge to the query point.
|
||||||
// Walk from the edge to the query point.
|
*/
|
||||||
//
|
|
||||||
template <typename Arr, typename Gen>
|
template <typename Arr, typename Gen>
|
||||||
typename Arr_landmarks_point_location<Arr, Gen>::result_type
|
typename Arr_landmarks_point_location<Arr, Gen>::result_type
|
||||||
Arr_landmarks_point_location<Arr, Gen>::
|
Arr_landmarks_point_location<Arr, Gen>::
|
||||||
_walk_from_edge(Halfedge_const_handle eh,
|
_walk_from_edge(Halfedge_const_handle eh, const Point_2& np, const Point_2& p,
|
||||||
const Point_2& np,
|
Halfedge_set& crossed_edges) const {
|
||||||
const Point_2& p,
|
|
||||||
Halfedge_set& crossed_edges) const
|
|
||||||
{
|
|
||||||
CGAL_assertion_msg(! eh->is_fictitious(),
|
CGAL_assertion_msg(! eh->is_fictitious(),
|
||||||
"_walk_from_edge() from a fictitious edge.");
|
"_walk_from_edge() from a fictitious edge.");
|
||||||
|
|
||||||
const X_monotone_curve_2& cv = eh->curve() ;
|
const X_monotone_curve_2& cv = eh->curve() ;
|
||||||
Comparison_result res;
|
Comparison_result res;
|
||||||
|
|
||||||
X_monotone_curve_2 seg =
|
X_monotone_curve_2 seg =
|
||||||
m_traits->construct_x_monotone_curve_2_object()(np, p);
|
m_traits->construct_x_monotone_curve_2_object()(np, p);
|
||||||
|
|
@ -345,8 +317,7 @@ _walk_from_edge(Halfedge_const_handle eh,
|
||||||
if (m_traits->is_in_x_range_2_object()(seg, temp_p)) {
|
if (m_traits->is_in_x_range_2_object()(seg, temp_p)) {
|
||||||
//we must make sure that eh is not a tip on an "antena"
|
//we must make sure that eh is not a tip on an "antena"
|
||||||
if (m_traits->compare_y_at_x_2_object()(temp_p, seg) == EQUAL &&
|
if (m_traits->compare_y_at_x_2_object()(temp_p, seg) == EQUAL &&
|
||||||
eh->prev() != eh->twin())
|
eh->prev() != eh->twin()) {
|
||||||
{
|
|
||||||
// the assumption is that each edge is crossed at most twice
|
// the assumption is that each edge is crossed at most twice
|
||||||
CGAL_assertion_msg(crossed_edges.count(eh->prev()) < 2,
|
CGAL_assertion_msg(crossed_edges.count(eh->prev()) < 2,
|
||||||
"crossed_edges should contain each halfedge at most twice.");
|
"crossed_edges should contain each halfedge at most twice.");
|
||||||
|
|
@ -367,8 +338,7 @@ _walk_from_edge(Halfedge_const_handle eh,
|
||||||
if (m_traits->is_in_x_range_2_object()(seg, temp_p)) {
|
if (m_traits->is_in_x_range_2_object()(seg, temp_p)) {
|
||||||
//we must make sure that eh is not a tip on an "antena"
|
//we must make sure that eh is not a tip on an "antena"
|
||||||
if (m_traits->compare_y_at_x_2_object()(temp_p, seg) == EQUAL &&
|
if (m_traits->compare_y_at_x_2_object()(temp_p, seg) == EQUAL &&
|
||||||
eh->next() != eh->twin())
|
eh->next() != eh->twin()) {
|
||||||
{
|
|
||||||
// the assumption is that each edge is crossed at most twice
|
// the assumption is that each edge is crossed at most twice
|
||||||
CGAL_assertion_msg(crossed_edges.count(eh->next()) < 2,
|
CGAL_assertion_msg(crossed_edges.count(eh->next()) < 2,
|
||||||
"crossed_edges should contain each halfedge at most twice.");
|
"crossed_edges should contain each halfedge at most twice.");
|
||||||
|
|
@ -428,89 +398,71 @@ _walk_from_edge(Halfedge_const_handle eh,
|
||||||
return (_walk_from_vertex(vh, p, crossed_edges));
|
return (_walk_from_vertex(vh, p, crossed_edges));
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
/*! deals with an arrangement curve contained in the segment from the nearest
|
||||||
// In case the arrangement's curve contained in the segment
|
* landmark to the query point
|
||||||
// from the nearest landmark to the query point
|
*/
|
||||||
//
|
|
||||||
template <typename Arr, typename Gen>
|
template <typename Arr, typename Gen>
|
||||||
typename Arr_landmarks_point_location<Arr, Gen>::result_type
|
typename Arr_landmarks_point_location<Arr, Gen>::result_type
|
||||||
Arr_landmarks_point_location<Arr, Gen>::
|
Arr_landmarks_point_location<Arr, Gen>::
|
||||||
_deal_with_curve_contained_in_segment(Halfedge_const_handle he,
|
_deal_with_curve_contained_in_segment(Halfedge_const_handle he, bool p_is_left,
|
||||||
bool p_is_left,
|
|
||||||
const Point_2& p,
|
const Point_2& p,
|
||||||
Halfedge_set& crossed_edges) const
|
Halfedge_set& crossed_edges) const {
|
||||||
{
|
|
||||||
// in this case we want to walk from to the query point from the nearest
|
// in this case we want to walk from to the query point from the nearest
|
||||||
// vertex either the halfedge's source or target
|
// vertex either the halfedge's source or target
|
||||||
Vertex_const_handle vh;
|
auto cmp_xy = m_traits->compare_xy_2_object();
|
||||||
bool target_is_left;
|
bool target_is_left =
|
||||||
if (m_traits->compare_xy_2_object()
|
(cmp_xy(he->source()->point(), he->target()->point()) == LARGER);
|
||||||
(he->source()->point(),he->target()->point()) == LARGER)
|
|
||||||
target_is_left = true;
|
Vertex_const_handle vh;
|
||||||
else
|
|
||||||
target_is_left = false;
|
|
||||||
if (p_is_left) {
|
if (p_is_left) {
|
||||||
if (target_is_left)
|
if (target_is_left) vh = he->target();
|
||||||
vh = he->target();
|
else vh = he->source();
|
||||||
else
|
|
||||||
vh = he->source();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (target_is_left)
|
if (target_is_left) vh = he->source();
|
||||||
vh = he->source();
|
else vh = he->target();
|
||||||
else
|
|
||||||
vh = he->target();
|
|
||||||
}
|
}
|
||||||
// vh is the closest vertex among the halfedge's end points
|
// vh is the closest vertex among the halfedge's end points
|
||||||
return (_walk_from_vertex(vh, p, crossed_edges));
|
return (_walk_from_vertex(vh, p, crossed_edges));
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
/*! walks from the given face to the query point.
|
||||||
// Walk from the given face to the query point.
|
*/
|
||||||
//
|
|
||||||
template <typename Arr, typename Gen>
|
template <typename Arr, typename Gen>
|
||||||
typename Arr_landmarks_point_location<Arr, Gen>::result_type
|
typename Arr_landmarks_point_location<Arr, Gen>::result_type
|
||||||
Arr_landmarks_point_location<Arr, Gen>::
|
Arr_landmarks_point_location<Arr, Gen>::
|
||||||
_walk_from_face(Face_const_handle face,
|
_walk_from_face(Face_const_handle face, const Point_2& np, const Point_2& p,
|
||||||
const Point_2& np,
|
Halfedge_set& crossed_edges) const {
|
||||||
const Point_2& p,
|
|
||||||
Halfedge_set& crossed_edges) const
|
|
||||||
{
|
|
||||||
// Construct an x-monotone curve connecting the nearest landmark point np
|
// Construct an x-monotone curve connecting the nearest landmark point np
|
||||||
// to the query point p and check which CCB intersects this segment.
|
// to the query point p and check which CCB intersects this segment.
|
||||||
X_monotone_curve_2 seg =
|
X_monotone_curve_2 seg;
|
||||||
m_traits->construct_x_monotone_curve_2_object()(np, p);
|
Comparison_result res;
|
||||||
const bool p_is_left =
|
std::tie(seg, res) = construct_segment(np, p, *m_traits, 0);
|
||||||
(m_traits->compare_xy_2_object()(np, p) == LARGER);
|
const bool p_is_left = (res == LARGER);
|
||||||
|
|
||||||
Inner_ccb_const_iterator inner_ccb_iter;
|
const Halfedge_const_handle invalid_he;
|
||||||
Outer_ccb_const_iterator outer_ccb_iter;
|
const Vertex_const_handle invalid_vertex;
|
||||||
const Halfedge_const_handle invalid_he;
|
bool cv_is_contained_in_seg;
|
||||||
Halfedge_const_handle he;
|
|
||||||
Face_const_handle new_face;
|
|
||||||
bool is_on_edge;
|
|
||||||
bool is_target;
|
|
||||||
bool cv_is_contained_in_seg;
|
|
||||||
Vertex_const_handle new_vertex;
|
|
||||||
const Vertex_const_handle invalid_vertex;
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
// Check whether p lies inside the current face (including its holes):
|
// Check whether p lies inside the current face (including its holes):
|
||||||
if (p_arr->topology_traits()->is_in_face(&(*face), p, nullptr))
|
if (p_arr->topology_traits()->is_in_face(&(*face), p, nullptr)) {
|
||||||
{
|
|
||||||
// We know that p is located inside the current face, and we check
|
// We know that p is located inside the current face, and we check
|
||||||
// whether it lies inside one of its holes (or on the boundary of
|
// whether it lies inside one of its holes (or on the boundary of
|
||||||
// its holes).
|
// its holes).
|
||||||
cv_is_contained_in_seg = false;
|
cv_is_contained_in_seg = false;
|
||||||
new_face = face;
|
auto new_face = face;
|
||||||
for (inner_ccb_iter = face->inner_ccbs_begin();
|
// Do not use 'auto' to define the iterator, as MSVC2017 complains.
|
||||||
inner_ccb_iter != face->inner_ccbs_end(); ++inner_ccb_iter)
|
for (Inner_ccb_const_iterator inner_ccb_iter = face->inner_ccbs_begin();
|
||||||
{
|
inner_ccb_iter != face->inner_ccbs_end(); ++inner_ccb_iter) {
|
||||||
he = _intersection_with_ccb(*inner_ccb_iter,seg, p, p_is_left,
|
bool is_on_edge;
|
||||||
crossed_edges,is_on_edge, is_target,
|
bool is_target;
|
||||||
cv_is_contained_in_seg,new_vertex);
|
Vertex_const_handle new_vertex;
|
||||||
if (he == invalid_he && cv_is_contained_in_seg)
|
Halfedge_const_handle he =
|
||||||
{
|
_intersection_with_ccb(*inner_ccb_iter,seg, p, p_is_left,
|
||||||
|
crossed_edges, is_on_edge, is_target,
|
||||||
|
cv_is_contained_in_seg, new_vertex);
|
||||||
|
if (he == invalid_he && cv_is_contained_in_seg) {
|
||||||
return _deal_with_curve_contained_in_segment(*inner_ccb_iter,
|
return _deal_with_curve_contained_in_segment(*inner_ccb_iter,
|
||||||
p_is_left,p,
|
p_is_left,p,
|
||||||
crossed_edges);
|
crossed_edges);
|
||||||
|
|
@ -535,8 +487,7 @@ _walk_from_face(Face_const_handle face,
|
||||||
|
|
||||||
// Check if we found a new face (hole) containing p. If not, the current
|
// Check if we found a new face (hole) containing p. If not, the current
|
||||||
// face contains p.
|
// face contains p.
|
||||||
if (new_face == face)
|
if (new_face == face) return make_result(face);
|
||||||
return make_result(face);
|
|
||||||
|
|
||||||
// Continue from the new face (hole).
|
// Continue from the new face (hole).
|
||||||
face = new_face;
|
face = new_face;
|
||||||
|
|
@ -544,13 +495,17 @@ _walk_from_face(Face_const_handle face,
|
||||||
else {
|
else {
|
||||||
// We know that p is not located inside the current face. We therefore
|
// We know that p is not located inside the current face. We therefore
|
||||||
// look for an edge on its outer boundary that intersects seg.
|
// look for an edge on its outer boundary that intersects seg.
|
||||||
new_face = face;
|
auto new_face = face;
|
||||||
for (outer_ccb_iter = face->outer_ccbs_begin();
|
// Do not use 'auto' to define the iterator, as MSVC2017 complains.
|
||||||
outer_ccb_iter != face->outer_ccbs_end(); ++outer_ccb_iter)
|
for (Inner_ccb_const_iterator outer_ccb_iter = face->outer_ccbs_begin();
|
||||||
{
|
outer_ccb_iter != face->outer_ccbs_end(); ++outer_ccb_iter) {
|
||||||
he = _intersection_with_ccb(*outer_ccb_iter,seg, p, p_is_left,
|
bool is_on_edge;
|
||||||
crossed_edges,is_on_edge, is_target,
|
bool is_target;
|
||||||
cv_is_contained_in_seg,new_vertex);
|
Vertex_const_handle new_vertex;
|
||||||
|
Halfedge_const_handle he =
|
||||||
|
_intersection_with_ccb(*outer_ccb_iter,seg, p, p_is_left,
|
||||||
|
crossed_edges, is_on_edge, is_target,
|
||||||
|
cv_is_contained_in_seg, new_vertex);
|
||||||
if (he == invalid_he && cv_is_contained_in_seg) {
|
if (he == invalid_he && cv_is_contained_in_seg) {
|
||||||
return _deal_with_curve_contained_in_segment(*outer_ccb_iter,
|
return _deal_with_curve_contained_in_segment(*outer_ccb_iter,
|
||||||
p_is_left,p,
|
p_is_left,p,
|
||||||
|
|
@ -585,10 +540,9 @@ _walk_from_face(Face_const_handle face,
|
||||||
return default_result();
|
return default_result();
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
/*! finds a halfedge on the given CCB that intersects the given x-monotone
|
||||||
// Find a halfedge on the given CCB that intersects the given x-monotone
|
* curve, connecting the current landmark to the query point.
|
||||||
// curve, connecting the current landmark to the query point.
|
*/
|
||||||
//
|
|
||||||
template <typename Arr, typename Gen>
|
template <typename Arr, typename Gen>
|
||||||
typename Arr_landmarks_point_location<Arr, Gen>::Halfedge_const_handle
|
typename Arr_landmarks_point_location<Arr, Gen>::Halfedge_const_handle
|
||||||
Arr_landmarks_point_location<Arr, Gen>::
|
Arr_landmarks_point_location<Arr, Gen>::
|
||||||
|
|
@ -598,17 +552,15 @@ _intersection_with_ccb(Ccb_halfedge_const_circulator circ,
|
||||||
Halfedge_set& crossed_edges,
|
Halfedge_set& crossed_edges,
|
||||||
bool& is_on_edge, bool& is_target,
|
bool& is_on_edge, bool& is_target,
|
||||||
bool& cv_is_contained_in_seg,
|
bool& cv_is_contained_in_seg,
|
||||||
Vertex_const_handle & new_vertex) const
|
Vertex_const_handle& new_vertex) const {
|
||||||
{
|
|
||||||
is_on_edge = false;
|
is_on_edge = false;
|
||||||
is_target = false;
|
is_target = false;
|
||||||
|
|
||||||
// Go over the CCB.
|
// Go over the CCB.
|
||||||
typename Traits_adaptor_2::Is_in_x_range_2 is_in_x_range =
|
auto is_in_x_range = m_traits->is_in_x_range_2_object();
|
||||||
m_traits->is_in_x_range_2_object();
|
Ccb_halfedge_const_circulator curr = circ , temp_circ;
|
||||||
Ccb_halfedge_const_circulator curr = circ , temp_circ;
|
const Halfedge_const_handle invalid_he;
|
||||||
const Halfedge_const_handle invalid_he;
|
Halfedge_const_handle he;
|
||||||
Halfedge_const_handle he;
|
|
||||||
bool cv_and_seg_overlap;
|
bool cv_and_seg_overlap;
|
||||||
do {
|
do {
|
||||||
he = curr;
|
he = curr;
|
||||||
|
|
@ -646,33 +598,28 @@ _intersection_with_ccb(Ccb_halfedge_const_circulator circ,
|
||||||
// Check whether the current curve intersects seg an odd number of times.
|
// Check whether the current curve intersects seg an odd number of times.
|
||||||
if (_have_odd_intersections(he->curve(), seg, p_is_left,
|
if (_have_odd_intersections(he->curve(), seg, p_is_left,
|
||||||
is_on_edge,cv_and_seg_overlap,
|
is_on_edge,cv_and_seg_overlap,
|
||||||
cv_is_contained_in_seg)
|
cv_is_contained_in_seg) &&
|
||||||
&& !(cv_and_seg_overlap || cv_is_contained_in_seg))
|
! (cv_and_seg_overlap || cv_is_contained_in_seg)) {
|
||||||
{
|
|
||||||
// Check if the query point lies on the current edge, or whether
|
// Check if the query point lies on the current edge, or whether
|
||||||
// it lies in its interior.
|
// it lies in its interior.
|
||||||
if (is_on_edge)
|
if (is_on_edge)
|
||||||
return _in_case_p_is_on_edge(he,crossed_edges,p,is_target);
|
return _in_case_p_is_on_edge(he,crossed_edges,p,is_target);
|
||||||
|
|
||||||
if ((!curr->target()->is_at_open_boundary()) &&
|
if ((!curr->target()->is_at_open_boundary()) &&
|
||||||
is_in_x_range(seg, curr->target()->point()))
|
is_in_x_range(seg, curr->target()->point())) {
|
||||||
{
|
|
||||||
// if the target point of curr is located on seg
|
// if the target point of curr is located on seg
|
||||||
// we should walk from it to the query point
|
// we should walk from it to the query point
|
||||||
if (m_traits->compare_y_at_x_2_object()
|
if (m_traits->compare_y_at_x_2_object()
|
||||||
(curr->target()->point(), seg) == EQUAL)
|
(curr->target()->point(), seg) == EQUAL) {
|
||||||
{
|
|
||||||
new_vertex = curr->target();
|
new_vertex = curr->target();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((!curr->source()->is_at_open_boundary()) &&
|
else if ((!curr->source()->is_at_open_boundary()) &&
|
||||||
is_in_x_range(seg , curr->source()->point() ))
|
is_in_x_range(seg , curr->source()->point())) {
|
||||||
{
|
|
||||||
// if the source point of curr is located on seg
|
// if the source point of curr is located on seg
|
||||||
// we should walk from it to the query point
|
// we should walk from it to the query point
|
||||||
if (m_traits->compare_y_at_x_2_object()
|
if (m_traits->compare_y_at_x_2_object()
|
||||||
(curr->source()->point() , seg) == EQUAL)
|
(curr->source()->point(), seg) == EQUAL) {
|
||||||
{
|
|
||||||
new_vertex = curr->source();
|
new_vertex = curr->source();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -718,8 +665,7 @@ Arr_landmarks_point_location<Arr, Gen>::
|
||||||
_in_case_p_is_on_edge(Halfedge_const_handle he,
|
_in_case_p_is_on_edge(Halfedge_const_handle he,
|
||||||
Halfedge_set& crossed_edges,
|
Halfedge_set& crossed_edges,
|
||||||
const Point_2 & p,
|
const Point_2 & p,
|
||||||
bool & is_target) const
|
bool & is_target) const {
|
||||||
{
|
|
||||||
// cv and seg overlap, obviously we crossed it
|
// cv and seg overlap, obviously we crossed it
|
||||||
// the assumption is that each edge is crossed at most twice
|
// the assumption is that each edge is crossed at most twice
|
||||||
CGAL_assertion_msg(crossed_edges.count(he) < 2,
|
CGAL_assertion_msg(crossed_edges.count(he) < 2,
|
||||||
|
|
@ -728,14 +674,12 @@ _in_case_p_is_on_edge(Halfedge_const_handle he,
|
||||||
crossed_edges.insert(he->twin());
|
crossed_edges.insert(he->twin());
|
||||||
// Check if p equals one of the edge end-vertices.
|
// Check if p equals one of the edge end-vertices.
|
||||||
if (! he->target()->is_at_open_boundary() &&
|
if (! he->target()->is_at_open_boundary() &&
|
||||||
m_traits->compare_xy_2_object()(he->target()->point(), p) == EQUAL)
|
m_traits->equal_2_object()(he->target()->point(), p)) {
|
||||||
{
|
|
||||||
// p is the target of the current halfedge.
|
// p is the target of the current halfedge.
|
||||||
is_target = true;
|
is_target = true;
|
||||||
}
|
}
|
||||||
else if (! he->source()->is_at_open_boundary() &&
|
else if (! he->source()->is_at_open_boundary() &&
|
||||||
m_traits->compare_xy_2_object()(he->source()->point(), p) == EQUAL)
|
m_traits->equal_2_object()(he->source()->point(), p)) {
|
||||||
{
|
|
||||||
// Take the twin halfedge, so p equals its target.
|
// Take the twin halfedge, so p equals its target.
|
||||||
he = he->twin();
|
he = he->twin();
|
||||||
is_target = true;
|
is_target = true;
|
||||||
|
|
@ -744,21 +688,17 @@ _in_case_p_is_on_edge(Halfedge_const_handle he,
|
||||||
return he;
|
return he;
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
/*! checks whether the given curve intersects a simple segment, which connects
|
||||||
// Check whether the given curve intersects a simple segment, which connects
|
* the current landmark to the query point, an odd number of times.
|
||||||
// the current landmark to the query point, an odd number of times.
|
*/
|
||||||
//
|
|
||||||
template <typename Arr, typename Gen>
|
template <typename Arr, typename Gen>
|
||||||
bool Arr_landmarks_point_location<Arr, Gen>::
|
bool Arr_landmarks_point_location<Arr, Gen>::
|
||||||
_have_odd_intersections(const X_monotone_curve_2& cv,
|
_have_odd_intersections(const X_monotone_curve_2& cv,
|
||||||
const X_monotone_curve_2& seg,
|
const X_monotone_curve_2& seg,
|
||||||
bool p_is_left,
|
bool p_is_left, bool& p_on_curve,
|
||||||
bool& p_on_curve,
|
|
||||||
bool& cv_and_seg_overlap,
|
bool& cv_and_seg_overlap,
|
||||||
bool& cv_is_contained_in_seg) const
|
bool& cv_is_contained_in_seg) const {
|
||||||
{
|
auto is_in_x_range = m_traits->is_in_x_range_2_object();
|
||||||
typename Traits_adaptor_2::Is_in_x_range_2 is_in_x_range =
|
|
||||||
m_traits->is_in_x_range_2_object();
|
|
||||||
p_on_curve = false;
|
p_on_curve = false;
|
||||||
cv_and_seg_overlap = false;
|
cv_and_seg_overlap = false;
|
||||||
cv_is_contained_in_seg = false;
|
cv_is_contained_in_seg = false;
|
||||||
|
|
@ -776,9 +716,9 @@ _have_odd_intersections(const X_monotone_curve_2& cv,
|
||||||
cv_right = m_traits->construct_max_vertex_2_object()(cv);
|
cv_right = m_traits->construct_max_vertex_2_object()(cv);
|
||||||
if (cv_left_is_closed && cv_right_is_closed) {
|
if (cv_left_is_closed && cv_right_is_closed) {
|
||||||
if (is_in_x_range(seg,cv_left) && is_in_x_range(seg,cv_right)) {
|
if (is_in_x_range(seg,cv_left) && is_in_x_range(seg,cv_right)) {
|
||||||
if ((m_traits->compare_y_at_x_2_object()(cv_left, seg) == EQUAL) &&
|
auto cmp_y_at_x = m_traits->compare_y_at_x_2_object();
|
||||||
(m_traits->compare_y_at_x_2_object()(cv_right, seg) == EQUAL))
|
if ((cmp_y_at_x(cv_left, seg) == EQUAL) &&
|
||||||
{
|
(cmp_y_at_x(cv_right, seg) == EQUAL)) {
|
||||||
// cv is contained in seg non of the answer true or false is correct
|
// cv is contained in seg non of the answer true or false is correct
|
||||||
// we must set a special flag to distinguish this case
|
// we must set a special flag to distinguish this case
|
||||||
cv_is_contained_in_seg = true;
|
cv_is_contained_in_seg = true;
|
||||||
|
|
@ -791,22 +731,17 @@ _have_odd_intersections(const X_monotone_curve_2& cv,
|
||||||
if (cv_left_is_closed) {
|
if (cv_left_is_closed) {
|
||||||
// Check if the left endpoint of cv has the same x-coordinate as the
|
// Check if the left endpoint of cv has the same x-coordinate as the
|
||||||
// right endpoint of seg.
|
// right endpoint of seg.
|
||||||
if (m_traits->compare_x_2_object()
|
auto min_p = m_traits->construct_min_vertex_2_object()(cv);
|
||||||
(m_traits->construct_min_vertex_2_object()(cv), seg_right) == EQUAL)
|
if (equal_x_2(min_p, seg_right, Left_or_right_sides_category())) {
|
||||||
{
|
if (! p_is_left && m_traits->equal_2_object()(min_p, seg_right)) {
|
||||||
if (! p_is_left &&
|
|
||||||
m_traits->compare_xy_2_object()
|
|
||||||
(m_traits->construct_min_vertex_2_object()(cv), seg_right) == EQUAL)
|
|
||||||
{
|
|
||||||
p_on_curve = true;
|
p_on_curve = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (m_traits->is_vertical_2_object()(seg)) {
|
else if (m_traits->is_vertical_2_object()(seg)) {
|
||||||
|
auto cmp_y_at_x = m_traits->compare_y_at_x_2_object();
|
||||||
// Special treatment for vertical segments.
|
// Special treatment for vertical segments.
|
||||||
Comparison_result res_l =
|
Comparison_result res_l = cmp_y_at_x(seg_left, cv);
|
||||||
m_traits->compare_y_at_x_2_object()(seg_left, cv);
|
Comparison_result res_r = cmp_y_at_x(seg_right, cv);
|
||||||
Comparison_result res_r =
|
|
||||||
m_traits->compare_y_at_x_2_object()(seg_right, cv);
|
|
||||||
if ((p_is_left && res_l == EQUAL) || (! p_is_left && res_r == EQUAL)) {
|
if ((p_is_left && res_l == EQUAL) || (! p_is_left && res_r == EQUAL)) {
|
||||||
p_on_curve = true;
|
p_on_curve = true;
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -819,23 +754,17 @@ _have_odd_intersections(const X_monotone_curve_2& cv,
|
||||||
if (cv_right_is_closed) {
|
if (cv_right_is_closed) {
|
||||||
// Check if the right endpoint of cv has the same x-coordinate as the
|
// Check if the right endpoint of cv has the same x-coordinate as the
|
||||||
// left endpoint of seg.
|
// left endpoint of seg.
|
||||||
if (m_traits->compare_x_2_object()
|
auto max_p = m_traits->construct_max_vertex_2_object()(cv);
|
||||||
(m_traits->construct_max_vertex_2_object()(cv), seg_left) == EQUAL)
|
if (equal_x_2(max_p, seg_left, Left_or_right_sides_category())) {
|
||||||
{
|
if (p_is_left && m_traits->equal_2_object()(max_p, seg_left)) {
|
||||||
if (p_is_left &&
|
|
||||||
m_traits->compare_xy_2_object()
|
|
||||||
(m_traits->construct_max_vertex_2_object()(cv), seg_left) == EQUAL)
|
|
||||||
{
|
|
||||||
p_on_curve = true;
|
p_on_curve = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (m_traits->is_vertical_2_object()(seg)) {
|
else if (m_traits->is_vertical_2_object()(seg)) {
|
||||||
// Special treatment for vertical segments.
|
// Special treatment for vertical segments.
|
||||||
Comparison_result res_l =
|
auto cmp_y_at_x = m_traits->compare_y_at_x_2_object();
|
||||||
m_traits->compare_y_at_x_2_object()(seg_left, cv);
|
Comparison_result res_l = cmp_y_at_x(seg_left, cv);
|
||||||
Comparison_result res_r =
|
Comparison_result res_r = cmp_y_at_x(seg_right, cv);
|
||||||
m_traits->compare_y_at_x_2_object()(seg_right, cv);
|
|
||||||
|
|
||||||
if ((p_is_left && res_l == EQUAL) || (! p_is_left && res_r == EQUAL)) {
|
if ((p_is_left && res_l == EQUAL) || (! p_is_left && res_r == EQUAL)) {
|
||||||
p_on_curve = true;
|
p_on_curve = true;
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -846,8 +775,8 @@ _have_odd_intersections(const X_monotone_curve_2& cv,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Compare the two left ends of cv and seg.
|
// Compare the two left ends of cv and seg.
|
||||||
Comparison_result left_res;
|
Comparison_result left_res;
|
||||||
const Arr_parameter_space bx_l =
|
const Arr_parameter_space bx_l =
|
||||||
m_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
|
m_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
|
||||||
if (bx_l == ARR_LEFT_BOUNDARY) {
|
if (bx_l == ARR_LEFT_BOUNDARY) {
|
||||||
// The left end of cv lies to the left of seg_left:
|
// The left end of cv lies to the left of seg_left:
|
||||||
|
|
@ -858,11 +787,11 @@ _have_odd_intersections(const X_monotone_curve_2& cv,
|
||||||
// The left end of cv lies to the right of seg_left.
|
// The left end of cv lies to the right of seg_left.
|
||||||
// Compare the left endpoint of cv to seg.
|
// Compare the left endpoint of cv to seg.
|
||||||
left_res = m_traits->compare_y_at_x_2_object()
|
left_res = m_traits->compare_y_at_x_2_object()
|
||||||
(m_traits->construct_min_vertex_2_object()(cv), seg);
|
(m_traits->construct_min_vertex_2_object()(cv), seg);
|
||||||
left_res = CGAL::opposite(left_res);
|
left_res = CGAL::opposite(left_res);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const Arr_parameter_space by_l =
|
const Arr_parameter_space by_l =
|
||||||
m_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
|
m_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
|
||||||
if (by_l == ARR_BOTTOM_BOUNDARY)
|
if (by_l == ARR_BOTTOM_BOUNDARY)
|
||||||
// The left end of cv is at y = -oo, so cv obviously lies above it.
|
// The left end of cv is at y = -oo, so cv obviously lies above it.
|
||||||
|
|
@ -876,8 +805,7 @@ _have_odd_intersections(const X_monotone_curve_2& cv,
|
||||||
Comparison_result res = m_traits->compare_xy_2_object()(cv_left, seg_left);
|
Comparison_result res = m_traits->compare_xy_2_object()(cv_left, seg_left);
|
||||||
if (res != LARGER) {
|
if (res != LARGER) {
|
||||||
left_res = m_traits->compare_y_at_x_2_object()(seg_left, cv);
|
left_res = m_traits->compare_y_at_x_2_object()(seg_left, cv);
|
||||||
if (p_is_left && left_res == EQUAL)
|
if (p_is_left && left_res == EQUAL) {
|
||||||
{
|
|
||||||
// In this case the query point p, which is the left endpoint of seg,
|
// In this case the query point p, which is the left endpoint of seg,
|
||||||
// lies on cv.
|
// lies on cv.
|
||||||
p_on_curve = true;
|
p_on_curve = true;
|
||||||
|
|
@ -904,8 +832,7 @@ _have_odd_intersections(const X_monotone_curve_2& cv,
|
||||||
// we must set a special flag to distinguish this case
|
// we must set a special flag to distinguish this case
|
||||||
if (is_in_x_range(cv,( p_is_left ? seg_left : seg_right)))
|
if (is_in_x_range(cv,( p_is_left ? seg_left : seg_right)))
|
||||||
if (m_traits->compare_y_at_x_2_object()
|
if (m_traits->compare_y_at_x_2_object()
|
||||||
((p_is_left ? seg_left : seg_right), cv) == EQUAL)
|
((p_is_left ? seg_left : seg_right), cv) == EQUAL) {
|
||||||
{
|
|
||||||
p_on_curve = true;
|
p_on_curve = true;
|
||||||
}
|
}
|
||||||
cv_and_seg_overlap = true;
|
cv_and_seg_overlap = true;
|
||||||
|
|
@ -913,8 +840,8 @@ _have_odd_intersections(const X_monotone_curve_2& cv,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Compare the two right ends of cv and seg.
|
// Compare the two right ends of cv and seg.
|
||||||
Comparison_result right_res;
|
Comparison_result right_res;
|
||||||
const Arr_parameter_space bx_r =
|
const Arr_parameter_space bx_r =
|
||||||
m_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END);
|
m_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END);
|
||||||
if (bx_r == ARR_RIGHT_BOUNDARY) {
|
if (bx_r == ARR_RIGHT_BOUNDARY) {
|
||||||
// The right end of cv lies to the right of seg_right:
|
// The right end of cv lies to the right of seg_right:
|
||||||
|
|
@ -925,11 +852,11 @@ _have_odd_intersections(const X_monotone_curve_2& cv,
|
||||||
// The right end of cv lies to the left of seg_right.
|
// The right end of cv lies to the left of seg_right.
|
||||||
// Compare the right endpoint of cv to seg.
|
// Compare the right endpoint of cv to seg.
|
||||||
right_res = m_traits->compare_y_at_x_2_object()
|
right_res = m_traits->compare_y_at_x_2_object()
|
||||||
(m_traits->construct_max_vertex_2_object()(cv), seg);
|
(m_traits->construct_max_vertex_2_object()(cv), seg);
|
||||||
right_res = CGAL::opposite(right_res);
|
right_res = CGAL::opposite(right_res);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const Arr_parameter_space by_r =
|
const Arr_parameter_space by_r =
|
||||||
m_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END);
|
m_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END);
|
||||||
if (by_r == ARR_BOTTOM_BOUNDARY)
|
if (by_r == ARR_BOTTOM_BOUNDARY)
|
||||||
// The right end of cv is at y = -oo, so cv obviously lies above it.
|
// The right end of cv is at y = -oo, so cv obviously lies above it.
|
||||||
|
|
@ -972,8 +899,7 @@ _have_odd_intersections(const X_monotone_curve_2& cv,
|
||||||
// we must set a special flag to distinguish this case
|
// we must set a special flag to distinguish this case
|
||||||
if (is_in_x_range(cv, (p_is_left ? seg_left : seg_right)))
|
if (is_in_x_range(cv, (p_is_left ? seg_left : seg_right)))
|
||||||
if (m_traits->compare_y_at_x_2_object()
|
if (m_traits->compare_y_at_x_2_object()
|
||||||
((p_is_left ? seg_left : seg_right), cv) == EQUAL)
|
((p_is_left ? seg_left : seg_right), cv) == EQUAL) {
|
||||||
{
|
|
||||||
p_on_curve = true;
|
p_on_curve = true;
|
||||||
}
|
}
|
||||||
cv_and_seg_overlap = true;
|
cv_and_seg_overlap = true;
|
||||||
|
|
@ -986,6 +912,6 @@ _have_odd_intersections(const X_monotone_curve_2& cv,
|
||||||
return (left_res != right_res);
|
return (left_res != right_res);
|
||||||
}
|
}
|
||||||
|
|
||||||
} //namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -76,9 +76,9 @@ public:
|
||||||
NUMBER_OF_OPERATIONS
|
NUMBER_OF_OPERATIONS
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
|
||||||
using Base = BaseTraits;
|
using Base = BaseTraits;
|
||||||
|
|
||||||
|
private:
|
||||||
//! A set of bits that indicate whether operations should be traced.
|
//! A set of bits that indicate whether operations should be traced.
|
||||||
unsigned long long m_flags;
|
unsigned long long m_flags;
|
||||||
|
|
||||||
|
|
@ -833,9 +833,16 @@ public:
|
||||||
std::cout << "approximate_2" << std::endl
|
std::cout << "approximate_2" << std::endl
|
||||||
<< " xcv: " << xcv << ", error: " << error
|
<< " xcv: " << xcv << ", error: " << error
|
||||||
<< ", l2r: " << l2r << std::endl;
|
<< ", l2r: " << l2r << std::endl;
|
||||||
auto res = m_object(xcv, error, oi, l2r);
|
std::list<Approximate_point_2> container;
|
||||||
std::cout << " result: " << res << std::endl;
|
m_object(xcv, error, std::back_inserter(container), l2r);
|
||||||
return res;
|
if (container.empty()) return oi;
|
||||||
|
|
||||||
|
std::size_t i = 0;
|
||||||
|
for (const auto& point : container) {
|
||||||
|
std::cout << " result[" << i++ << "]: " << point << std::endl;
|
||||||
|
*oi++ = point;
|
||||||
|
}
|
||||||
|
return oi;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -8,48 +8,27 @@
|
||||||
Before submitting a change for integration into \cgal it is good style
|
Before submitting a change for integration into \cgal it is good style
|
||||||
to run the testsuite of the modified package and all packages that
|
to run the testsuite of the modified package and all packages that
|
||||||
could be impacted.
|
could be impacted.
|
||||||
Here is what you need:
|
|
||||||
|
|
||||||
- A shell such as bash (install Cygwin, when you are on Windows)
|
All examples and tests in CGAL are now compatible with `ctest`. So to test all examples or all tests
|
||||||
- <i>optional:</i> put `Scripts/scripts` and `Scripts/developer_scripts` on your `PATH` environment variable or
|
of a package, you simply need to configure with `cmake` the examples/tests of the package you want to
|
||||||
Alternatively, you can call the scripts mentioned below using their full path or a relative path
|
test, adding the option `CGAL_ENABLE_TESTING` and setting its value to `ON`. In order to report more
|
||||||
- define the environment variable `CGAL_DIR`. It should be the directory where you built CGAL.
|
warnings, it is recommended to also add the option `CGAL_DEV_MODE` and to set it to `ON`.
|
||||||
- <i>optional:</i> define the environment variables for Boost, GMP, and any optional third party lib, e.g. Eigen.
|
Then a call to the command `ctest` will compile and run the tests/examples.
|
||||||
- <i>On Windows:</i> define the environment variable `MAKE_CMD` (put the line `export MAKE_CMD=nmake` in your `$HOME/.bashrc` for VC++)
|
|
||||||
- <i>On Windows:</i> define the environment variable `CMAKE_GENERATOR` (put the line <tt>export CMAKE_GENERATOR='-GNMake Makefiles'</tt> in your `$HOME/.bashrc` for VC++)
|
|
||||||
- go in the directory you want to test
|
|
||||||
- Run `cgal_test_with_cmake` in the `test` and `examples` directories of the package. This should run CMake, compile and run, and you can see what happened in the generated file `error.txt`.
|
|
||||||
|
|
||||||
\section fullTestsuite Running the Whole Testsuite
|
\section fullTestsuite Running the Whole Testsuite
|
||||||
We describe here how to proceed to the testing of a full copy of `master` or any branch by creating a <i>flat release</i>
|
We describe here how to proceed to the testing of a full copy of `master` or any branch by creating a <i>flat release</i>
|
||||||
(that is having a layout similar to a release rather than a branch layout with header files gathered by packages).
|
(that is having a layout similar to a release rather than a branch layout with header files gathered by packages).
|
||||||
|
|
||||||
The creation of the flat release is done using the script `create_internal_release` located in the directory `Scripts/developer_scripts`.
|
The creation of the flat release is done using the `cmake` script `cgal_create_release_with_cmake.cmake` located in the directory `Scripts/developer_scripts`.
|
||||||
Running the script with no argument will give the complete usage of this script. We only describe one way of using it.
|
You can run it using the option `-P` of `cmake`: `cmake -P cgal_create_release_with_cmake.cmake`.
|
||||||
|
For an up-to-date documentation of available options, check the comments at the beginning of the script.
|
||||||
|
|
||||||
The prerequisite is to have a checkout of the branch we want to test.
|
Then for testing all examples, tests, and demos, in a build directory call `cmake` on the created release
|
||||||
In the example, it will be located in <code>~/Git/cgal/</code>.
|
(the path is given by the script if not manually specified)
|
||||||
|
|
||||||
First one goes into a directory where the flat release will be created:
|
|
||||||
\code
|
|
||||||
> cd /tmp
|
|
||||||
\endcode
|
|
||||||
|
|
||||||
Then the script `create_internal_release` is ran:
|
|
||||||
\code
|
|
||||||
> create_internal_release -r CGAL-I-FOO -a ~/Git/cgal/
|
|
||||||
\endcode
|
|
||||||
|
|
||||||
The directory `CGAL-I-FOO` now contains the flat release of the branch in `~/Git/cgal`.
|
|
||||||
Then you need to compile this flat release and set `CGAL_DIR` accordingly as explained in the installation manual.
|
|
||||||
|
|
||||||
To run the test-suite simply do:
|
|
||||||
\code
|
|
||||||
> cd CGAL-I-FOO/test
|
|
||||||
> ./run_testsuite_with_cmake
|
|
||||||
\endcode
|
|
||||||
and wait for the results to be written in the file `error.txt`.
|
|
||||||
|
|
||||||
|
`cmake -DBUILD_TESTING=ON -DWITH_examples=ON -DWITH_tests=ON -DWITH_demos=ON ../CGAL-X.XX/`
|
||||||
|
|
||||||
|
Finally, a call to the command `ctest` will compile and run the tests, examples, and demos.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ h2 {
|
||||||
font-family: Arial, Helvetica;
|
font-family: Arial, Helvetica;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 14px;
|
height: 22px;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-color: #FF0000;
|
background-color: #FF0000;
|
||||||
|
|
@ -67,7 +67,7 @@ h2 {
|
||||||
font-family: Arial, Helvetica;
|
font-family: Arial, Helvetica;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 14px;
|
height: 22px;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-color: #0000FF;
|
background-color: #0000FF;
|
||||||
|
|
@ -82,7 +82,7 @@ h2 {
|
||||||
font-family: Arial, Helvetica;
|
font-family: Arial, Helvetica;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 14px;
|
height: 22px;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-color: #67489A;
|
background-color: #67489A;
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ h2 {
|
||||||
font-family: Arial, Helvetica;
|
font-family: Arial, Helvetica;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 14px;
|
height: 22px;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-color: #FF0000;
|
background-color: #FF0000;
|
||||||
|
|
@ -67,7 +67,7 @@ h2 {
|
||||||
font-family: Arial, Helvetica;
|
font-family: Arial, Helvetica;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 14px;
|
height: 22px;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-color: #0000FF;
|
background-color: #0000FF;
|
||||||
|
|
@ -82,7 +82,7 @@ h2 {
|
||||||
font-family: Arial, Helvetica;
|
font-family: Arial, Helvetica;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 14px;
|
height: 22px;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-color: #67489A;
|
background-color: #67489A;
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
### [2D Arrangements](https://doc.cgal.org/6.1/Manual/packages.html#PkgArrangementOnSurface2)
|
### [2D Arrangements](https://doc.cgal.org/6.1/Manual/packages.html#PkgArrangementOnSurface2)
|
||||||
|
|
||||||
- Introduces two traits decorators, namely `Arr_tracing_traits_2` and `Arr_counting_traits_2`, which can be used to extract debugging and informative metadata about the traits in use while a program is being executed.
|
- Introduces two traits decorators, namely `Arr_tracing_traits_2` and `Arr_counting_traits_2`, which can be used to extract debugging and informative metadata about the traits in use while a program is being executed.
|
||||||
|
- Fixed the Landmark point-location strategy so that it can be applied to arrangements on a sphere.
|
||||||
|
|
||||||
## [Release 6.0.1](https://github.com/CGAL/cgal/releases/tag/v6.0.1)
|
## [Release 6.0.1](https://github.com/CGAL/cgal/releases/tag/v6.0.1)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
|
|
||||||
# This is a script for the CGAL test suite. Such a script must obey
|
|
||||||
# the following rules:
|
|
||||||
#
|
|
||||||
# - the name of the script is cgal_test_with_cmake
|
|
||||||
# - for every target two one line messages are written to the file 'error.txt'
|
|
||||||
# the first one indicates if the compilation was successful
|
|
||||||
# the second one indicates if the execution was successful
|
|
||||||
# if one of the two was not successful, the line should start with 'ERROR:'
|
|
||||||
# - running the script should not require any user interaction
|
|
||||||
# - the script should clean up object files and executables
|
|
||||||
|
|
||||||
ERRORFILE=error.txt
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
# remove the previous error file
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
|
|
||||||
rm -f ../$ERRORFILE
|
|
||||||
touch ../$ERRORFILE
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
# compile_and_run <target>
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
echo "Configuring... "
|
|
||||||
mkdir build_dir
|
|
||||||
cd build_dir
|
|
||||||
if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} -DRUNNING_CGAL_AUTO_TEST=TRUE \
|
|
||||||
-DCGAL_DIR="$CGAL_RELEASE_DIR" -DCGAL_ENABLE_TESTING=ON -DWITH_tests=ON \
|
|
||||||
..' ; then
|
|
||||||
|
|
||||||
echo " successful configuration" >> ../$ERRORFILE
|
|
||||||
else
|
|
||||||
echo " ERROR: configuration" >> ../$ERRORFILE
|
|
||||||
fi
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
# configure, compile and run the tests
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
|
|
||||||
cd build_dir
|
|
||||||
ctest -L Installation_Tests -VV |tee res.txt
|
|
||||||
SUCCES="y"
|
|
||||||
FAILED=$(cat res.txt|grep "\*\*\*Failed")
|
|
||||||
if [ -z "$FAILED" ]; then
|
|
||||||
echo " successful run of Installation tests" >> ../$ERRORFILE
|
|
||||||
else
|
|
||||||
echo " ERROR: run of Installation tests" >> ../$ERRORFILE
|
|
||||||
SUCCES=""
|
|
||||||
fi
|
|
||||||
cat ../$ERRORFILE
|
|
||||||
|
|
@ -1,236 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
|
|
||||||
# This is a script for the CGAL test suite. Such a script must obey
|
|
||||||
# the following rules:
|
|
||||||
#
|
|
||||||
# - the name of the script is cgal_test_with_cmake
|
|
||||||
# - for every target two one line messages are written to the file 'error.txt'
|
|
||||||
# the first one indicates if the compilation was successful
|
|
||||||
# the second one indicates if the execution was successful
|
|
||||||
# if one of the two was not successful, the line should start with 'ERROR:'
|
|
||||||
# - running the script should not require any user interaction
|
|
||||||
# - the script should clean up object files and executables
|
|
||||||
|
|
||||||
ERRORFILE=error.txt
|
|
||||||
DO_RUN=
|
|
||||||
if [ -z "${MAKE_CMD}" ]; then
|
|
||||||
MAKE_CMD=make
|
|
||||||
fi
|
|
||||||
NEED_CLEAN=
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
# configure
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
|
|
||||||
configure()
|
|
||||||
{
|
|
||||||
echo "Configuring... "
|
|
||||||
|
|
||||||
if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} -DRUNNING_CGAL_AUTO_TEST=TRUE \
|
|
||||||
-DCGAL_DIR="$CGAL_DIR" \
|
|
||||||
.' ; then
|
|
||||||
|
|
||||||
echo " successful configuration" >> $ERRORFILE
|
|
||||||
else
|
|
||||||
echo " ERROR: configuration" >> $ERRORFILE
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
# compile_and_run <target>
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
|
|
||||||
compile_and_run()
|
|
||||||
{
|
|
||||||
echo "Compiling $1 ... "
|
|
||||||
SUCCES="y"
|
|
||||||
|
|
||||||
if eval '${MAKE_CMD} VERBOSE=ON -fMakefile $1' ; then
|
|
||||||
echo " successful compilation of $1" >> $ERRORFILE
|
|
||||||
else
|
|
||||||
echo " ERROR: compilation of $1" >> $ERRORFILE
|
|
||||||
SUCCES=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$DO_RUN" ] ; then
|
|
||||||
if [ -n "${SUCCES}" ] ; then
|
|
||||||
OUTPUTFILE=ProgramOutput.$1.$PLATFORM
|
|
||||||
rm -f $OUTPUTFILE
|
|
||||||
COMMAND="./$1"
|
|
||||||
if [ -f $1.cmd ] ; then
|
|
||||||
COMMAND="$COMMAND `cat $1.cmd`"
|
|
||||||
fi
|
|
||||||
if [ -f $1.cin ] ; then
|
|
||||||
COMMAND="cat $1.cin | $COMMAND"
|
|
||||||
fi
|
|
||||||
echo "Executing $1 ... "
|
|
||||||
echo
|
|
||||||
ulimit -t 3600 2> /dev/null
|
|
||||||
if eval $COMMAND > $OUTPUTFILE 2>&1 ; then
|
|
||||||
echo " successful execution of $1" >> $ERRORFILE
|
|
||||||
else
|
|
||||||
echo " ERROR: execution of $1" >> $ERRORFILE
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo " ERROR: not executed $1" >> $ERRORFILE
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
# remove the previous error file
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
|
|
||||||
rm -f $ERRORFILE
|
|
||||||
touch $ERRORFILE
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
# configure, compile and run the tests
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
|
|
||||||
configure
|
|
||||||
|
|
||||||
if [ $# -ne 0 ] ; then
|
|
||||||
for file in $* ; do
|
|
||||||
compile_and_run $file
|
|
||||||
done
|
|
||||||
else
|
|
||||||
echo "Run all tests."
|
|
||||||
|
|
||||||
for target in \
|
|
||||||
demo_framework \
|
|
||||||
gl_splat \
|
|
||||||
point_dialog \
|
|
||||||
CGALlab \
|
|
||||||
cgal_lab \
|
|
||||||
scene_basic_objects \
|
|
||||||
scene_color_ramp \
|
|
||||||
scene_c2t3_item \
|
|
||||||
scene_c3t3_item \
|
|
||||||
scene_combinatorial_map_item \
|
|
||||||
scene_edit_polyhedron_item \
|
|
||||||
scene_image_item \
|
|
||||||
scene_implicit_function_item \
|
|
||||||
scene_nef_polyhedron_item \
|
|
||||||
scene_points_with_normal_item \
|
|
||||||
scene_polygon_soup_item \
|
|
||||||
scene_polyhedron_item \
|
|
||||||
scene_polyhedron_item_decorator \
|
|
||||||
scene_polyhedron_and_sm_item_k_ring_selection \
|
|
||||||
scene_poly_item_k_ring_selection \
|
|
||||||
scene_sm_item_k_ring_selection \
|
|
||||||
scene_polyhedron_selection_item \
|
|
||||||
scene_polyhedron_shortest_path_item \
|
|
||||||
scene_polyhedron_transform_item \
|
|
||||||
scene_polylines_item \
|
|
||||||
scene_surface_mesh_item \
|
|
||||||
scene_textured_polyhedron_item \
|
|
||||||
basic_generator_plugin \
|
|
||||||
c3t3_io_plugin \
|
|
||||||
camera_positions_plugin \
|
|
||||||
classification_plugin \
|
|
||||||
clip_cgal_lab_plugin \
|
|
||||||
convex_hull_plugin \
|
|
||||||
corefinement_plugin \
|
|
||||||
create_bbox_mesh_plugin \
|
|
||||||
cut_plugin \
|
|
||||||
detect_sharp_edges_plugin \
|
|
||||||
detect_sharp_edges_sm_plugin \
|
|
||||||
distance_plugin \
|
|
||||||
distance_sm_plugin \
|
|
||||||
edit_cgal_lab_plugin \
|
|
||||||
edit_sm_plugin \
|
|
||||||
extrude_poly_plugin \
|
|
||||||
extrude_sm_plugin \
|
|
||||||
fairing_plugin \
|
|
||||||
features_detection_plugin \
|
|
||||||
gocad_plugin \
|
|
||||||
hole_filling_plugin \
|
|
||||||
hole_filling_sm_plugin \
|
|
||||||
hole_filling_polyline_plugin \
|
|
||||||
inside_out_plugin \
|
|
||||||
interpolated_corrected_principal_curvatures_plugin\
|
|
||||||
surface_intersection_plugin \
|
|
||||||
surface_intersection_sm_plugin \
|
|
||||||
io_image_plugin \
|
|
||||||
io_implicit_function_plugin \
|
|
||||||
isotropic_remeshing_plugin \
|
|
||||||
jet_fitting_plugin \
|
|
||||||
join_and_split_polyhedra_plugin \
|
|
||||||
kernel_plugin \
|
|
||||||
mean_curvature_flow_skeleton_plugin \
|
|
||||||
mean_curvature_flow_skeleton_sm_plugin \
|
|
||||||
merge_point_sets_plugin \
|
|
||||||
mesh_2_plugin \
|
|
||||||
mesh_3_optimization_plugin \
|
|
||||||
mesh_3_plugin \
|
|
||||||
mesh_segmentation_plugin \
|
|
||||||
mesh_segmentation_sm_plugin \
|
|
||||||
mesh_simplification_plugin \
|
|
||||||
nef_io_plugin \
|
|
||||||
nef_plugin \
|
|
||||||
off_plugin \
|
|
||||||
off_to_nef_plugin \
|
|
||||||
offset_meshing_plugin \
|
|
||||||
alpha_wrap_3_plugin \
|
|
||||||
orient_soup_plugin \
|
|
||||||
parameterization_plugin \
|
|
||||||
pca_plugin \
|
|
||||||
p_klein_function_plugin \
|
|
||||||
ply_to_xyz_plugin \
|
|
||||||
point_inside_cgal_lab_plugin \
|
|
||||||
point_set_average_spacing_plugin \
|
|
||||||
point_set_bilateral_smoothing_plugin \
|
|
||||||
point_set_from_vertices_plugin \
|
|
||||||
point_set_interference_plugin \
|
|
||||||
point_set_normal_estimation_plugin \
|
|
||||||
point_set_outliers_removal_plugin \
|
|
||||||
point_set_selection_plugin \
|
|
||||||
point_set_shape_detection_plugin \
|
|
||||||
point_set_simplification_plugin \
|
|
||||||
point_set_smoothing_plugin \
|
|
||||||
point_set_upsampling_plugin \
|
|
||||||
point_set_wlop_plugin \
|
|
||||||
polyhedron_slicer_plugin \
|
|
||||||
polyhedron_stitching_plugin \
|
|
||||||
polylines_io_plugin \
|
|
||||||
p_sphere_function_plugin \
|
|
||||||
p_tanglecube_function_plugin \
|
|
||||||
random_perturbation_plugin \
|
|
||||||
repair_cgal_lab_plugin \
|
|
||||||
selection_io_plugin \
|
|
||||||
selection_sm_io_plugin \
|
|
||||||
selection_plugin \
|
|
||||||
selection_sm_plugin \
|
|
||||||
self_intersection_plugin \
|
|
||||||
shortest_path_plugin \
|
|
||||||
surface_mesh_approximation_plugin \
|
|
||||||
stl_plugin \
|
|
||||||
subdivision_methods_plugin \
|
|
||||||
surface_mesh_io_plugin \
|
|
||||||
surface_reconstruction_plugin \
|
|
||||||
surf_to_sm_io_plugin \
|
|
||||||
transform_cgal_lab_plugin \
|
|
||||||
triangulate_facets_plugin \
|
|
||||||
trivial_plugin \
|
|
||||||
vtk_plugin \
|
|
||||||
xyz_plugin \
|
|
||||||
smoothing_plugin \
|
|
||||||
all
|
|
||||||
do
|
|
||||||
if ${MAKE_CMD} -f Makefile help | grep "$target" > /dev/null; then
|
|
||||||
compile_and_run "$target"
|
|
||||||
NEED_CLEAN=y
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# The clean target generated by CMake under cygwin
|
|
||||||
# always fails for some reason
|
|
||||||
#
|
|
||||||
if [ -n "${NEED_CLEAN}" ]; then
|
|
||||||
if ! ( uname | grep -q "CYGWIN" ) ; then
|
|
||||||
${MAKE_CMD} -fMakefile clean || true
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
@ -1,125 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
|
|
||||||
# This is a script for the CGAL test suite. Such a script must obey
|
|
||||||
# the following rules:
|
|
||||||
#
|
|
||||||
# - the name of the script is cgal_test_with_cmake
|
|
||||||
# - for every target two one line messages are written to the file 'error.txt'
|
|
||||||
# the first one indicates if the compilation was successful
|
|
||||||
# the second one indicates if the execution was successful
|
|
||||||
# if one of the two was not successful, the line should start with 'ERROR:'
|
|
||||||
# - running the script should not require any user interaction
|
|
||||||
# - the script should clean up object files and executables
|
|
||||||
|
|
||||||
ERRORFILE=error.txt
|
|
||||||
DO_RUN=y
|
|
||||||
if [ -z "${MAKE_CMD}" ]; then
|
|
||||||
MAKE_CMD=make
|
|
||||||
fi
|
|
||||||
NEED_CLEAN=
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
# configure
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
|
|
||||||
configure()
|
|
||||||
{
|
|
||||||
echo "Configuring... "
|
|
||||||
|
|
||||||
if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} -DRUNNING_CGAL_AUTO_TEST=TRUE \
|
|
||||||
-DCGAL_DIR="$CGAL_DIR" \
|
|
||||||
.' ; then
|
|
||||||
|
|
||||||
echo " successful configuration" >> $ERRORFILE
|
|
||||||
else
|
|
||||||
echo " ERROR: configuration" >> $ERRORFILE
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
# compile_and_run <target>
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
|
|
||||||
compile_and_run()
|
|
||||||
{
|
|
||||||
echo "Compiling $1 ... "
|
|
||||||
SUCCESS="y"
|
|
||||||
|
|
||||||
if eval '${MAKE_CMD} VERBOSE=ON -fMakefile $1' ; then
|
|
||||||
echo " successful compilation of $1" >> $ERRORFILE
|
|
||||||
else
|
|
||||||
echo " ERROR: compilation of $1" >> $ERRORFILE
|
|
||||||
SUCCESS=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$DO_RUN" ] ; then
|
|
||||||
if [ -n "${SUCCESS}" ] ; then
|
|
||||||
OUTPUTFILE=ProgramOutput.$1.$PLATFORM
|
|
||||||
rm -f $OUTPUTFILE
|
|
||||||
COMMAND="./$1"
|
|
||||||
if [ -f $1.cmd ] ; then
|
|
||||||
COMMAND="$COMMAND `cat $1.cmd`"
|
|
||||||
fi
|
|
||||||
if [ -f $1.cin ] ; then
|
|
||||||
COMMAND="cat $1.cin | $COMMAND"
|
|
||||||
fi
|
|
||||||
echo "Executing $1 ... "
|
|
||||||
echo
|
|
||||||
ulimit -t 3600 2> /dev/null
|
|
||||||
if eval $COMMAND > $OUTPUTFILE 2>&1 ; then
|
|
||||||
echo " successful execution of $1" >> $ERRORFILE
|
|
||||||
else
|
|
||||||
echo " ERROR: execution of $1" >> $ERRORFILE
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo " ERROR: not executed $1" >> $ERRORFILE
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
# remove the previous error file
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
|
|
||||||
rm -f $ERRORFILE
|
|
||||||
touch $ERRORFILE
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
# configure, compile and run the tests
|
|
||||||
#---------------------------------------------------------------------#
|
|
||||||
|
|
||||||
configure
|
|
||||||
|
|
||||||
if [ $# -ne 0 ] ; then
|
|
||||||
for file in $* ; do
|
|
||||||
compile_and_run $file
|
|
||||||
done
|
|
||||||
else
|
|
||||||
echo "Run all tests."
|
|
||||||
if ${MAKE_CMD} -f Makefile help | grep -E "test_approx_offset$" > /dev/null; then
|
|
||||||
compile_and_run test_approx_offset
|
|
||||||
NEED_CLEAN=y
|
|
||||||
fi
|
|
||||||
if ${MAKE_CMD} -f Makefile help | grep -E "test_exact_offset$" > /dev/null; then
|
|
||||||
compile_and_run test_exact_offset
|
|
||||||
NEED_CLEAN=y
|
|
||||||
fi
|
|
||||||
if ${MAKE_CMD} -f Makefile help | grep -E "test_minkowski_sum$" > /dev/null; then
|
|
||||||
compile_and_run test_minkowski_sum
|
|
||||||
NEED_CLEAN=y
|
|
||||||
fi
|
|
||||||
if ${MAKE_CMD} -f Makefile help | grep -E "test_minkowski_sum_with_holes$" > /dev/null; then
|
|
||||||
compile_and_run test_minkowski_sum_with_holes
|
|
||||||
NEED_CLEAN=y
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# The clean target generated by CMake under cygwin
|
|
||||||
# always fails for some reason
|
|
||||||
#
|
|
||||||
if [ -n "${NEED_CLEAN}" ]; then
|
|
||||||
if ! ( uname | grep -q "CYGWIN" ) ; then
|
|
||||||
${MAKE_CMD} -fMakefile clean
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
#include <CGAL/assertions.h>
|
#include <CGAL/assertions.h>
|
||||||
#include <CGAL/boost/graph/iterator.h>
|
#include <CGAL/boost/graph/iterator.h>
|
||||||
#include <CGAL/boost/graph/helpers.h>
|
|
||||||
#include <CGAL/boost/graph/Face_filtered_graph.h>
|
#include <CGAL/boost/graph/Face_filtered_graph.h>
|
||||||
#include <CGAL/boost/graph/copy_face_graph.h>
|
#include <CGAL/boost/graph/copy_face_graph.h>
|
||||||
#include <CGAL/Container_helper.h>
|
#include <CGAL/Container_helper.h>
|
||||||
|
|
@ -38,7 +37,6 @@
|
||||||
#include <CGAL/iterator.h>
|
#include <CGAL/iterator.h>
|
||||||
#include <CGAL/tuple.h>
|
#include <CGAL/tuple.h>
|
||||||
|
|
||||||
#include <CGAL/Named_function_parameters.h>
|
|
||||||
#include <CGAL/boost/graph/named_params_helper.h>
|
#include <CGAL/boost/graph/named_params_helper.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
|
||||||
|
|
@ -1692,6 +1692,17 @@ private:
|
||||||
// else keep current status for en and eno
|
// else keep current status for en and eno
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void remove_border_face(const halfedge_descriptor h)
|
||||||
|
{
|
||||||
|
CGAL_assertion(is_border(opposite(h, mesh_), mesh_));
|
||||||
|
for (halfedge_descriptor hf : halfedges_around_face(h, mesh_))
|
||||||
|
{
|
||||||
|
set_status(hf, MESH_BORDER); //only 1 or 2 of the listed halfedges
|
||||||
|
//will survive face removal, but status will be correct
|
||||||
|
}
|
||||||
|
CGAL::Euler::remove_face(h, mesh_);
|
||||||
|
}
|
||||||
|
|
||||||
template<typename Bimap, typename SizingFunction>
|
template<typename Bimap, typename SizingFunction>
|
||||||
bool fix_degenerate_faces(const vertex_descriptor& v,
|
bool fix_degenerate_faces(const vertex_descriptor& v,
|
||||||
Bimap& short_edges,
|
Bimap& short_edges,
|
||||||
|
|
@ -1721,7 +1732,7 @@ private:
|
||||||
|
|
||||||
if(is_border(opposite(h, mesh_), mesh_))
|
if(is_border(opposite(h, mesh_), mesh_))
|
||||||
{
|
{
|
||||||
CGAL::Euler::remove_face(h, mesh_);
|
remove_border_face(h);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1732,7 +1743,7 @@ private:
|
||||||
|
|
||||||
if(is_border(hfo, mesh_))
|
if(is_border(hfo, mesh_))
|
||||||
{
|
{
|
||||||
CGAL::Euler::remove_face(h, mesh_);
|
remove_border_face(h);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
vertex_descriptor vc = target(hf, mesh_);
|
vertex_descriptor vc = target(hf, mesh_);
|
||||||
|
|
|
||||||
|
|
@ -1,951 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# ----------------------------------------------------
|
|
||||||
# ----------------------------------------------------
|
|
||||||
# autotest_cgal: a script to automagically install and
|
|
||||||
# test internal CGAL releases
|
|
||||||
# ----------------------------------------------------
|
|
||||||
# You will need
|
|
||||||
# * GNU wget and ftp
|
|
||||||
# * or alternatively curl
|
|
||||||
#
|
|
||||||
# Furthermore you have to edit .autocgalrc in order to
|
|
||||||
# customize it for your environment.
|
|
||||||
# In particular you have to change the BUILHOSTS
|
|
||||||
# variable to contain the names of your hosts and
|
|
||||||
# set the COMPILERS_<hostname> variables to the
|
|
||||||
# os-compilers descriptions on which you want to run
|
|
||||||
# the testsuite.
|
|
||||||
# ----------------------------------------------------
|
|
||||||
# ----------------------------------------------------
|
|
||||||
#
|
|
||||||
# $URL$
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
#sets the umask to 022 & 0777
|
|
||||||
umask 022
|
|
||||||
|
|
||||||
# Warn deprecated use of environment variables to pass on flags
|
|
||||||
if [ -n "$TESTSUITE_CXXFLAGS" ] ; then
|
|
||||||
echo "\$TESTSUITE_CXXFLAGS is deprecated. Please use the CMAKE variable (CMAKE|CGAL)_CXX_FLAGS instead" >&2;
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$TESTSUITE_CXXFLAGS_RELEASE" ] ; then
|
|
||||||
echo "\$TESTSUITE_CXXFLAGS_RELEASE is deprecated. Please use the CMAKE variable (CMAKE|CGAL)_CXX_FLAGS_RELEASE instead" >&2;
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$TESTSUITE_CXXFLAGS_DEBUG" ] ; then
|
|
||||||
echo "\$TESTSUITE_CXXFLAGS_DEBUG is deprecated. Please use the CMAKE variable (CMAKE|CGAL)_CXX_FLAGS_DEBUG instead" >&2;
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$TESTSUITE_LDFLAGS" ] ; then
|
|
||||||
echo "\$TESTSUITE_LDFLAGS is deprecated. Please use the CMAKE variable (CMAKE|CGAL)_(MODULE|SHARED|EXE)_LINKER_FLAGS instead" >&2;
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$TESTSUITE_LDFLAGS_RELEASE" ] ; then
|
|
||||||
echo "\$TESTSUITE_LDFLAGS_RELEASE is deprecated. Please use the CMAKE variable (CMAKE|CGAL)_(MODULE|SHARED|EXE)_LINKER_FLAGS_RELEASE instead" >&2;
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$TESTSUITE_LDFLAGS_DEBUG" ] ; then
|
|
||||||
echo "\$TESTSUITE_LDFLAGS_DEBUG is deprecated. Please use the CMAKE variable (CMAKE|CGAL)_(MODULE|SHARED|EXE)_LINKER_FLAGS_DEBUG instead" >&2;
|
|
||||||
fi
|
|
||||||
|
|
||||||
# We want english warning and error messages!!
|
|
||||||
LANG=C
|
|
||||||
LC_ALL=C
|
|
||||||
export LANG
|
|
||||||
export LC_ALL
|
|
||||||
|
|
||||||
SCP="scp"
|
|
||||||
WGET="wget"
|
|
||||||
WGET_OPTS="--no-check-certificate --no-verbose"
|
|
||||||
CURL="curl"
|
|
||||||
CURL_OPTS="-k --remote-name --silent --location-trusted"
|
|
||||||
CGAL_URL="https://cgal.geometryfactory.com/CGAL/Releases"
|
|
||||||
LATEST_LOCATION="${CGAL_URL}/LATEST"
|
|
||||||
TAR="tar"
|
|
||||||
GZIP="gzip"
|
|
||||||
GUNZIP="gunzip"
|
|
||||||
COMPRESSOR="${GZIP}"
|
|
||||||
SENDMAIL="mail"
|
|
||||||
CGAL_TESTER=`whoami`
|
|
||||||
CGAL_TESTER_NAME="${CGAL_TESTER}"
|
|
||||||
CGAL_TESTER_ADDRESS="${CGAL_TESTER}"
|
|
||||||
CONSOLE_OUTPUT="y"
|
|
||||||
CGAL_ROOT=`pwd`
|
|
||||||
UPLOAD_RESULT_DESTINATION="cgaltest@cgaltest.geometryfactory.com:incoming"
|
|
||||||
BUILD_HOSTS="must_be_set_in_.autocgalrc"
|
|
||||||
MAIL_ADDRESS="must_be_set_in_.autocgalrc"
|
|
||||||
MYSHELL=""
|
|
||||||
REFERENCE_PLATFORMS_DIR="must_be_set_in_.autocgalrc"
|
|
||||||
ACTUAL_DIR=`pwd`
|
|
||||||
RSH="rsh"
|
|
||||||
NICE_OPTIONS="-19"
|
|
||||||
USE_TARGZ="n"
|
|
||||||
USE_TARBZ="n"
|
|
||||||
PLATFORMS=""
|
|
||||||
PLATFORM=""
|
|
||||||
USE_REFERENCE_PLATFORMS=""
|
|
||||||
SHOW_PROGRESS=""
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# write to logfile
|
|
||||||
# $1 = logfile
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
log()
|
|
||||||
{
|
|
||||||
LOGFILE=${1}
|
|
||||||
shift
|
|
||||||
if [ -n "${CONSOLE_OUTPUT}" ]; then
|
|
||||||
printf "${*} ...\n"
|
|
||||||
fi
|
|
||||||
printf "\n-------------------------------------------------------\n" >> "${LOGFILE}"
|
|
||||||
printf " ${*} ...\n" >> "${LOGFILE}"
|
|
||||||
printf "\n-------------------------------------------------------\n" >> "${LOGFILE}"
|
|
||||||
}
|
|
||||||
|
|
||||||
log_done()
|
|
||||||
{
|
|
||||||
if [ -n "${CONSOLE_OUTPUT}" ]; then
|
|
||||||
printf \
|
|
||||||
" done\n-------------------------------------------------------\n"
|
|
||||||
fi
|
|
||||||
printf "\n-------------------------------------------------------\n" >> "${1}"
|
|
||||||
printf " **DONE**\n" >> "${1}"
|
|
||||||
printf "\n-------------------------------------------------------\n" >> "${1}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# produce a string containing the actual date/time
|
|
||||||
# (used to identify files)
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
datestr()
|
|
||||||
{
|
|
||||||
date +%d%m%Y%H%M
|
|
||||||
}
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# Print error and exit
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
error()
|
|
||||||
{
|
|
||||||
if [ -n "${CONSOLE_OUTPUT}" ]; then
|
|
||||||
printf "\nERROR: ${*}, exiting.\n" >&2
|
|
||||||
fi
|
|
||||||
printf "\nERROR: ${*}, exiting.\n" >> "${ACTUAL_LOGFILE}"
|
|
||||||
${COMPRESSOR} -9f "${ACTUAL_LOGFILE}"
|
|
||||||
FILENAME="${CGAL_RELEASE_ID}-log`datestr`.gz"
|
|
||||||
mv "${ACTUAL_LOGFILE}.gz" "${LOGS_DIR}/${FILENAME}"
|
|
||||||
if [ ! "${MAIL_ADDRESS}" = "must_be_set_in_.autocgalrc" ]; then
|
|
||||||
for i in ${MAIL_ADDRESS}; do
|
|
||||||
printf "ERROR\n${LOGS_DIR}/${FILENAME}\n" | \
|
|
||||||
${SENDMAIL} -s "completed autotest" "${i}"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
rm -rf "$LOCK_FILE";
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# Return 0 if $1 exists in the list $2, otherwise returns non-zero.
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
is_in_list()
|
|
||||||
{
|
|
||||||
ELEMENT=${1}
|
|
||||||
LIST=${2}
|
|
||||||
|
|
||||||
for E in ${LIST} ; do
|
|
||||||
if [ "${E}" = "${ELEMENT}" ] ; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# function to print the value of variable $1
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
value_of()
|
|
||||||
{
|
|
||||||
_value=`eval "printf '$'${1}"`
|
|
||||||
eval "printf \"${_value}\""
|
|
||||||
}
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# Executes a command remotely
|
|
||||||
# $1 = HOST
|
|
||||||
# $2 = COMMAND
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
remote_command()
|
|
||||||
{
|
|
||||||
if [ "${1}" = "localhost" ]; then
|
|
||||||
eval $2
|
|
||||||
else
|
|
||||||
printf "** Logging into host ${1} **\n"
|
|
||||||
${RSH} ${1} ${MYSHELL} \"${2}\"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# Downloads the file "LATEST" whose contents indicates which release to test
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
download_latest()
|
|
||||||
{
|
|
||||||
if [ -r "LATEST" ]; then
|
|
||||||
rm -rf LATEST
|
|
||||||
fi
|
|
||||||
log "${ACTUAL_LOGFILE}" "getting LATEST"
|
|
||||||
if [ -n "${USE_CURL}" ]; then
|
|
||||||
${CURL} ${CURL_OPTS} "${LATEST_LOCATION}" >> "${ACTUAL_LOGFILE}" 2>&1
|
|
||||||
else
|
|
||||||
${WGET} ${WGET_OPTS} "${LATEST_LOCATION}" >> "${ACTUAL_LOGFILE}" 2>&1
|
|
||||||
fi
|
|
||||||
if [ ! -f "LATEST" ]; then
|
|
||||||
error "COULD NOT DOWNLOAD LATEST!"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# Exits the testsuite if the latest release has been already tested.
|
|
||||||
# This is tested by comparing files LATEST and RELEASE_NR, where
|
|
||||||
# RELEASE_NR is a copy of the previous LATEST.
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
abort_if_latest_already_tested()
|
|
||||||
{
|
|
||||||
if [ -r "RELEASE_NR" ]; then
|
|
||||||
cmp LATEST RELEASE_NR >> "${ACTUAL_LOGFILE}"
|
|
||||||
if [ ! ${?} != 0 ]; then
|
|
||||||
log "${ACTUAL_LOGFILE}" "This release has already been tested."
|
|
||||||
rm -f "$LOCK_FILE";
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# get CGAL
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
get_cgal()
|
|
||||||
{
|
|
||||||
if [ -z "$CGAL_LOCATION" ]; then
|
|
||||||
for i in `cat LATEST`
|
|
||||||
do
|
|
||||||
CGAL_LOCATION="${CGAL_URL}/${i}";
|
|
||||||
CGAL_ZIPFILE="${i}";
|
|
||||||
done
|
|
||||||
else
|
|
||||||
CGAL_ZIPFILE=`echo "$CGAL_LOCATION" | sed 's|.*/||'`
|
|
||||||
fi
|
|
||||||
|
|
||||||
CGAL_RELEASE_ID=`echo $CGAL_ZIPFILE | sed "s/.tar.gz//"`
|
|
||||||
if [ ! "${CGAL_RELEASE_ID}" = "${CGAL_ZIPFILE}" ]; then
|
|
||||||
USE_TARGZ="y"
|
|
||||||
else
|
|
||||||
CGAL_RELEASE_ID=`echo $CGAL_ZIPFILE | sed "s/.tar.bz2//"`
|
|
||||||
if [ ! "${CGAL_RELEASE_ID}" = "${CGAL_ZIPFILE}" ]; then
|
|
||||||
USE_TARBZ="y"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
log "${ACTUAL_LOGFILE}" "CGAL_ZIPFILE = ${CGAL_ZIPFILE}"
|
|
||||||
log "${ACTUAL_LOGFILE}" "CGAL_RELEASE_ID = ${CGAL_RELEASE_ID}"
|
|
||||||
|
|
||||||
log "${ACTUAL_LOGFILE}" "getting CGAL"
|
|
||||||
rm -f "${CGAL_ZIPFILE}"
|
|
||||||
if [ -n "${USE_CURL}" ]; then
|
|
||||||
${CURL} ${CURL_OPTS} "${CGAL_LOCATION}" >> "${ACTUAL_LOGFILE}" 2>&1
|
|
||||||
else
|
|
||||||
${WGET} ${WGET_OPTS} "${CGAL_LOCATION}" >> "${ACTUAL_LOGFILE}" 2>&1
|
|
||||||
fi
|
|
||||||
if [ ${?} != 0 ]; then
|
|
||||||
error "Could not get CGAL"
|
|
||||||
fi
|
|
||||||
log_done "${ACTUAL_LOGFILE}"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# Unzips and untars the downloaded CGAL release
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
unzip_cgal()
|
|
||||||
{
|
|
||||||
cd "${CGAL_ROOT}"
|
|
||||||
|
|
||||||
log "${ACTUAL_LOGFILE}" "unzipping CGAL"
|
|
||||||
if [ "${USE_TARGZ}" = "y" ]; then
|
|
||||||
DECOMPRESSOR="${GUNZIP}"
|
|
||||||
log_done "${ACTUAL_LOGFILE}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${USE_TARBZ}" = "y" ]; then
|
|
||||||
DECOMPRESSOR="bunzip2"
|
|
||||||
fi
|
|
||||||
|
|
||||||
log "${ACTUAL_LOGFILE}" "untarring CGAL"
|
|
||||||
${DECOMPRESSOR} -c "${CGAL_ZIPFILE}" | ${TAR} xf - >> "${ACTUAL_LOGFILE}" 2>&1
|
|
||||||
if [ ${?} != 0 ]; then
|
|
||||||
error "Could not untar CGAL"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# check, if CGAL_DIR exists
|
|
||||||
if [ -d "${CGAL_ROOT}/${CGAL_RELEASE_ID}" ]; then
|
|
||||||
# Reset CGAL-I symlink
|
|
||||||
log "${ACTUAL_LOGFILE}" "Resetting CGAL-I symlink to ${CGAL_ROOT}/${CGAL_RELEASE_ID}"
|
|
||||||
rm -f CGAL-I
|
|
||||||
ln -s "${CGAL_ROOT}/${CGAL_RELEASE_ID}" CGAL-I
|
|
||||||
# Reset CGAL-3.x-I symlink
|
|
||||||
CGAL_RELEASE=`echo "${CGAL_RELEASE_ID}" | sed 's/I\([^-]*\)-.*/I\1/'`
|
|
||||||
log "${ACTUAL_LOGFILE}" "Resetting ${CGAL_RELEASE} symlink to ${CGAL_ROOT}/${CGAL_RELEASE_ID}"
|
|
||||||
rm -f "${CGAL_RELEASE}"
|
|
||||||
ln -s "${CGAL_ROOT}/${CGAL_RELEASE_ID}" "${CGAL_RELEASE}"
|
|
||||||
else
|
|
||||||
error "directory ${CGAL_ROOT}/${CGAL_RELEASE_ID} does not exist"
|
|
||||||
fi
|
|
||||||
|
|
||||||
log_done "${ACTUAL_LOGFILE}"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# Uniquely adds $1 to the global, space-separated list $PLATFORMS
|
|
||||||
# (if it is not in the list already)
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
add_to_platforms()
|
|
||||||
{
|
|
||||||
if ! is_in_list "${1}" "${PLATFORMS}" ; then
|
|
||||||
PLATFORMS="${PLATFORMS} ${1}"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# Uniquely adds to the global, space-separated list $PLATFORMS all the directories found
|
|
||||||
# under ${REFERENCE_PLATFORMS_DIR}
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
collect_all_reference_platforms()
|
|
||||||
{
|
|
||||||
log "${ACTUAL_LOGFILE}" "Indicated to build on ALL platform folders"
|
|
||||||
if [ -d "${REFERENCE_PLATFORMS_DIR}" ]; then
|
|
||||||
cd "${REFERENCE_PLATFORMS_DIR}"
|
|
||||||
for PLATFORM in * ; do
|
|
||||||
if [ -d "${PLATFORM}" ]; then
|
|
||||||
add_to_platforms "${PLATFORM}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
else
|
|
||||||
log "${ACTUAL_LOGFILE}" "WARNING: Invalid reference platforms directory: ${REFERENCE_PLATFORMS_DIR}"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# Uniquely adds to the global, space-separated list $PLATFORMS all the directories found
|
|
||||||
# under $1
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
collect_all_current_platforms()
|
|
||||||
{
|
|
||||||
PLATFORMS=""
|
|
||||||
cd "${1}"
|
|
||||||
for PLATFORM in * ; do
|
|
||||||
if [ -d "${PLATFORM}" ]; then
|
|
||||||
PLATFORMS="${PLATFORMS} ${PLATFORM}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# Uniquely adds to the global, space-separated list $PLATFORMS all the directory names
|
|
||||||
# listed in the space-separated list $1
|
|
||||||
# NOTE: If any such name is "all", it's NOT added as a platform and the flag
|
|
||||||
# USE_REFERENCE_PLATFORMS is set instead.
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
build_platforms_list()
|
|
||||||
{
|
|
||||||
for LOCAL_PLATFORM in $1; do
|
|
||||||
if [ "${LOCAL_PLATFORM}" = "all" ] ; then
|
|
||||||
USE_REFERENCE_PLATFORMS='y'
|
|
||||||
else
|
|
||||||
add_to_platforms "${LOCAL_PLATFORM}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# Sets up the variables indicating the directories to use.
|
|
||||||
# Crates all platform directories under the current release binary folder.
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
setup_dirs()
|
|
||||||
{
|
|
||||||
# dir for the actual release
|
|
||||||
CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-I"`
|
|
||||||
|
|
||||||
CGAL_TEST_DIR=${CGAL_DIR}/test
|
|
||||||
CGAL_DATA_DIR=${CGAL_DIR}/data
|
|
||||||
export CGAL_DATA_DIR=$(echo "$CGAL_DATA_DIR" | sed -E 's/\/cygdrive\/([a-z])\//\U\1:\//')
|
|
||||||
|
|
||||||
if [ ! -d "${CGAL_DIR}/cmake" ]; then
|
|
||||||
mkdir "${CGAL_DIR}/cmake"
|
|
||||||
log "${ACTUAL_LOGFILE}" "Creating ${CGAL_DIR}/cmake"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d "${CGAL_DIR}/cmake/platforms" ]; then
|
|
||||||
mkdir "${CGAL_DIR}/cmake/platforms"
|
|
||||||
log "${ACTUAL_LOGFILE}" "Creating ${CGAL_DIR}/cmake/platforms"
|
|
||||||
fi
|
|
||||||
|
|
||||||
export CGAL_RELEASE_DIR="${CGAL_DIR}"
|
|
||||||
|
|
||||||
CGAL_RELEASE_ID=`basename "${CGAL_RELEASE_DIR}"`
|
|
||||||
|
|
||||||
CGAL_BINARY_DIR_BASE=${CGAL_RELEASE_DIR}/cmake/platforms
|
|
||||||
|
|
||||||
log "${ACTUAL_LOGFILE}" "Release to test ${CGAL_RELEASE_DIR}"
|
|
||||||
log "${ACTUAL_LOGFILE}" "CGAL_RELEASE_ID=${CGAL_RELEASE_ID}"
|
|
||||||
|
|
||||||
if [ ! -r "${LOGS_DIR}" ]; then
|
|
||||||
mkdir "$LOGS_DIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Collects the list of platform directories to build and test on
|
|
||||||
#
|
|
||||||
# The global variable PLATFORMS contains all the platform directories for all hosts
|
|
||||||
# as indicated in .autocgalrc.
|
|
||||||
# If .autocgalrc says "all" in any entry for BUILD_ON_* or COMPILERS_*, the platform
|
|
||||||
# directories existing in the reference release are added to $PLATFORMS
|
|
||||||
#
|
|
||||||
PLATFORMS=""
|
|
||||||
|
|
||||||
for HOST in ${BUILD_HOSTS}; do
|
|
||||||
|
|
||||||
build_platforms_list "`value_of BUILD_ON_${HOST}`"
|
|
||||||
build_platforms_list "`value_of COMPILERS_${HOST}`"
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -n "${USE_REFERENCE_PLATFORMS}" ]; then
|
|
||||||
collect_all_reference_platforms
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
for PLATFORM in ${PLATFORMS}; do
|
|
||||||
|
|
||||||
# MSVC2015 does not support C++17
|
|
||||||
if [ "$CGAL_RELEASE_ID" \> "CGAL-6.0" ]; then
|
|
||||||
if [ "$PLATFORMS" = "MSVC2015-Release-64bits" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
CGAL_BINARY_DIR=${CGAL_BINARY_DIR_BASE}/${PLATFORM}
|
|
||||||
|
|
||||||
if [ ! -d "${CGAL_BINARY_DIR}" ]; then
|
|
||||||
log "${ACTUAL_LOGFILE}" "Creating platform directory ${CGAL_BINARY_DIR}"
|
|
||||||
mkdir "${CGAL_BINARY_DIR}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# copy stuff from old CGAL installation
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
copy_old_stuff()
|
|
||||||
{
|
|
||||||
if [ -d "${REFERENCE_PLATFORMS_DIR}" ]; then
|
|
||||||
|
|
||||||
cd "${CGAL_BINARY_DIR_BASE}"
|
|
||||||
|
|
||||||
for PLATFORM in * ; do
|
|
||||||
if [ -d "${PLATFORM}" ]; then
|
|
||||||
|
|
||||||
# if the reference platform folder contains a setup script, copy it
|
|
||||||
if [ -f "${REFERENCE_PLATFORMS_DIR}/${PLATFORM}/setup" ]; then
|
|
||||||
log "${ACTUAL_LOGFILE}" "Copying reference platform setup script [${REFERENCE_PLATFORMS_DIR}/${PLATFORM}/setup] in [${CGAL_BINARY_DIR_BASE}/${PLATFORM}]"
|
|
||||||
cp "${REFERENCE_PLATFORMS_DIR}/${PLATFORM}/setup" "${CGAL_BINARY_DIR_BASE}/${PLATFORM}"
|
|
||||||
|
|
||||||
# hack on Windows, where 'cp' does not copy the Windows ACLs
|
|
||||||
chmod a+r "${CGAL_BINARY_DIR_BASE}/${PLATFORM}/setup"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# Builds the CGAL library on the host specified at $1
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
build_cgal_on_host()
|
|
||||||
{
|
|
||||||
HOST=${1}
|
|
||||||
|
|
||||||
PLATFORMS="`value_of BUILD_ON_${HOST}`"
|
|
||||||
|
|
||||||
|
|
||||||
if [ -z "${PLATFORMS}" ]; then
|
|
||||||
PLATFORMS=`value_of COMPILERS_${HOST}`
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${PLATFORMS}" = "all" ]; then
|
|
||||||
collect_all_current_platforms "${CGAL_BINARY_DIR_BASE}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${PLATFORMS}" ]; then
|
|
||||||
|
|
||||||
for PLATFORM in ${PLATFORMS} ; do
|
|
||||||
|
|
||||||
CGAL_BINARY_DIR="${CGAL_BINARY_DIR_BASE}/${PLATFORM}"
|
|
||||||
|
|
||||||
log "${ACTUAL_LOGFILE}" "Building cgal libs on host ${HOST} and platform ${PLATFORM}\nUnder ${CGAL_BINARY_DIR}\n"
|
|
||||||
|
|
||||||
if [ -f "${CGAL_BINARY_DIR}/localbuildscript" ] ; then
|
|
||||||
log "${ACTUAL_LOGFILE}" "WARNING! Already built on platform ${PLATFORM}."
|
|
||||||
else
|
|
||||||
|
|
||||||
if [ -f "${CGAL_BINARY_DIR}/setup" ]; then
|
|
||||||
cp "${CGAL_BINARY_DIR}/setup" "${CGAL_BINARY_DIR}/localbuildscript"
|
|
||||||
else
|
|
||||||
rm -f "${CGAL_BINARY_DIR}/localbuildscript"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >> "${CGAL_BINARY_DIR}/localbuildscript" <<EOF
|
|
||||||
CGAL_BINARY_DIR='${CGAL_BINARY_DIR}';
|
|
||||||
MAKE_CMD='${MAKE_CMD}';
|
|
||||||
|
|
||||||
export MAKE_CMD;
|
|
||||||
export CGAL_BINARY_DIR;
|
|
||||||
cd '${CGAL_BINARY_DIR}';
|
|
||||||
cmake \${INIT_FILE:+"-C\${INIT_FILE}"} -DRUNNING_CGAL_AUTO_TEST=TRUE \\
|
|
||||||
VERBOSE=1 \\
|
|
||||||
../../..;
|
|
||||||
${MAKE_CMD} VERBOSE=ON -k -fMakefile ;
|
|
||||||
cd ..;
|
|
||||||
EOF
|
|
||||||
if [ -z "${KEEP_TESTS}" ]; then
|
|
||||||
cat >> "${CGAL_BINARY_DIR}/localbuildscript" <<EOF
|
|
||||||
echo 'REMOVING COMPILATION TREE';
|
|
||||||
rm -rf '${CGAL_BINARY_DIR}/src'
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
chmod ugo+x "${CGAL_BINARY_DIR}/localbuildscript"
|
|
||||||
if [ -n "${SHOW_PROGRESS}" ]; then
|
|
||||||
remote_command ${HOST} "${CGAL_BINARY_DIR}/localbuildscript" 2>&1 | tee "${ACTUAL_LOGFILE}.build.${PLATFORM}"
|
|
||||||
else
|
|
||||||
remote_command ${HOST} "${CGAL_BINARY_DIR}/localbuildscript" > "${ACTUAL_LOGFILE}.build.${PLATFORM}" 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp "${ACTUAL_LOGFILE}.build.${PLATFORM}" "${CGAL_BINARY_DIR}/installation.log"
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
else
|
|
||||||
error "There are no platform directories under ${CGAL_BINARY_DIR_BASE} to test! "
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# builds cgal
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
build_cgal()
|
|
||||||
{
|
|
||||||
for HOST in ${BUILD_HOSTS}; do
|
|
||||||
build_cgal_on_host "${HOST}"
|
|
||||||
done
|
|
||||||
|
|
||||||
# NOTE: At this point PWD is in the last platform directory where CGAL was built
|
|
||||||
|
|
||||||
log_done "${ACTUAL_LOGFILE}"
|
|
||||||
cp "${ACTUAL_LOGFILE}" "${CGAL_BINARY_DIR_BASE}/installation.log"
|
|
||||||
${COMPRESSOR} -9f "${ACTUAL_LOGFILE}"
|
|
||||||
mv "${ACTUAL_LOGFILE}.gz" "${LOGS_DIR}/${CGAL_RELEASE_ID}-log`datestr`.gz"
|
|
||||||
}
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# Runs the test on the host $1 under the platform folder $2
|
|
||||||
# the variable PROCESSORS_electra, where electra is the
|
|
||||||
# name of the machine, is used to specify the number of
|
|
||||||
# processors to use
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
run_test_on_host_and_platform()
|
|
||||||
{
|
|
||||||
HOST=${1}
|
|
||||||
PLATFORM=${2}
|
|
||||||
|
|
||||||
NUMBER_OF_PROCESSORS="`value_of PROCESSORS_${HOST}`"
|
|
||||||
CGAL_BINARY_DIR=${CGAL_BINARY_DIR_BASE}/${PLATFORM}
|
|
||||||
cd "${CGAL_BINARY_DIR}"
|
|
||||||
log "${ACTUAL_LOGFILE}.test.${PLATFORM}" "Testing on host ${HOST} and platform ${PLATFORM}"
|
|
||||||
if [ "${NUMBER_OF_PROCESSORS}" = "1" ] ; then
|
|
||||||
MAKE_OPTS=""
|
|
||||||
else
|
|
||||||
MAKE_OPTS="-j ${NUMBER_OF_PROCESSORS}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "${CGAL_BINARY_DIR}/localtestscript" ]; then
|
|
||||||
log "${ACTUAL_LOGFILE}" "WARNING! Already tested on platform ${PLATFORM}."
|
|
||||||
else
|
|
||||||
if [ -f "${CGAL_BINARY_DIR}/setup" ]; then
|
|
||||||
cp "${CGAL_BINARY_DIR}/setup" "${CGAL_BINARY_DIR}/localtestscript"
|
|
||||||
else
|
|
||||||
rm -f "${CGAL_BINARY_DIR}/localtestscript"
|
|
||||||
fi
|
|
||||||
|
|
||||||
for file in "${CGAL_BINARY_DIR}/localtestscript" "${CGAL_BINARY_DIR}/localtestscript-redo-results-collection"; do
|
|
||||||
cat >> "$file" <<EOF
|
|
||||||
CGAL_TESTER='${CGAL_TESTER}';
|
|
||||||
CGAL_TESTER_NAME='${CGAL_TESTER_NAME}';
|
|
||||||
CGAL_TESTER_ADDRESS='${CGAL_TESTER_ADDRESS}';
|
|
||||||
if [ -n "${IS_CYGWIN}" ]; then
|
|
||||||
CGAL_DIR=\$( cygpath -w "${CGAL_BINARY_DIR}" );
|
|
||||||
else
|
|
||||||
CGAL_DIR='${CGAL_BINARY_DIR}';
|
|
||||||
fi
|
|
||||||
CGAL_TEST_HOST='${HOST}';
|
|
||||||
CGAL_TEST_PLATFORM='${PLATFORM}';
|
|
||||||
MAKE_CMD='${MAKE_CMD}'
|
|
||||||
export CGAL_TESTER CGAL_TESTER_NAME CGAL_TESTER_ADDRESS;
|
|
||||||
export CGAL_DIR;
|
|
||||||
export CGAL_TEST_HOST CGAL_TEST_PLATFORM;
|
|
||||||
export MAKE_CMD;
|
|
||||||
|
|
||||||
EOF
|
|
||||||
done
|
|
||||||
cat >> "${CGAL_BINARY_DIR}/localtestscript" <<EOF
|
|
||||||
LIST_TEST_PACKAGES='${LIST_TEST_PACKAGES}'
|
|
||||||
CGAL_ROOT='${CGAL_ROOT}'
|
|
||||||
|
|
||||||
rm -rf '${CGAL_BINARY_DIR}/test';
|
|
||||||
if [ -f '${LIST_TEST_PACKAGES}' ]; then
|
|
||||||
mkdir '${CGAL_BINARY_DIR}/test'
|
|
||||||
|
|
||||||
cp '${CGAL_TEST_DIR}/collect_cgal_testresults_from_cmake' '${CGAL_BINARY_DIR}/test'
|
|
||||||
cp '${CGAL_TEST_DIR}/makefile2' '${CGAL_BINARY_DIR}/test'
|
|
||||||
cp '${CGAL_TEST_DIR}/run_testsuite_with_cmake' '${CGAL_BINARY_DIR}/test'
|
|
||||||
|
|
||||||
# list all packages in CGAL_TEST_DIR. If PACKAGE is found in LIST_TEST_PACKAGES,
|
|
||||||
# copy it, else prepare for the special "skipped" case in the table.
|
|
||||||
for PACKAGE in \$(ls "${CGAL_TEST_DIR}"); do
|
|
||||||
if [ -d "${CGAL_TEST_DIR}/\$PACKAGE" ]; then
|
|
||||||
if source '${LIST_TEST_PACKAGES}' '${CGAL_ROOT}' | grep -E -q \$PACKAGE; then
|
|
||||||
mkdir "${CGAL_BINARY_DIR}/test/\${PACKAGE}"
|
|
||||||
cp -r "${CGAL_TEST_DIR}/\${PACKAGE}" '${CGAL_BINARY_DIR}/test'
|
|
||||||
elif [ "\$PACKAGE" = "resources" ]; then
|
|
||||||
mkdir "${CGAL_BINARY_DIR}/test/\${PACKAGE}"
|
|
||||||
cp -r "${CGAL_TEST_DIR}/\${PACKAGE}" '${CGAL_BINARY_DIR}/test'
|
|
||||||
else
|
|
||||||
mkdir "${CGAL_BINARY_DIR}/test/\${PACKAGE}"
|
|
||||||
touch "${CGAL_BINARY_DIR}/test/\${PACKAGE}/skipped"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
else
|
|
||||||
cp -r '${CGAL_TEST_DIR}' '${CGAL_BINARY_DIR}/test';
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd '${CGAL_BINARY_DIR}/test';
|
|
||||||
if [ -n "\${ULIMIT_OPTIONS}" ]; then
|
|
||||||
eval ulimit \${ULIMIT_OPTIONS};
|
|
||||||
else
|
|
||||||
[ -n "${ULIMIT_OPTIONS}" ] && ulimit ${ULIMIT_OPTIONS};
|
|
||||||
fi
|
|
||||||
nice ${NICE_OPTIONS} make ${MAKE_OPTS} -k -fmakefile2;
|
|
||||||
EOF
|
|
||||||
for file in "${CGAL_BINARY_DIR}/localtestscript" "${CGAL_BINARY_DIR}/localtestscript-redo-results-collection"; do
|
|
||||||
cat >> "$file" <<EOF
|
|
||||||
echo 'COLLECTING RESULTS';
|
|
||||||
./collect_cgal_testresults_from_cmake;
|
|
||||||
if [ -n "\$COLLECT_DEMOS_BINARIES" ]; then
|
|
||||||
echo 'COLLECTING DEMOS BINARIES';
|
|
||||||
echo "cp ${CGAL_TEST_DIR}/../developer_scripts/cgal_demo_copy_all_dlls_cygwin.sh ${CGAL_BINARY_DIR}/test"
|
|
||||||
cp "${CGAL_TEST_DIR}/../developer_scripts/cgal_demo_copy_all_dlls_cygwin.sh" "${CGAL_BINARY_DIR}/test"
|
|
||||||
EOF
|
|
||||||
cat >> "$file" <<'EOF'
|
|
||||||
for demo_dir in *_Demo; do
|
|
||||||
echo "pushd ${demo_dir}"
|
|
||||||
pushd "${demo_dir}"
|
|
||||||
bash ../cgal_demo_copy_all_dlls_cygwin.sh "${demo_dir}_with_dlls" ""
|
|
||||||
mv "${demo_dir}_with_dlls" ..
|
|
||||||
popd
|
|
||||||
done
|
|
||||||
EOF
|
|
||||||
cat >> "$file" <<EOF
|
|
||||||
tar czvf "${CGAL_TEST_DIR}/demos_${CGAL_TESTER}_${PLATFORM}.tar.gz" *_Demo_with_dlls/*
|
|
||||||
fi
|
|
||||||
echo 'COPYING RESULTS';
|
|
||||||
cp 'results_${CGAL_TESTER}_${PLATFORM}.tar.gz' 'results_${CGAL_TESTER}_${PLATFORM}.txt' '${CGAL_TEST_DIR}';
|
|
||||||
cd ..;
|
|
||||||
EOF
|
|
||||||
done
|
|
||||||
if [ -z "${KEEP_TESTS}" ]; then
|
|
||||||
cat >> "${CGAL_BINARY_DIR}/localtestscript" <<EOF
|
|
||||||
echo 'REMOVING LOCAL_TEST_DIR';
|
|
||||||
rm -rf '${CGAL_BINARY_DIR}/test'
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
chmod ugo+x "${CGAL_BINARY_DIR}"/localtestscript*
|
|
||||||
|
|
||||||
if [ -n "${SHOW_PROGRESS}" ]; then
|
|
||||||
remote_command ${HOST} "${CGAL_BINARY_DIR}/localtestscript" 2>&1 | tee "${ACTUAL_LOGFILE}.test.${PLATFORM}"
|
|
||||||
else
|
|
||||||
remote_command ${HOST} "${CGAL_BINARY_DIR}/localtestscript" > "${ACTUAL_LOGFILE}.test.${PLATFORM}" 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
log_done "${ACTUAL_LOGFILE}.test.${PLATFORM}"
|
|
||||||
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
publish_results()
|
|
||||||
{
|
|
||||||
HOST=${1}
|
|
||||||
PLATFORM=${2}
|
|
||||||
|
|
||||||
#
|
|
||||||
# collect results and put them on the web
|
|
||||||
#
|
|
||||||
cd "${CGAL_TEST_DIR}"
|
|
||||||
|
|
||||||
log "${ACTUAL_LOGFILE}.test.${PLATFORM}" "COLLECTING RESULTS ${PLATFORM}-${HOST}"
|
|
||||||
|
|
||||||
# If this file does not exist results collection failed. Fake a results so this fact is itself reported
|
|
||||||
if [ ! -f "results_${CGAL_TESTER}_${PLATFORM}.txt" ]; then
|
|
||||||
log "${ACTUAL_LOGFILE}.test.${PLATFORM}" "Results collection for tester ${CGAL_TESTER} and platform ${PLATFORM} failed!"
|
|
||||||
echo "Results collection failed!" >> "results_${CGAL_TESTER}_${PLATFORM}.txt"
|
|
||||||
${TAR} cf "results_${CGAL_TESTER}_${PLATFORM}.tar" "results_${CGAL_TESTER}_${PLATFORM}.txt"
|
|
||||||
${COMPRESSOR} -9f "results_${CGAL_TESTER}_${PLATFORM}.tar"
|
|
||||||
fi
|
|
||||||
|
|
||||||
${TAR} cf "test_results-${HOST}_${PLATFORM}.tar" "results_${CGAL_TESTER}_${PLATFORM}.tar.gz" "results_${CGAL_TESTER}_${PLATFORM}.txt"
|
|
||||||
${COMPRESSOR} -9f "test_results-${HOST}_${PLATFORM}.tar"
|
|
||||||
COMPILER=`printf "%s" "$2" | tr -c '[A-Za-z0-9]./[=-=]*_\'\''\":?() ' 'x'`
|
|
||||||
FILENAME="${CGAL_RELEASE_ID}_${CGAL_TESTER}-test`datestr`-${COMPILER}-cmake.tar.gz"
|
|
||||||
LOGFILENAME="${CGAL_RELEASE_ID}-log`datestr`-${HOST}.gz"
|
|
||||||
${COMPRESSOR} -9f "${ACTUAL_LOGFILE}.test.${PLATFORM}"
|
|
||||||
mv "${ACTUAL_LOGFILE}.test.${PLATFORM}.gz" "${LOGS_DIR}/${LOGFILENAME}"
|
|
||||||
|
|
||||||
log_done "${ACTUAL_LOGFILE}.test.${PLATFORM}"
|
|
||||||
|
|
||||||
log "${ACTUAL_LOGFILE}" "Test results: ${CGAL_TEST_DIR}/test_results-${HOST}_${PLATFORM}.tar.gz"
|
|
||||||
|
|
||||||
if [ -z "${DO_NOT_UPLOAD}" ]; then
|
|
||||||
log "${ACTUAL_LOGFILE}.test.${PLATFORM}" "PUTTING RESULTS ON THE WEB"
|
|
||||||
put_on_web "test_results-${HOST}_${PLATFORM}.tar.gz" "${FILENAME}"
|
|
||||||
if [ -e "demos_${CGAL_TESTER}_${PLATFORM}.tar.gz" ]; then
|
|
||||||
put_on_web "demos_${CGAL_TESTER}_${PLATFORM}.tar.gz" "demos-${FILENAME}"
|
|
||||||
fi
|
|
||||||
log_done "${ACTUAL_LOGFILE}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# notify the CGAL world
|
|
||||||
#
|
|
||||||
if [ ! "${MAIL_ADDRESS}" = "must_be_set_in_.autocgalrc" ]; then
|
|
||||||
for i in ${MAIL_ADDRESS}; do
|
|
||||||
echo "Notifying ${i} about autotest finished."
|
|
||||||
printf "result collection::\n${FILENAME}\n" | ${SENDMAIL} -s "autohandle" ${i}
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# Runs the test on the host $1
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
run_test_on_host()
|
|
||||||
{
|
|
||||||
HOST=${1}
|
|
||||||
|
|
||||||
PLATFORMS=`value_of COMPILERS_${HOST}`
|
|
||||||
|
|
||||||
if [ "${PLATFORMS}" = "all" ]; then
|
|
||||||
collect_all_current_platforms "${CGAL_BINARY_DIR_BASE}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
for PLATFORM in ${PLATFORMS}; do
|
|
||||||
run_test_on_host_and_platform "${HOST}" "${PLATFORM}"
|
|
||||||
publish_results "${HOST}" "${PLATFORM}"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# run the testsuites
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
run_test()
|
|
||||||
{
|
|
||||||
log "${ACTUAL_LOGFILE}" "running the testsuites"
|
|
||||||
if [ -n "${CONSOLE_OUTPUT}" ]; then
|
|
||||||
printf "\n-------------------------------------------------------\n"
|
|
||||||
fi
|
|
||||||
|
|
||||||
for HOST in ${BUILD_HOSTS}; do
|
|
||||||
run_test_on_host ${HOST} &
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
# function to put result files on the web
|
|
||||||
# $1 = source filename (full path)
|
|
||||||
# $2 = target filename (basename only)
|
|
||||||
# ----------------------------------------------------------------------------------------
|
|
||||||
put_on_web()
|
|
||||||
{
|
|
||||||
log "${ACTUAL_LOGFILE}" "Uploading results ${1} to $UPLOAD_RESULT_DESTINATION/$2"
|
|
||||||
|
|
||||||
"$SCP" "${1}" "$UPLOAD_RESULT_DESTINATION/$2" >> "${ACTUAL_LOGFILE}"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------
|
|
||||||
# START OF MAIN BODY
|
|
||||||
# ----------------------------------------------------
|
|
||||||
|
|
||||||
# Parse command line arguments
|
|
||||||
for arg in "$@"
|
|
||||||
do
|
|
||||||
case "$arg" in
|
|
||||||
"-c")
|
|
||||||
echo "Using latest unzipped release instead of getting a new one from the server"
|
|
||||||
USE_LATEST_UNZIPPED="y"
|
|
||||||
;;
|
|
||||||
"-l")
|
|
||||||
echo "Not uploading results to dashboard"
|
|
||||||
DO_NOT_UPLOAD="y"
|
|
||||||
;;
|
|
||||||
"-n")
|
|
||||||
# echo "No testsuite will be launched. Installation only."
|
|
||||||
DO_NOT_TEST="y"
|
|
||||||
;;
|
|
||||||
"-s")
|
|
||||||
echo "Showing progress."
|
|
||||||
SHOW_PROGRESS="y"
|
|
||||||
;;
|
|
||||||
"-k")
|
|
||||||
echo "Compiled test/ directory will be kept."
|
|
||||||
KEEP_TESTS="y"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
CGAL_LOCATION=$arg
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# Load settings
|
|
||||||
if [ -f "$HOME/.autocgal_with_cmake_rc" ]; then
|
|
||||||
. "$HOME/.autocgal_with_cmake_rc"
|
|
||||||
else
|
|
||||||
if [ -f "$HOME/.autocgalrc" ]; then
|
|
||||||
. "$HOME/.autocgalrc"
|
|
||||||
else
|
|
||||||
echo "CONFIGURATION FILE .autocgal_with_cmake_rc or .autocgalrc NOT FOUND" >&2;
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOGS_DIR="${CGAL_ROOT}/AUTOTEST_LOGS"
|
|
||||||
LOCK_FILE="${CGAL_ROOT}/autotest_cgal_with_cmake.lock"
|
|
||||||
LIST_TEST_PACKAGES="${CGAL_ROOT}/list_test_packages"
|
|
||||||
|
|
||||||
# Setup logfile
|
|
||||||
ACTUAL_LOGFILE="${CGAL_ROOT}/`basename ${0}`.log"
|
|
||||||
rm -f "${ACTUAL_LOGFILE}"
|
|
||||||
|
|
||||||
echo "Running `basename ${0}` "'$Revision$' >> "${ACTUAL_LOGFILE}"
|
|
||||||
|
|
||||||
# Sanity checks
|
|
||||||
if [ "${REFERENCE_PLATFORMS_DIR}" = "must_be_set_in_.autocgalrc" ]; then
|
|
||||||
error "REFERENCE_PLATFORMS_DIR must be set in .autocaglrc"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${BUILD_HOSTS}" = "must_be_set_in_.autocgalrc" ]; then
|
|
||||||
error "BUILD_HOSTS must be set in .autocgalrc"
|
|
||||||
else
|
|
||||||
for i in ${BUILD_HOSTS}; do
|
|
||||||
TEXT="`value_of COMPILERS_${i}`"
|
|
||||||
if [ -z "${TEXT}" -a "${i}" != "localhost" ]; then
|
|
||||||
error "COMPILERS_${i} must be defined in .autocgalrc"
|
|
||||||
else
|
|
||||||
TEXT="`value_of PROCESSORS_${i}`"
|
|
||||||
TEMPVAR="PROCESSORS_${i}"
|
|
||||||
if [ -z "${TEXT}" ]; then
|
|
||||||
log "${ACTUAL_LOGFILE}" "\ngiving default 1 values TO PROCESSORS_${i} ...";
|
|
||||||
eval $TEMPVAR="1";
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Make that file writable (lockfile create read-only files
|
|
||||||
chmod u+w "$LOCK_FILE"
|
|
||||||
# Put the PID of current process in the lock file
|
|
||||||
echo $$ > "$LOCK_FILE"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
# that line makes the script remove the lock file in case of unwanted exit
|
|
||||||
trap "rm -f \"$LOCK_FILE\"" EXIT HUP INT TERM
|
|
||||||
|
|
||||||
# Notify test started
|
|
||||||
if [ ! "${MAIL_ADDRESS}" = "must_be_set_in_.autocgalrc" ]; then
|
|
||||||
for i in ${MAIL_ADDRESS}; do
|
|
||||||
echo "Notifying ${i} about autotest started."
|
|
||||||
printf "subject says it all\n" | \
|
|
||||||
${SENDMAIL} -s "Started autotest" ${i}
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cd "$CGAL_ROOT"
|
|
||||||
|
|
||||||
# Starts the process
|
|
||||||
|
|
||||||
if [ -z "${USE_LATEST_UNZIPPED}" ]; then
|
|
||||||
if [ -z "$CGAL_LOCATION" ]; then
|
|
||||||
download_latest
|
|
||||||
abort_if_latest_already_tested
|
|
||||||
fi
|
|
||||||
get_cgal
|
|
||||||
unzip_cgal
|
|
||||||
fi
|
|
||||||
|
|
||||||
setup_dirs
|
|
||||||
|
|
||||||
copy_old_stuff
|
|
||||||
|
|
||||||
build_cgal
|
|
||||||
|
|
||||||
if [ "${BUILD_HOSTS}" = "localhost" ]; then
|
|
||||||
TEXT="`value_of COMPILERS_localhost`"
|
|
||||||
if [ -z "${DO_NOT_TEST}" ]; then
|
|
||||||
if [ -z "${TEXT}" ]; then
|
|
||||||
printf "Skipping testing phase (use the -n option to remove this message).\n"
|
|
||||||
DO_NOT_TEST="y"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${DO_NOT_TEST}" ]; then
|
|
||||||
run_test
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "${CGAL_ROOT}"
|
|
||||||
|
|
||||||
if [ -e "LATEST" ]; then
|
|
||||||
mv LATEST RELEASE_NR
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f "$LOCK_FILE";
|
|
||||||
|
|
||||||
# EOF
|
|
||||||
|
|
||||||
## Local Variables:
|
|
||||||
## sh-basic-offset: 2
|
|
||||||
## End:
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
exec ${0%_with_cmake} ${1+"$@"}
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#option :
|
#options:
|
||||||
# GIT_REPO the path to the Git repository, default is the current working directory
|
# GIT_REPO the path to the Git repository, default is the current working directory
|
||||||
# DESTINATION the path where the release is created, default is /tmp
|
# DESTINATION the path where the release is created, default is /tmp
|
||||||
# PUBLIC=[ON/OFF] indicates if a public release should be built, default is OFF
|
# PUBLIC=[ON/OFF] indicates if a public release should be built, default is OFF
|
||||||
|
|
@ -208,8 +208,7 @@ foreach(manpage ${MANPAGES})
|
||||||
configure_file(${GIT_REPO}/Installation/${manpage} ${release_dir}/${manpage} @ONLY)
|
configure_file(${GIT_REPO}/Installation/${manpage} ${release_dir}/${manpage} @ONLY)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# make an extra copy of examples and demos for the testsuite and generate
|
# make an extra copy of examples and demos for the testsuite
|
||||||
# create_cgal_test_with_cmake for tests, demos, and examples
|
|
||||||
if (TESTSUITE)
|
if (TESTSUITE)
|
||||||
SET(FMT_ARG "format:SCM branch:%n%H %d%n%nShort log from master:%n")
|
SET(FMT_ARG "format:SCM branch:%n%H %d%n%nShort log from master:%n")
|
||||||
execute_process(
|
execute_process(
|
||||||
|
|
@ -228,23 +227,6 @@ if (TESTSUITE)
|
||||||
#append result in .scm-branch
|
#append result in .scm-branch
|
||||||
file(APPEND ${release_dir}/.scm-branch "${OUT_VAR}")
|
file(APPEND ${release_dir}/.scm-branch "${OUT_VAR}")
|
||||||
|
|
||||||
file(GLOB tests RELATIVE "${release_dir}/test" "${release_dir}/test/*")
|
|
||||||
foreach(d ${tests})
|
|
||||||
if(IS_DIRECTORY "${release_dir}/test/${d}")
|
|
||||||
if(NOT EXISTS "${release_dir}/test/${d}/cgal_test_with_cmake")
|
|
||||||
execute_process(
|
|
||||||
COMMAND ${BASH} ${GIT_REPO}/Scripts/developer_scripts/create_cgal_test_with_cmake
|
|
||||||
WORKING_DIRECTORY "${release_dir}/test/${d}"
|
|
||||||
RESULT_VARIABLE RESULT_VAR
|
|
||||||
OUTPUT_VARIABLE OUT_VAR
|
|
||||||
)
|
|
||||||
if(NOT "${RESULT_VAR}" STREQUAL "0")
|
|
||||||
message(FATAL_ERROR "Error while running create_cgal_test_with_cmake in ${release_dir}/test/${d}")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
file(MAKE_DIRECTORY "${release_dir}/tmp")
|
file(MAKE_DIRECTORY "${release_dir}/tmp")
|
||||||
#copy demo/PKG to test/PKG_Demo
|
#copy demo/PKG to test/PKG_Demo
|
||||||
file(GLOB demos RELATIVE "${release_dir}/demo" "${release_dir}/demo/*")
|
file(GLOB demos RELATIVE "${release_dir}/demo" "${release_dir}/demo/*")
|
||||||
|
|
@ -257,17 +239,6 @@ if (TESTSUITE)
|
||||||
#do the copy in 2 pass since we cannot specify the target name
|
#do the copy in 2 pass since we cannot specify the target name
|
||||||
file(COPY "${release_dir}/demo/${d}" DESTINATION "${release_dir}/tmp")
|
file(COPY "${release_dir}/demo/${d}" DESTINATION "${release_dir}/tmp")
|
||||||
file(RENAME "${release_dir}/tmp/${d}" "${release_dir}/test/${d}_Demo")
|
file(RENAME "${release_dir}/tmp/${d}" "${release_dir}/test/${d}_Demo")
|
||||||
if(NOT EXISTS "${release_dir}/test/${d}_Demo/cgal_test_with_cmake")
|
|
||||||
execute_process(
|
|
||||||
COMMAND ${BASH} ${GIT_REPO}/Scripts/developer_scripts/create_cgal_test_with_cmake --no-run
|
|
||||||
WORKING_DIRECTORY "${release_dir}/test/${d}_Demo"
|
|
||||||
RESULT_VARIABLE RESULT_VAR
|
|
||||||
OUTPUT_VARIABLE OUT_VAR
|
|
||||||
)
|
|
||||||
if(NOT "${RESULT_VAR}" STREQUAL "0")
|
|
||||||
message(FATAL_ERROR "Error while running create_cgal_test_with_cmake in ${release_dir}/test/${d}_Demo")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
@ -278,17 +249,6 @@ if (TESTSUITE)
|
||||||
#do the copy in 2 pass since we cannot specify the target name
|
#do the copy in 2 pass since we cannot specify the target name
|
||||||
file(COPY "${release_dir}/examples/${d}" DESTINATION "${release_dir}/tmp")
|
file(COPY "${release_dir}/examples/${d}" DESTINATION "${release_dir}/tmp")
|
||||||
file(RENAME "${release_dir}/tmp/${d}" "${release_dir}/test/${d}_Examples")
|
file(RENAME "${release_dir}/tmp/${d}" "${release_dir}/test/${d}_Examples")
|
||||||
if(NOT EXISTS "${release_dir}/test/${d}_Examples/cgal_test_with_cmake")
|
|
||||||
execute_process(
|
|
||||||
COMMAND ${BASH} ${GIT_REPO}/Scripts/developer_scripts/create_cgal_test_with_cmake
|
|
||||||
WORKING_DIRECTORY "${release_dir}/test/${d}_Examples"
|
|
||||||
RESULT_VARIABLE RESULT_VAR
|
|
||||||
OUTPUT_VARIABLE OUT_VAR
|
|
||||||
)
|
|
||||||
if(NOT "${RESULT_VAR}" STREQUAL "0")
|
|
||||||
message(FATAL_ERROR "Error while running create_cgal_test_with_cmake in ${release_dir}/test/${d}_Examples")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
file(REMOVE_RECURSE "${release_dir}/tmp")
|
file(REMOVE_RECURSE "${release_dir}/tmp")
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
dir=${PWD%/*}
|
|
||||||
dir=${dir##*/}
|
|
||||||
|
|
||||||
if [ "x${dir}" = "xdemo" ]; then
|
|
||||||
in_demo="--no-run"
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ ! -e CMakeLists.txt ] && echo "No CMakeLists.txt in current directory, creating it" && cgal_create_cmake_script test
|
|
||||||
|
|
||||||
# If there is already a cgal_test_with_cmake script in the current directory, execute it.
|
|
||||||
[ ! -x cgal_test_with_cmake ] && echo "No cgal_test_with_cmake in current directory, creating it" && create_cgal_test_with_cmake ${in_demo}
|
|
||||||
|
|
||||||
./cgal_test_with_cmake $@
|
|
||||||
cat error.txt
|
|
||||||
|
|
@ -1,214 +0,0 @@
|
||||||
#! /bin/bash
|
|
||||||
#
|
|
||||||
# =============================================================================
|
|
||||||
# $URL: svn+ssh://fcacciola@scm.gforge.inria.fr/svn/cgal/trunk/Scripts/developer_scripts/create_cgal_test $
|
|
||||||
# $Id: create_cgal_test 36975 2007-03-09 22:52:40Z spion $
|
|
||||||
#
|
|
||||||
# author(s) : Wieger Wesselink, Geert-Jan Giezeman
|
|
||||||
#
|
|
||||||
# coordinator : Utrecht University
|
|
||||||
# =============================================================================
|
|
||||||
#
|
|
||||||
# This script creates a cgal_test_with_cmake script with entries for files with a common
|
|
||||||
# C++ file extension (as mentioned in the g++ man page) in the current test directory.
|
|
||||||
|
|
||||||
VERSION=1.1
|
|
||||||
|
|
||||||
DO_RUN="y"
|
|
||||||
|
|
||||||
usage()
|
|
||||||
{
|
|
||||||
echo 'Usage : create_cgal_test [--no-run]'
|
|
||||||
echo
|
|
||||||
echo ' --help : prints this usage help'
|
|
||||||
echo ' --no-run : produces a cgal_test_with_cmake script that only does compilation, no execution'
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
|
|
||||||
while [ $1 ]; do
|
|
||||||
case "$1" in
|
|
||||||
-h|-help|--h|--help)
|
|
||||||
usage;
|
|
||||||
;;
|
|
||||||
--no-run)
|
|
||||||
DO_RUN=""
|
|
||||||
shift; continue
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unknown option: $1"
|
|
||||||
usage
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
header()
|
|
||||||
{
|
|
||||||
echo "#---------------------------------------------------------------------#"
|
|
||||||
echo "# $1"
|
|
||||||
echo "#---------------------------------------------------------------------#"
|
|
||||||
}
|
|
||||||
|
|
||||||
create_script()
|
|
||||||
{
|
|
||||||
echo "#! /bin/sh"
|
|
||||||
echo
|
|
||||||
echo "# This is a script for the CGAL test suite. Such a script must obey"
|
|
||||||
echo "# the following rules:"
|
|
||||||
echo "#"
|
|
||||||
echo "# - the name of the script is cgal_test_with_cmake"
|
|
||||||
echo "# - for every target two one line messages are written to the file 'error.txt'"
|
|
||||||
echo "# the first one indicates if the compilation was successful"
|
|
||||||
echo "# the second one indicates if the execution was successful"
|
|
||||||
echo "# if one of the two was not successful, the line should start with 'ERROR:'"
|
|
||||||
echo "# - running the script should not require any user interaction"
|
|
||||||
echo "# - the script should clean up object files and executables"
|
|
||||||
echo
|
|
||||||
cat << EOF
|
|
||||||
ERRORFILE=error.txt
|
|
||||||
DO_RUN=${DO_RUN}
|
|
||||||
if [ -z "\${MAKE_CMD}" ]; then
|
|
||||||
MAKE_CMD=make
|
|
||||||
fi
|
|
||||||
NEED_CLEAN=
|
|
||||||
|
|
||||||
EOF
|
|
||||||
header "configure"
|
|
||||||
cat << 'EOF'
|
|
||||||
|
|
||||||
configure()
|
|
||||||
{
|
|
||||||
echo "Configuring... "
|
|
||||||
|
|
||||||
if eval 'cmake ${INIT_FILE:+"-C${INIT_FILE}"} -DRUNNING_CGAL_AUTO_TEST=TRUE \
|
|
||||||
-DCGAL_DIR="$CGAL_DIR" \
|
|
||||||
--no-warn-unused-cli \
|
|
||||||
.' ; then
|
|
||||||
|
|
||||||
echo " successful configuration" >> $ERRORFILE
|
|
||||||
else
|
|
||||||
echo " ERROR: configuration" >> $ERRORFILE
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
EOF
|
|
||||||
header "compile_and_run <target>"
|
|
||||||
cat << EOF
|
|
||||||
|
|
||||||
compile_and_run()
|
|
||||||
{
|
|
||||||
if [ -z "\${CGAL_DATA_DIR}" ]; then
|
|
||||||
if [ -d \${CGAL_DIR}/data ]; then
|
|
||||||
export CGAL_DATA_DIR=\${CGAL_DIR}/data
|
|
||||||
else
|
|
||||||
if [ -d \${CGAL_DIR}/Data/data ]; then
|
|
||||||
export CGAL_DATA_DIR=\${CGAL_DIR}/Data/data
|
|
||||||
else
|
|
||||||
echo "ERROR: Cannot run test script, please set the variable CGAL_DATA_DIR"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Runs will be using CGAL_DATA_DIR = \${CGAL_DATA_DIR}"
|
|
||||||
|
|
||||||
echo "Compiling \$1 ... "
|
|
||||||
SUCCESS="y"
|
|
||||||
|
|
||||||
if eval '"\${MAKE_CMD}" VERBOSE=ON -fMakefile \$1' ; then
|
|
||||||
echo " successful compilation of \$1" >> \$ERRORFILE
|
|
||||||
else
|
|
||||||
echo " ERROR: compilation of \$1" >> \$ERRORFILE
|
|
||||||
SUCCESS=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "\$DO_RUN" ] ; then
|
|
||||||
if [ -n "\${SUCCESS}" ] ; then
|
|
||||||
OUTPUTFILE=ProgramOutput.\$1.\$PLATFORM
|
|
||||||
rm -f \$OUTPUTFILE
|
|
||||||
COMMAND="./\$1"
|
|
||||||
if [ -f \$1.cmd ] ; then
|
|
||||||
COMMAND="\$COMMAND \`eval echo \$(cat \$1.cmd)\`"
|
|
||||||
fi
|
|
||||||
if [ -f \$1.cin ] ; then
|
|
||||||
COMMAND="cat \$1.cin | \$COMMAND"
|
|
||||||
fi
|
|
||||||
echo "Executing \$1 ... "
|
|
||||||
echo
|
|
||||||
ulimit -t 3600 2> /dev/null
|
|
||||||
if eval \$COMMAND > \$OUTPUTFILE 2>&1 ; then
|
|
||||||
echo " successful execution of \$1" >> \$ERRORFILE
|
|
||||||
else
|
|
||||||
echo " ERROR: execution of \$1" >> \$ERRORFILE
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo " ERROR: not executed \$1" >> \$ERRORFILE
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
EOF
|
|
||||||
header "remove the previous error file"
|
|
||||||
cat << EOF
|
|
||||||
|
|
||||||
rm -f \$ERRORFILE
|
|
||||||
touch \$ERRORFILE
|
|
||||||
|
|
||||||
EOF
|
|
||||||
header "configure, compile and run the tests"
|
|
||||||
cat << EOF
|
|
||||||
|
|
||||||
configure
|
|
||||||
|
|
||||||
if [ \$# -ne 0 ] ; then
|
|
||||||
for file in \$* ; do
|
|
||||||
compile_and_run \$file
|
|
||||||
done
|
|
||||||
else
|
|
||||||
echo "Run all tests."
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# workaround for Cygwin, to avoid that the 'sort' from
|
|
||||||
# C:\Windows\system32 is used instead of /usr/bin/sort
|
|
||||||
PATH=/usr/bin:$PATH
|
|
||||||
|
|
||||||
for file in `ls *.cc *.cp *.cxx *.cpp *.CPP *.c++ *.C 2> /dev/null | sort` ; do
|
|
||||||
if [ -n "`grep '\<main\>' $file`" ] ; then
|
|
||||||
BASE=`basename $file .cc`
|
|
||||||
BASE=`basename $BASE .cp`
|
|
||||||
BASE=`basename $BASE .cxx`
|
|
||||||
BASE=`basename $BASE .cpp`
|
|
||||||
BASE=`basename $BASE .CPP`
|
|
||||||
BASE=`basename $BASE .c++`
|
|
||||||
BASE=`basename $BASE .C`
|
|
||||||
cat <<EOF
|
|
||||||
if grep -qE "^${BASE}:" Makefile; then
|
|
||||||
compile_and_run $BASE
|
|
||||||
NEED_CLEAN=y
|
|
||||||
fi
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
cat << EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# The clean target generated by CMake under cygwin
|
|
||||||
# always fails for some reason
|
|
||||||
#
|
|
||||||
if [ -n "\${NEED_CLEAN}" ]; then
|
|
||||||
if ! ( uname | grep -q "CYGWIN" ) ; then
|
|
||||||
"\${MAKE_CMD}" -fMakefile clean
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
EOF
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -f cgal_test_with_cmake ] ; then
|
|
||||||
echo "moving cgal_test_with_cmake to cgal_test_with_cmake.bak ..."
|
|
||||||
mv -f cgal_test_with_cmake cgal_test_with_cmake.bak
|
|
||||||
fi
|
|
||||||
create_script > cgal_test_with_cmake
|
|
||||||
chmod 755 cgal_test_with_cmake
|
|
||||||
echo "created cgal_test_with_cmake, version $VERSION, in $PWD ..."
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
exec "${0%_with_cmake}" ${1+"$@"}
|
|
||||||
|
|
@ -1,650 +0,0 @@
|
||||||
#!/usr/bin/env perl
|
|
||||||
#this script generates the internal release
|
|
||||||
|
|
||||||
use warnings;
|
|
||||||
|
|
||||||
use Cwd;
|
|
||||||
use File::Find;
|
|
||||||
use Getopt::Std;
|
|
||||||
use File::Spec;
|
|
||||||
use File::Temp;
|
|
||||||
use Archive::Tar;
|
|
||||||
use Archive::Tar::File;
|
|
||||||
use File::Copy;
|
|
||||||
use File::Copy::Recursive qw(dircopy);
|
|
||||||
use File::Path qw(mkpath);
|
|
||||||
use POSIX qw(strftime);
|
|
||||||
|
|
||||||
$Getopt::Std::STANDARD_HELP_VERSION = 1;
|
|
||||||
|
|
||||||
package main;
|
|
||||||
local $VERSION='$Id$';
|
|
||||||
|
|
||||||
sub HELP_MESSAGE() {
|
|
||||||
usage()
|
|
||||||
}
|
|
||||||
|
|
||||||
sub usage() {
|
|
||||||
print STDERR<<"EOF";
|
|
||||||
usage:
|
|
||||||
$0 (-h|-r)
|
|
||||||
[-n version number]
|
|
||||||
[-d releasedir] [-a allpackagesdir]
|
|
||||||
[-c candidatesdir]
|
|
||||||
[-l lockfile]
|
|
||||||
|
|
||||||
Exactly one of the options -h or -r must be present.
|
|
||||||
-h show this message and quit
|
|
||||||
-r release version to be created
|
|
||||||
|
|
||||||
-n version number (CGAL_VERSION_NR)
|
|
||||||
-d releasedir, default releasedir is the current dir
|
|
||||||
-a allpackagesdir, default is releasedir/trunk
|
|
||||||
-c candidatesdir
|
|
||||||
-l lockfile, default is releasedir/release_creation.lock
|
|
||||||
|
|
||||||
The version number is stored in VERSION and include/CGAL/version.h.
|
|
||||||
The RELEASEDIR is the place where the new release will be created.
|
|
||||||
The ALLPACKAGESDIR is the directory that contains the checked out packages
|
|
||||||
from the SCM. Could be trunk or some branch.
|
|
||||||
The LOCKFILE is some file used by lockfile command as a mutex.
|
|
||||||
|
|
||||||
Example of how to use the script:
|
|
||||||
>svn co svn+ssh://scm.gforge.inria.fr/svn/cgal/trunk
|
|
||||||
>./create_internal_release -r CGAL-3.3-I-1
|
|
||||||
or
|
|
||||||
>./create_internal_release -r CGAL-3.3-I-7 -d \$HOME -a \$HOME/CGALSVN/trunk -l release_creation.lock
|
|
||||||
|
|
||||||
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
my $TEMPFILE="TEMPFILE.$$";
|
|
||||||
|
|
||||||
#----------------------------------------------------#
|
|
||||||
# initialization #
|
|
||||||
#----------------------------------------------------#
|
|
||||||
|
|
||||||
my (
|
|
||||||
$VERSION,
|
|
||||||
$VERSION_NR,
|
|
||||||
$LOCKFILE,
|
|
||||||
$ALLPACKAGESDIR,
|
|
||||||
$CANDIDATESDIR,
|
|
||||||
$RELEASEDIR,
|
|
||||||
$MAINDIR,
|
|
||||||
$SCRIPTSDIR,
|
|
||||||
$DEVELSCRIPTSDIR,
|
|
||||||
$LOCKCMD,
|
|
||||||
# 'files' is an associative array (hash table in perl language) that maps
|
|
||||||
# from files names (relative to CGAL_DIR) to the name of the package that
|
|
||||||
# provided it.
|
|
||||||
%files,
|
|
||||||
# 'LISTOFALLPACKAGES' is an associative array that maps from packages names
|
|
||||||
# to the full path of the working copy that provided it.
|
|
||||||
%LISTOFALLPACKAGES
|
|
||||||
);
|
|
||||||
|
|
||||||
%LISTOFALLPACKAGES = ();
|
|
||||||
|
|
||||||
sub termination_signal_handler {
|
|
||||||
unlink $LOCKFILE;
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub lock()
|
|
||||||
{
|
|
||||||
if (system("$LOCKCMD", "-r", '10', "$LOCKFILE") != 0) {
|
|
||||||
print STDERR <<"TOTHIER";
|
|
||||||
The script could not proceed because
|
|
||||||
it could not acquire the needed lock on file $LOCKFILE.
|
|
||||||
TOTHIER
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
$SIG{QUIT} = \&termination_signal_handler;
|
|
||||||
$SIG{HUP} = \&termination_signal_handler;
|
|
||||||
$SIG{INT} = \&termination_signal_handler;
|
|
||||||
$SIG{TERM} = \&termination_signal_handler;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub unlock()
|
|
||||||
{
|
|
||||||
unlink $LOCKFILE;
|
|
||||||
$SIG{QUIT} = 'DEFAULT';
|
|
||||||
$SIG{HUP} = 'DEFAULT';
|
|
||||||
$SIG{INT} = 'DEFAULT';
|
|
||||||
$SIG{TERM} = 'DEFAULT';
|
|
||||||
}
|
|
||||||
|
|
||||||
sub add_one_package($) {
|
|
||||||
my ($package) = @_;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub list_packages($) {
|
|
||||||
my ($packages_directory) = @_;
|
|
||||||
opendir PACKAGESDIR, $packages_directory or die;
|
|
||||||
while (defined($package_name = readdir(PACKAGESDIR))) {
|
|
||||||
my $package_full_path = File::Spec->catdir($packages_directory, $package_name);
|
|
||||||
next if $package_name =~ /^\..*$/;
|
|
||||||
next if (! -d $package_full_path );
|
|
||||||
next if ($package_full_path =~ /Maintenance$/); # skip Maintenance package
|
|
||||||
$LISTOFALLPACKAGES{$package_name} = $packages_directory;
|
|
||||||
}
|
|
||||||
closedir(PACKAGESDIR);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub install_packages() {
|
|
||||||
my ($filename, $direc, $tmp_package_name);
|
|
||||||
print "Installing packages ...\n";
|
|
||||||
chdir $RELEASEDIR or die;
|
|
||||||
|
|
||||||
if( ! open(LOG_CONFLICTS, ">>&=3") ) {
|
|
||||||
open(LOG_CONFLICTS, ">&", STDOUT) or die;
|
|
||||||
}
|
|
||||||
foreach my $package_name (keys(%LISTOFALLPACKAGES)) {
|
|
||||||
my $package_comes_from = $LISTOFALLPACKAGES{$package_name};
|
|
||||||
my $package_full_path = File::Spec->catdir($package_comes_from, $package_name);
|
|
||||||
$dont_submit="$package_full_path/dont_submit";
|
|
||||||
chdir "$package_comes_from" or die;
|
|
||||||
@command = ('tar', '-cf', "$RELEASEDIR/temppack.tar", '--exclude=.svn');
|
|
||||||
# comment for later: once the tar version installed on
|
|
||||||
# cgal.geometryfactory.com knows the option --exclude-vcs, use that
|
|
||||||
# option instead of --exclude=.svn
|
|
||||||
# -- Laurent Rineau, 2009/12/04 (idea by Sylvain Pion)
|
|
||||||
if( -f $dont_submit ) {
|
|
||||||
@command = (@command, "--exclude-from=$dont_submit");
|
|
||||||
}
|
|
||||||
@command = (@command, @global_dont_submit_tar_options);
|
|
||||||
@command = (@command, "-C", "$package_name", ".");
|
|
||||||
foreach( @command ) {
|
|
||||||
print "$_ ";
|
|
||||||
}
|
|
||||||
print "\n";
|
|
||||||
system(@command);
|
|
||||||
|
|
||||||
# generate the list of header file per package that not in an internal subdirectory. Files start with CGAL
|
|
||||||
$tempdir = File::Temp->newdir();
|
|
||||||
if ( -d "$package_full_path/include" ) {
|
|
||||||
@filelistcmd = ('tar', '-tf', "$RELEASEDIR/temppack.tar", '--wildcards', "./include/\*\*.h",
|
|
||||||
"--transform=s/.\\\/include\\\///", '--show-transformed-names',
|
|
||||||
'--exclude=**/internal', "--index-file=$tempdir/$package_name.txt");
|
|
||||||
system(@filelistcmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
move("$RELEASEDIR/temppack.tar", "$RELEASEDIR/$VERSION/");
|
|
||||||
|
|
||||||
chdir "$RELEASEDIR/$VERSION" or die;
|
|
||||||
my $tar = Archive::Tar->new;
|
|
||||||
open my $TARFILL, "$RELEASEDIR/$VERSION/temppack.tar" or die;
|
|
||||||
if(! $tar->read($TARFILL)) {
|
|
||||||
unlink 'temppack.tar';
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
for( $tar->get_files() )
|
|
||||||
{
|
|
||||||
my $filename = $_->name();
|
|
||||||
if( ! $_->is_dir() )
|
|
||||||
{
|
|
||||||
if(exists($files{$_->name()}))
|
|
||||||
{
|
|
||||||
print LOG_CONFLICTS "File ", $_->name(), " from package ", $package_name;
|
|
||||||
print LOG_CONFLICTS " conflicts with one from package ", $files{$_->name()}. "\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$files{$_->name()} = $package_name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else { # is_dir() returned true
|
|
||||||
next if ($filename !~ /^\.\/?$/) and ($filename =~ /^\.\.?\/?$/);
|
|
||||||
my $package_from_from = $LISTOFALLPACKAGES{$package_name};
|
|
||||||
mkpath($filename);
|
|
||||||
# system("svn info $package_comes_from/$package_name/$filename | grep URL >> $filename/.scm-urls\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
system('tar', '-xf', "temppack.tar");
|
|
||||||
if ( -e "$tempdir/$package_name.txt" ) {
|
|
||||||
if ( -d "$RELEASEDIR/$VERSION/doc/$package_name/" ) {
|
|
||||||
system("mv", ,"$tempdir/$package_name.txt", "$RELEASEDIR/$VERSION/doc/$package_name/filelist.txt");
|
|
||||||
} else {
|
|
||||||
system("rm", ,"$tempdir/$package_name.txt");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# $tmp_package_name = "temp_${package_name}";
|
|
||||||
# system("mv", "$package_name", "$tmp_package_name");
|
|
||||||
# opendir packagename, "$tmp_package_name";
|
|
||||||
# @fichiers = readdir packagename;
|
|
||||||
# closedir packagename;
|
|
||||||
# #shift @fichiers; shift @fichiers;
|
|
||||||
# foreach $fichier (@fichiers){
|
|
||||||
# if ($fichier ne '.' && $fichier ne '..'){
|
|
||||||
# system('cp', '-r', "$tmp_package_name/$fichier", "$RELEASEDIR/$VERSION");
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# system('rm', '-rf', "$tmp_package_name");
|
|
||||||
}
|
|
||||||
close(LOG_CONFLICTS);
|
|
||||||
unlink 'temppack.tar';
|
|
||||||
( -d "$ALLPACKAGESDIR/.git" ) && system("git --git-dir=$ALLPACKAGESDIR/.git --work-tree=$ALLPACKAGESDIR log -n1 '--format=format:SCM branch:%n%H %d%n%nShort log from master:%n' > .scm-branch");
|
|
||||||
( -d "$ALLPACKAGESDIR/.git" ) && system("git --git-dir=$ALLPACKAGESDIR/.git --work-tree=$ALLPACKAGESDIR log --first-parent --format='%h %s%n parents: %p%n' cgal/master.. >> .scm-branch");
|
|
||||||
# foreach my $file (sort keys(%files)) {
|
|
||||||
# print "$files{$file}: $file\n";
|
|
||||||
# }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------#
|
|
||||||
# set the version information in VERSION and include/CGAL/version.h #
|
|
||||||
#-----------------------------------------------------------------------#
|
|
||||||
|
|
||||||
sub create_version_file()
|
|
||||||
{
|
|
||||||
#if VERSION starts with CGAL-, we remove "CGAL-" from version
|
|
||||||
#the $newver variable will store the right version
|
|
||||||
if ($VERSION =~ /CGAL-(.*)/) {
|
|
||||||
$newver = $1;
|
|
||||||
} else {
|
|
||||||
$newver = $VERSION;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Create VERSION file
|
|
||||||
chdir "$RELEASEDIR/$VERSION" or die;
|
|
||||||
open(TEMPFILE, ">tempfile") or die;
|
|
||||||
print TEMPFILE "$newver";
|
|
||||||
close TEMPFILE || die "Error closing temporary file: $!\n";
|
|
||||||
move("tempfile", 'VERSION');
|
|
||||||
|
|
||||||
# Create include/CGAL/version.h file
|
|
||||||
chdir "$RELEASEDIR/$VERSION/include/CGAL" or die;
|
|
||||||
open(TEMPFILE, ">tempfile") or die;
|
|
||||||
|
|
||||||
my $RELEASE_DATE = strftime "%Y%m%d", localtime;
|
|
||||||
# TODO : add `svnversion` Revision.
|
|
||||||
|
|
||||||
print TEMPFILE << 'EOF';
|
|
||||||
// Copyright (c) 2006 Utrecht University (The Netherlands),
|
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation; either version 3 of the License,
|
|
||||||
// or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// Licensees holding a valid commercial license may use this file in
|
|
||||||
// accordance with the commercial license agreement provided with the software.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
||||||
//
|
|
||||||
// Author(s) : -
|
|
||||||
|
|
||||||
// This file is automatically created by create_internal_release.
|
|
||||||
// Do not edit manually.
|
|
||||||
|
|
||||||
#ifndef CGAL_VERSION_H
|
|
||||||
#define CGAL_VERSION_H
|
|
||||||
|
|
||||||
#define CGAL_xstr(s) #s
|
|
||||||
#define CGAL_str(s) CGAL_xstr(s)
|
|
||||||
|
|
||||||
EOF
|
|
||||||
print TEMPFILE "#define CGAL_VERSION $newver\n";
|
|
||||||
print TEMPFILE "#define CGAL_VERSION_NR $VERSION_NR\n";
|
|
||||||
print TEMPFILE "#define CGAL_SVN_REVISION 0\n";
|
|
||||||
print TEMPFILE "#define CGAL_GIT_HASH 0\n";
|
|
||||||
print TEMPFILE "#define CGAL_RELEASE_DATE $RELEASE_DATE\n";
|
|
||||||
|
|
||||||
print TEMPFILE << 'EOF';
|
|
||||||
#define CGAL_VERSION_STR CGAL_str(CGAL_VERSION)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
EOF
|
|
||||||
|
|
||||||
close TEMPFILE || die "Error closing temporary file: $!\n";
|
|
||||||
move("tempfile", 'version.h');
|
|
||||||
chdir '../..' or die;
|
|
||||||
}
|
|
||||||
|
|
||||||
#---------------------------------------------------------------#
|
|
||||||
# CreateExampleTestDirs
|
|
||||||
#---------------------------------------------------------------#
|
|
||||||
|
|
||||||
sub CreateExampleTestDirs()
|
|
||||||
{
|
|
||||||
my $DIR;
|
|
||||||
chdir "$RELEASEDIR/$VERSION" or die;
|
|
||||||
chdir 'examples' or return;
|
|
||||||
print "Creating $VERSION/test/example directories ...\n";
|
|
||||||
foreach $DIR (glob("*")) {
|
|
||||||
if ( -d $DIR ) {
|
|
||||||
print "Creating test/${DIR}_Examples ...\n";
|
|
||||||
dircopy("$DIR", "../test/${DIR}_Examples");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
chdir '..';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------------------------#
|
|
||||||
# CreateDemoTestDirs
|
|
||||||
#---------------------------------------------------------------#
|
|
||||||
|
|
||||||
sub CreateDemoTestDirs()
|
|
||||||
{
|
|
||||||
my $DIR;
|
|
||||||
chdir "$RELEASEDIR/$VERSION" or die;
|
|
||||||
chdir 'demo' or return;
|
|
||||||
print "Creating $VERSION/test/demo directories ...\n";
|
|
||||||
foreach $DIR (glob("*")) {
|
|
||||||
if ( -d $DIR) {
|
|
||||||
if( ("$DIR" ne "icons") && ("$DIR" ne "resources") ) {
|
|
||||||
print "Creating test/${DIR}_Demo ...\n";
|
|
||||||
dircopy("$DIR", "../test/${DIR}_Demo");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
print "Creating test/${DIR}...\n";
|
|
||||||
dircopy("$DIR", "../test/${DIR}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
chdir '..';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------------------------#
|
|
||||||
# make_testscripts and generate makefiles in test and examples
|
|
||||||
#---------------------------------------------------------------#
|
|
||||||
|
|
||||||
sub make_testscripts()
|
|
||||||
{
|
|
||||||
my ($DIR, $BASEDIR);
|
|
||||||
chdir "$RELEASEDIR/$VERSION" or die;
|
|
||||||
$BASEDIR = cwd();
|
|
||||||
print "Creating and checking makefiles ...\n";
|
|
||||||
|
|
||||||
chdir 'test';
|
|
||||||
foreach $DIR (glob("*")) {
|
|
||||||
if ( (-d $DIR) && ("$DIR" ne "icons") && ("$DIR" ne "resources") ) {
|
|
||||||
chdir $DIR;
|
|
||||||
if ( -f 'Makefile') {
|
|
||||||
rename 'Makefile', 'makefile';
|
|
||||||
}
|
|
||||||
if ( -f 'makefile' ) {
|
|
||||||
open MAKEFILE, "makefile";
|
|
||||||
open NEW_MAKEFILE, ">makefile.new";
|
|
||||||
while (<MAKEFILE>) {
|
|
||||||
s/\.o\b/\$(OBJ_EXT)/g;
|
|
||||||
s/-g\b/\$(DEBUG_OPT)/g;
|
|
||||||
print NEW_MAKEFILE $_;
|
|
||||||
}
|
|
||||||
close NEW_MAKEFILE;
|
|
||||||
close MAKEFILE;
|
|
||||||
rename("makefile.new","makefile");
|
|
||||||
} else {
|
|
||||||
my $options = '-t';
|
|
||||||
if ( -f 'cgal_create_makefile_options') {
|
|
||||||
if (open(OPTIONS, "<cgal_create_makefile_options")) {
|
|
||||||
$_ = <OPTIONS>;
|
|
||||||
chomp;
|
|
||||||
if (/^[\w\s-]+$/) { $options = $_;
|
|
||||||
} else {
|
|
||||||
print STDERR "Rejected cgal_create_makefile_options in $DIR\n";
|
|
||||||
}
|
|
||||||
close OPTIONS;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
system("$SCRIPTSDIR/cgal_create_makefile", $options) == 0 or die "Execution of $SCRIPTSDIR/cgal_create_makefile failed";
|
|
||||||
}
|
|
||||||
if ( ! -f 'cgal_test' ) {
|
|
||||||
$_ = $DIR;
|
|
||||||
# chomp;
|
|
||||||
if (/_Demo$/) {
|
|
||||||
system("$DEVELSCRIPTSDIR/create_cgal_test", "--no-run") == 0 or die "Execution of $DEVELSCRIPTSDIR/create_cgal_test --no-run failed";
|
|
||||||
} else {
|
|
||||||
system("$DEVELSCRIPTSDIR/create_cgal_test") == 0 or die "Execution of $DEVELSCRIPTSDIR/create_cgal_test failed";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
chdir '..';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
chdir $BASEDIR;
|
|
||||||
chdir 'examples';
|
|
||||||
|
|
||||||
print "Creating makefiles in examples\n";
|
|
||||||
foreach $DIR (glob("*")) {
|
|
||||||
if ( -d $DIR ) {
|
|
||||||
chdir $DIR;
|
|
||||||
if ( -f 'Makefile') {
|
|
||||||
rename 'Makefile', 'makefile';
|
|
||||||
}
|
|
||||||
if ( -f 'makefile' ) {
|
|
||||||
open MAKEFILE, "makefile";
|
|
||||||
open NEW_MAKEFILE, ">makefile.new";
|
|
||||||
while (<MAKEFILE>) {
|
|
||||||
s/\.o\b/\$(OBJ_EXT)/g;
|
|
||||||
s/-g\b/\$(DEBUG_OPT)/g;
|
|
||||||
print NEW_MAKEFILE $_;
|
|
||||||
}
|
|
||||||
close NEW_MAKEFILE;
|
|
||||||
close MAKEFILE;
|
|
||||||
rename("makefile.new","makefile");
|
|
||||||
} else {
|
|
||||||
my $options = '-d';
|
|
||||||
if ( -f 'cgal_create_makefile_options') {
|
|
||||||
if (open(OPTIONS, "<cgal_create_makefile_options")) {
|
|
||||||
$_ = <OPTIONS>;
|
|
||||||
chomp;
|
|
||||||
if (/^[\w\s-]+$/) { $options = $_;
|
|
||||||
} else {
|
|
||||||
print STDERR "Rejected cgal_create_makefile_options in $DIR\n";
|
|
||||||
}
|
|
||||||
close OPTIONS;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
system("$SCRIPTSDIR/cgal_create_makefile", $options) == 0 or die "Execution of $SCRIPTSDIR/cgal_create_makefile failed";
|
|
||||||
}
|
|
||||||
chdir '..';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
chdir $BASEDIR;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------------------------#
|
|
||||||
# Generates a CMakeLists.txt in every subdirectory
|
|
||||||
# of the current directory if none already exists
|
|
||||||
#---------------------------------------------------------------#
|
|
||||||
|
|
||||||
sub generate_cmake_scripts
|
|
||||||
{
|
|
||||||
my $options = $_[0];
|
|
||||||
|
|
||||||
foreach $DIR (glob("*"))
|
|
||||||
{
|
|
||||||
if ( (-d $DIR) && ("$DIR" ne "icons") && ("$DIR" ne "resources") )
|
|
||||||
{
|
|
||||||
chdir $DIR;
|
|
||||||
|
|
||||||
if ( ! -f 'CMakeLists.txt' )
|
|
||||||
{
|
|
||||||
$_ = $DIR;
|
|
||||||
|
|
||||||
if ( -f 'cgal_create_cmake_script_options')
|
|
||||||
{
|
|
||||||
if (open(OPTIONS, "<cgal_create_cmake_script_options"))
|
|
||||||
{
|
|
||||||
$_ = <OPTIONS>;
|
|
||||||
chomp;
|
|
||||||
if (/^[\w\s-]+$/)
|
|
||||||
{
|
|
||||||
$options = $_;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print STDERR "Rejected cgal_create_cmake_script_options in $DIR\n";
|
|
||||||
}
|
|
||||||
close OPTIONS;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
system("\"$SCRIPTSDIR/cgal_create_cmake_script\" $options") == 0 or die "Execution of \"$SCRIPTSDIR/cgal_create_cmake_script $options\" failed";
|
|
||||||
}
|
|
||||||
|
|
||||||
chdir '..';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sub generate_cgal_test_with_cmake
|
|
||||||
{
|
|
||||||
foreach $DIR (glob("*"))
|
|
||||||
{
|
|
||||||
if ( (-d $DIR) && ("$DIR" ne "icons") && ("$DIR" ne "resources") )
|
|
||||||
{
|
|
||||||
chdir $DIR;
|
|
||||||
if ( ! -f 'cgal_test_with_cmake' )
|
|
||||||
{
|
|
||||||
$_ = $DIR;
|
|
||||||
my $options = (/_Demo$/) ? '--no-run' : '' ;
|
|
||||||
|
|
||||||
system("$DEVELSCRIPTSDIR/create_cgal_test_with_cmake", $options) == 0 or die "Execution of $DEVELSCRIPTSDIR/create_cgal_test_with_cmake $options failed in directory $DIR";
|
|
||||||
}
|
|
||||||
chdir '..';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sub make_testscripts_for_cmake
|
|
||||||
{
|
|
||||||
my ($DIR, $BASEDIR);
|
|
||||||
chdir "$RELEASEDIR/$VERSION" or die;
|
|
||||||
$BASEDIR = cwd();
|
|
||||||
|
|
||||||
chdir 'test';
|
|
||||||
|
|
||||||
print "Creating test scripts\n";
|
|
||||||
generate_cgal_test_with_cmake();
|
|
||||||
|
|
||||||
print "Creating cmake scripts in test\n";
|
|
||||||
generate_cmake_scripts('test');
|
|
||||||
|
|
||||||
chdir $BASEDIR;
|
|
||||||
chdir 'examples';
|
|
||||||
|
|
||||||
print "Creating cmake scripts in examples\n";
|
|
||||||
generate_cmake_scripts('example');
|
|
||||||
|
|
||||||
chdir $BASEDIR;
|
|
||||||
chdir 'demo';
|
|
||||||
|
|
||||||
print "Creating cmake scripts in demo\n";
|
|
||||||
generate_cmake_scripts('demo');
|
|
||||||
|
|
||||||
chdir $BASEDIR;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------#
|
|
||||||
# Main entry point #
|
|
||||||
#----------------------------------------------------#
|
|
||||||
|
|
||||||
|
|
||||||
sub main(){
|
|
||||||
|
|
||||||
$RELEASEDIR=cwd();
|
|
||||||
$ALLPACKAGESDIR="$RELEASEDIR/trunk";
|
|
||||||
$LOCKFILE="$RELEASEDIR/release_creation.lock";
|
|
||||||
$LOCKCMD='lockfile';
|
|
||||||
|
|
||||||
our ($opt_h, $opt_r, $opt_a, $opt_c, $opt_d, $opt_l, $opt_p, $opt_s, $opt_n);
|
|
||||||
|
|
||||||
if(! getopts('hr:a:c:d:l:p:s:n:') || $::opt_h ) {
|
|
||||||
usage();
|
|
||||||
die "\n";
|
|
||||||
}
|
|
||||||
if ($::opt_d){
|
|
||||||
$RELEASEDIR = $::opt_d;
|
|
||||||
$ALLPACKAGESDIR = "$RELEASEDIR/trunk";
|
|
||||||
$LOCKFILE="$RELEASEDIR/release_creation.lock";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($::opt_r){
|
|
||||||
$VERSION = $::opt_r;
|
|
||||||
if ($::opt_n){
|
|
||||||
$VERSION_NR = $::opt_n;
|
|
||||||
} else {
|
|
||||||
$VERSION_NR = $VERSION;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
usage();
|
|
||||||
die "\n";
|
|
||||||
}
|
|
||||||
if ($::opt_a){
|
|
||||||
$ALLPACKAGESDIR = File::Spec->rel2abs( $::opt_a ) ;
|
|
||||||
}
|
|
||||||
if ($::opt_c){
|
|
||||||
$CANDIDATESDIR = File::Spec->rel2abs( $::opt_c ) ;
|
|
||||||
}
|
|
||||||
if ($::opt_l){
|
|
||||||
$LOCKFILE = $::opt_l;
|
|
||||||
}
|
|
||||||
$SCRIPTSDIR="$ALLPACKAGESDIR/Scripts/scripts";
|
|
||||||
$DEVELSCRIPTSDIR="$ALLPACKAGESDIR/Scripts/developer_scripts";
|
|
||||||
$global_dont_submit="$ALLPACKAGESDIR/Maintenance/release_building/global_dont_submit";
|
|
||||||
@global_dont_submit_tar_options = ();
|
|
||||||
if (open(GLOBAL_DONT_SUBMIT, "<", $global_dont_submit) ) {
|
|
||||||
while(<GLOBAL_DONT_SUBMIT>) {
|
|
||||||
chomp;
|
|
||||||
@global_dont_submit_tar_options = (@global_dont_submit_tar_options, "--exclude=$_");
|
|
||||||
}
|
|
||||||
close(GLOBAL_DONT_SUBMIT);
|
|
||||||
}
|
|
||||||
print "Initializing variables ...\n";
|
|
||||||
print " Release dir: $RELEASEDIR\n";
|
|
||||||
print " All packages dir: $ALLPACKAGESDIR\n";
|
|
||||||
if($CANDIDATESDIR) {
|
|
||||||
print " Candidates packages dir: $CANDIDATESDIR\n";
|
|
||||||
}
|
|
||||||
print " Scripts dir: $SCRIPTSDIR\n";
|
|
||||||
print " Developer Scripts dir: $DEVELSCRIPTSDIR\n";
|
|
||||||
print " Lockfile: $LOCKFILE\n";
|
|
||||||
umask(002);
|
|
||||||
chdir $RELEASEDIR or die;
|
|
||||||
if (! -d $VERSION){
|
|
||||||
print "Creating release directory ${VERSION} ...\n";
|
|
||||||
mkdir($VERSION, 0775);
|
|
||||||
} else {
|
|
||||||
print "$VERSION already exists in $RELEASEDIR\n";
|
|
||||||
print "Please remove it first\n";
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
lock;
|
|
||||||
|
|
||||||
list_packages($ALLPACKAGESDIR);
|
|
||||||
if($CANDIDATESDIR) {
|
|
||||||
list_packages($CANDIDATESDIR);
|
|
||||||
}
|
|
||||||
install_packages();
|
|
||||||
|
|
||||||
CreateDemoTestDirs();
|
|
||||||
CreateExampleTestDirs();
|
|
||||||
create_version_file();
|
|
||||||
#make_testscripts();
|
|
||||||
make_testscripts_for_cmake();
|
|
||||||
|
|
||||||
unlock;
|
|
||||||
}
|
|
||||||
|
|
||||||
main();
|
|
||||||
|
|
||||||
# Set the indent level of perl-mode, in Emacs.
|
|
||||||
# For that file it is mostly 2, so let's choose 2.
|
|
||||||
### Local Variables:
|
|
||||||
### perl-indent-level: 2
|
|
||||||
### End:
|
|
||||||
|
|
@ -4,14 +4,6 @@
|
||||||
#
|
#
|
||||||
# Radu Ursu, Sylvain Pion, 2004-2006.
|
# Radu Ursu, Sylvain Pion, 2004-2006.
|
||||||
|
|
||||||
# TODO :
|
|
||||||
# - Cleanup the public/internal separation:
|
|
||||||
# - have CGAL_VERSION_NR be not affected by the internal version
|
|
||||||
# - have CGAL_REVISION be the revision (replacing the internal number)
|
|
||||||
# - The public release case should pass the info to create_internal_release.
|
|
||||||
# [new] : create_internal_release should not know about internal/public mode.
|
|
||||||
# - Merge [some parts] into ./create_internal_release ?
|
|
||||||
|
|
||||||
DO_PUBLIC="" # Also build the public versions
|
DO_PUBLIC="" # Also build the public versions
|
||||||
DO_IT="" # Real mode (copy to HTTP server), versus local testing
|
DO_IT="" # Real mode (copy to HTTP server), versus local testing
|
||||||
DO_NOT_TAG="" # If set, do not call tag
|
DO_NOT_TAG="" # If set, do not call tag
|
||||||
|
|
|
||||||
|
|
@ -1,77 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
#To run: $1 = name of the user
|
|
||||||
# $2 = name of the branch
|
|
||||||
# $3 = base ref name (master, 5.1.x, 5.2.x, etc...)
|
|
||||||
# $4 = number of the PR
|
|
||||||
|
|
||||||
|
|
||||||
if uname | grep -q -i cygwin; then
|
|
||||||
#Is supposed to ignore \r as eol character.
|
|
||||||
export SHELLOPTS
|
|
||||||
set -o igncr
|
|
||||||
fi
|
|
||||||
source ~/.autofilterrc
|
|
||||||
(
|
|
||||||
USER_REPO=$1
|
|
||||||
BRANCH_NAME=$2
|
|
||||||
BASE_NAME=$3
|
|
||||||
PR_NUMBER=$4
|
|
||||||
|
|
||||||
|
|
||||||
cd ${CGAL_GIT_DIR}
|
|
||||||
if [ ! -d cgal ]; then
|
|
||||||
git clone https://github.com/CGAL/cgal.git
|
|
||||||
cd cgal
|
|
||||||
git remote rename origin cgal
|
|
||||||
cd ..
|
|
||||||
fi
|
|
||||||
cd cgal
|
|
||||||
git fetch cgal
|
|
||||||
git remote add $USER_REPO https://github.com/$USER_REPO/cgal.git
|
|
||||||
git fetch $USER_REPO
|
|
||||||
git checkout $BRANCH_NAME
|
|
||||||
git reset --hard $USER_REPO/$BRANCH_NAME
|
|
||||||
#setup the list_test_packages
|
|
||||||
TMP_LIST=$(git diff --name-only cgal/$BASE_NAME...HEAD |grep -E -v /doc |grep -E "\.h"\|"\.cpp" |cut -s -d/ -f1 |sort -u | xargs -I {} ls -d {}/package_info 2>/dev/null |cut -d/ -f1 |grep -E -v Installation||true)
|
|
||||||
|
|
||||||
LIST_OF_PKGS=""
|
|
||||||
for PKG in $(ls) ; do
|
|
||||||
if [ -f $PKG/package_info/$PKG/dependencies ]; then
|
|
||||||
if [ -n "$(comm -12 <(echo "$TMP_LIST"|sort) <(cat $PKG/package_info/$PKG/dependencies|sort))" ]; then
|
|
||||||
LIST_OF_PKGS="$LIST_OF_PKGS $PKG"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [ -f ${CGAL_ROOT}/list_test_packages ]; then rm ${CGAL_ROOT}/list_test_packages; fi
|
|
||||||
if [ "$LIST_OF_PKGS" != "" ]; then
|
|
||||||
for f in $LIST_OF_PKGS
|
|
||||||
do
|
|
||||||
echo "echo \"$f\"" >> ${CGAL_ROOT}/list_test_packages
|
|
||||||
echo "echo \"${f}_Examples\"" >> ${CGAL_ROOT}/list_test_packages
|
|
||||||
echo "echo \"${f}_Demo\"" >> ${CGAL_ROOT}/list_test_packages
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
#create the release from the branch
|
|
||||||
echo " Create release..."
|
|
||||||
CGAL_VERSION="$(sed -E 's/#define CGAL_VERSION (.*\..*)-dev/\1/' <(grep "#define CGAL_VERSION " Installation/include/CGAL/version.h))-Ic-${PR_NUMBER}"
|
|
||||||
cmake -DGIT_REPO=${CGAL_GIT_DIR}/cgal -DDESTINATION=${CGAL_ROOT}/CGAL-TEST -DPUBLIC=OFF -DTESTSUITE=ON -DCGAL_VERSION=${CGAL_VERSION} -P ${CGAL_GIT_DIR}/cgal/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake | tee log
|
|
||||||
echo "done."
|
|
||||||
DEST=$(sed -E 's/.*CGAL-TEST\/(.*)/\1/' log);
|
|
||||||
|
|
||||||
cd ${CGAL_ROOT}
|
|
||||||
|
|
||||||
if [ -L CGAL-I ]; then rm CGAL-I; fi
|
|
||||||
ln -s $PWD/CGAL-TEST/$DEST CGAL-I
|
|
||||||
if [ -d CGAL-I/cmake/platforms ]; then
|
|
||||||
rm -rf CGAL-I/cmake/platforms/*
|
|
||||||
fi
|
|
||||||
echo "starting testsuite..."
|
|
||||||
|
|
||||||
./autotest_cgal -c
|
|
||||||
|
|
||||||
echo "finished."
|
|
||||||
)>${CGAL_ROOT}/autotest.log2 2>&1 &
|
|
||||||
|
|
||||||
echo "exit."
|
|
||||||
exit 0
|
|
||||||
|
|
@ -206,7 +206,7 @@ fi
|
||||||
|
|
||||||
#check no file contains non-utf8 characters
|
#check no file contains non-utf8 characters
|
||||||
echo '.. Checking if non utf-8 characters are used...'
|
echo '.. Checking if non utf-8 characters are used...'
|
||||||
txt_not_utf8=$(git ls-files -z --stage | awk -F"\t" 'BEGIN { RS="\0" }; { printf "%s\n", $2; }' | xargs file -N | grep "text" | grep -E -v "UTF-8|ASCII|CSV|XML|EPS|FIG|assembler source|Perl script|from flex")
|
txt_not_utf8=$(git ls-files -z --stage | awk -F"\t" 'BEGIN { RS="\0" }; { printf "%s\n", $2; }' | xargs file -N | grep "text" | grep -E -v "UTF-8|ASCII|CSV|XML|EPS|FIG|JSON|pixmap|magic|assembler source|Perl script|from flex")
|
||||||
if [ -n "${txt_not_utf8}" ]; then
|
if [ -n "${txt_not_utf8}" ]; then
|
||||||
echo "The following files have non utf-8 characters:"
|
echo "The following files have non utf-8 characters:"
|
||||||
echo ${txt_not_utf8}
|
echo ${txt_not_utf8}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
#! /bin/bash
|
|
||||||
|
|
||||||
./cgal_test_base -cmake
|
|
||||||
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
#! /bin/bash
|
|
||||||
|
|
||||||
./cgal_test_base -cmake
|
|
||||||
|
|
@ -1,283 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# collect_cgal_testresults_from_cmake
|
|
||||||
# ===================================
|
|
||||||
# collect all files to generate the html page
|
|
||||||
# containing the testsuite results
|
|
||||||
#
|
|
||||||
# to be run in the CGAL/test directory or a local test directory.
|
|
||||||
# CGAL_TESTER, CGAL_TESTER_NAME, CGAL_TESTER_ADDRESS are environment variables.
|
|
||||||
|
|
||||||
|
|
||||||
if [ -z "${CGAL_TEST_PLATFORM}" ]; then
|
|
||||||
|
|
||||||
CGAL_TEST_PLATFORM=`dirname $PWD`
|
|
||||||
echo "CGAL_TEST_PLATFORM not in the environment, setting it to ${CGAL_TEST_PLATFORM}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$1" ] ; then
|
|
||||||
TEST_DIRECTORIES=`ls`
|
|
||||||
else
|
|
||||||
TEST_DIRECTORIES="$*"
|
|
||||||
fi
|
|
||||||
|
|
||||||
GENERAL_BUILD_LOGFILE=''
|
|
||||||
PLATFORM_BUILD_LOGFILE=''
|
|
||||||
TEST_REPORT=''
|
|
||||||
RESULT_FILE=''
|
|
||||||
|
|
||||||
#print_testresult <platform> <directory>
|
|
||||||
# print result on stdout
|
|
||||||
# print timings on fd3
|
|
||||||
print_testresult()
|
|
||||||
{
|
|
||||||
if [ -f skipped ]; then
|
|
||||||
RESULT="s"
|
|
||||||
TIMING="0"
|
|
||||||
elif [ ! -f ErrorOutput_$1 ] ; then
|
|
||||||
RESULT="?"
|
|
||||||
TIMING="?"
|
|
||||||
else
|
|
||||||
if eval grep ERROR ErrorOutput_$1 > /dev/null ; then
|
|
||||||
RESULT="n"
|
|
||||||
else
|
|
||||||
# grep -q means "quiet": no output, the return code is 0 iff the file
|
|
||||||
# matches the regular expression.
|
|
||||||
# grep -i means "case insensitive".
|
|
||||||
# grep -E means "extended regular expressions".
|
|
||||||
# All those three options are in the Single Unix Specification version 3
|
|
||||||
|
|
||||||
# The extended regular expression '[^a-zA-Z_,:-]warning matches any
|
|
||||||
# string "warning" preceded with a letter that is not a letter or '_'
|
|
||||||
# or ',' or ':'. That avoids some false positives such as
|
|
||||||
# '-read_only_relocs,warning' or '-D_CRT_SECURE_NO_WARNINGS', or
|
|
||||||
# 'QMessageBox::warning'.
|
|
||||||
if grep -v -F 'CMake Warning at /usr/share/cmake/Modules/FindBoost' CompilerOutput_$1 ProgramOutput.*.$1 | grep -i -E -q '(^|[^a-zA-Z_,:-])warning'
|
|
||||||
then
|
|
||||||
if grep -v -F 'CMake Warning at /usr/share/cmake/Modules/FindBoost' CompilerOutput_$1 ProgramOutput.*.$1 | grep -i -E '(^|[^a-zA-Z_,:-])warning' | grep -i -q "include[/\]CGAL\|cmake\|CGAL warning"
|
|
||||||
then
|
|
||||||
RESULT="w"
|
|
||||||
else
|
|
||||||
RESULT="t"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if grep -E -q 'NOTICE: .*(need|require|incompatible|not found).*will not be' CompilerOutput_$1
|
|
||||||
then
|
|
||||||
RESULT="r"
|
|
||||||
else
|
|
||||||
RESULT="y"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
TIMING=`awk '/^ # Running time: / {print $4}' < ErrorOutput_$1`
|
|
||||||
fi
|
|
||||||
echo "$2 $TIMING" >&3
|
|
||||||
echo "$2 $RESULT"
|
|
||||||
}
|
|
||||||
|
|
||||||
parse_flags_and_third_party_choices()
|
|
||||||
{
|
|
||||||
grep -e "^-- USING " ${PLATFORM_BUILD_LOGFILE} >> $RESULT_FILE
|
|
||||||
echo "------------" >> $RESULT_FILE
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
output_main_logs()
|
|
||||||
{
|
|
||||||
[ -e Installation ] || mkdir "Installation"
|
|
||||||
|
|
||||||
INSTALLATION_TEST_REPORT="Installation/$TEST_REPORT"
|
|
||||||
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo " General Build Log " >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
if [ -f "${GENERAL_BUILD_LOGFILE}" ] ; then
|
|
||||||
cat "${GENERAL_BUILD_LOGFILE}" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
else
|
|
||||||
echo "Not found!" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo " Platform-specific Build Log " >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
if [ -f "${PLATFORM_BUILD_LOGFILE}" ] ; then
|
|
||||||
cat "${PLATFORM_BUILD_LOGFILE}" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
else
|
|
||||||
echo "Not found!" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "$HOME/.autocgal_with_cmake_rc" ] ; then
|
|
||||||
echo "" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo " .autocgal_with_cmake_rc" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
cat "$HOME/.autocgal_with_cmake_rc" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
else
|
|
||||||
if [ -f "$HOME/.autocgalrc" ] ; then
|
|
||||||
echo "" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo " .autocgalrc" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
cat "$HOME/.autocgalrc" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "../setup" ] ; then
|
|
||||||
echo "" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo " setup" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
cat "../setup" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
echo "" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo " CMakeCache.txt" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
if [ -f "../CMakeCache.txt" ] ; then
|
|
||||||
cat "../CMakeCache.txt" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
else
|
|
||||||
echo "Not found!" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo " include/CGAL/compiler_config.h" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
if [ -f "../include/CGAL/compiler_config.h" ] ; then
|
|
||||||
cat "../include/CGAL/compiler_config.h" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
else
|
|
||||||
echo "Not found!" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo " CGALConfig.cmake" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
if [ -f "../CGALConfig.cmake" ] ; then
|
|
||||||
cat "../CGALConfig.cmake" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
else
|
|
||||||
echo "Not found!" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo " CMakeError.log" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
if [ -f "../CMakeFiles/CMakeError.log" ] ; then
|
|
||||||
cat "../CMakeFiles/CMakeError.log" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
else
|
|
||||||
echo "Not found!" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo " CMakeOutput.log" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
echo "" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
if [ -f "../CMakeFiles/CMakeOutput.log" ] ; then
|
|
||||||
cat "../CMakeFiles/CMakeOutput.log" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
else
|
|
||||||
echo "Not found!" >> "$INSTALLATION_TEST_REPORT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "---------------------------------------------------------------"
|
|
||||||
echo " Collecting results of platform $CGAL_TEST_PLATFORM"
|
|
||||||
echo "---------------------------------------------------------------"
|
|
||||||
|
|
||||||
CURRENT_DIR=`pwd`
|
|
||||||
TESTER=${CGAL_TESTER:-${USER:-`whoami`}}
|
|
||||||
TESTER_NAME="${CGAL_TESTER_NAME:-${TESTER}}"
|
|
||||||
TESTER_ADDRESS="${CGAL_TESTER_ADDRESS:-${TESTER}}"
|
|
||||||
TEST_REPORT="TestReport_${TESTER}_${CGAL_TEST_PLATFORM}"
|
|
||||||
RESULT_FILE="$CURRENT_DIR/results_${TESTER}_${CGAL_TEST_PLATFORM}.txt"
|
|
||||||
TIMING_FILE="$CURRENT_DIR/timings_${TESTER}_${CGAL_TEST_PLATFORM}.txt"
|
|
||||||
CGAL_DIR=../../../..
|
|
||||||
GENERAL_BUILD_LOGFILE="../../installation.log"
|
|
||||||
PLATFORM_BUILD_LOGFILE="../installation.log"
|
|
||||||
rm -f "$RESULT_FILE" "$TIMING_FILE"
|
|
||||||
touch "$RESULT_FILE" "$TIMING_FILE"
|
|
||||||
sed -n '/CGAL_VERSION /s/#define //p' < "$CGAL_DIR/include/CGAL/version.h" >> "$RESULT_FILE"
|
|
||||||
echo "TESTER ${TESTER}" >> "$RESULT_FILE"
|
|
||||||
echo "TESTER_NAME ${TESTER_NAME}" >> "$RESULT_FILE"
|
|
||||||
echo "TESTER_ADDRESS ${TESTER_ADDRESS}" >> "$RESULT_FILE"
|
|
||||||
echo "CGAL_TEST_PLATFORM ${CGAL_TEST_PLATFORM}" >> "$RESULT_FILE"
|
|
||||||
echo "General installation log file: ${GENERAL_BUILD_LOGFILE}" >> "$RESULT_FILE"
|
|
||||||
echo "Host-specific installation log file: ${PLATFORM_BUILD_LOGFILE}" >> "$RESULT_FILE"
|
|
||||||
|
|
||||||
output_main_logs
|
|
||||||
|
|
||||||
parse_flags_and_third_party_choices
|
|
||||||
|
|
||||||
for DIR in $TEST_DIRECTORIES ; do
|
|
||||||
if [ -d "$DIR" ] ; then
|
|
||||||
echo " $DIR ..."
|
|
||||||
cd "$DIR"
|
|
||||||
|
|
||||||
print_testresult "$CGAL_TEST_PLATFORM" "$DIR" >> "$RESULT_FILE" 3>>"$TIMING_FILE"
|
|
||||||
|
|
||||||
if [ ! "$DIR" = "Installation" ] ; then
|
|
||||||
rm -f "${TEST_REPORT}"
|
|
||||||
touch "$TEST_REPORT"
|
|
||||||
fi
|
|
||||||
if [ -f .scm-urls ]; then
|
|
||||||
echo " Test files from:" >> "$TEST_REPORT"
|
|
||||||
cat .scm-urls >> "$TEST_REPORT"
|
|
||||||
echo >> "$TEST_REPORT"
|
|
||||||
elif [ -f ../../../../../.scm-branch ]; then
|
|
||||||
cat ../../../../../.scm-branch >> "$TEST_REPORT"
|
|
||||||
echo >> "$TEST_REPORT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f ErrorOutput_${CGAL_TEST_PLATFORM} ] ; then
|
|
||||||
echo "Error: file $DIR/ErrorOutput_${CGAL_TEST_PLATFORM} does not exist!"
|
|
||||||
else
|
|
||||||
cat ErrorOutput_${CGAL_TEST_PLATFORM} >> "$TEST_REPORT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f CompilerOutput_${CGAL_TEST_PLATFORM} ] ; then
|
|
||||||
echo "Error: file $DIR/CompilerOutput_${CGAL_TEST_PLATFORM} does not exist!"
|
|
||||||
else
|
|
||||||
cat CompilerOutput_${CGAL_TEST_PLATFORM} >> "$TEST_REPORT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if 2>&1 eval ls ProgramOutput.*.${CGAL_TEST_PLATFORM} > /dev/null ; then
|
|
||||||
PROGRAM_OUTPUT=`ls ProgramOutput.*"$CGAL_TEST_PLATFORM"*`
|
|
||||||
for FILE in $PROGRAM_OUTPUT ; do
|
|
||||||
echo >> "$TEST_REPORT"
|
|
||||||
echo "------------------------------------------------------------------" >> "$TEST_REPORT"
|
|
||||||
echo "- $FILE" >> "$TEST_REPORT"
|
|
||||||
echo "------------------------------------------------------------------" >> "$TEST_REPORT"
|
|
||||||
cat $FILE >> "$TEST_REPORT"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
OUTPUT_FILE=results_${TESTER}_${CGAL_TEST_PLATFORM}.tar
|
|
||||||
rm -f $OUTPUT_FILE $OUTPUT_FILE.gz
|
|
||||||
tar cf $OUTPUT_FILE results_${TESTER}_${CGAL_TEST_PLATFORM}.txt timings_${TESTER}_${CGAL_TEST_PLATFORM}.txt */"$TEST_REPORT"
|
|
||||||
echo
|
|
||||||
echo "compressing ..."
|
|
||||||
gzip -9f $OUTPUT_FILE
|
|
||||||
echo "results written to file $OUTPUT_FILE.gz"
|
|
||||||
echo
|
|
||||||
|
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# standard-indent: 2
|
|
||||||
# End:
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
# A GNU makefile which calls run_testsuite_with_cmake over all directories.
|
|
||||||
|
|
||||||
dirs:=$(wildcard */)
|
|
||||||
targets:=$(addsuffix pink_elephant,$(dirs))
|
|
||||||
cleans:=$(addsuffix green_elephant,$(dirs))
|
|
||||||
|
|
||||||
all: ${targets}
|
|
||||||
|
|
||||||
clean: ${cleans}
|
|
||||||
|
|
||||||
%/pink_elephant:
|
|
||||||
@+./run_testsuite_with_cmake $*
|
|
||||||
|
|
||||||
%/green_elephant:
|
|
||||||
@cd $* && $(MAKE) clean
|
|
||||||
|
|
@ -78,7 +78,7 @@ for t_id in range(0, len(tests)):
|
||||||
|
|
||||||
warning_pattern=re.compile(r'(.*([^a-zA-Z_,:-])warning)', flags=re.IGNORECASE)
|
warning_pattern=re.compile(r'(.*([^a-zA-Z_,:-])warning)', flags=re.IGNORECASE)
|
||||||
w_det=re.compile("warning");
|
w_det=re.compile("warning");
|
||||||
filter_pattern=re.compile(r'cmake|cgal', flags=re.IGNORECASE);
|
filter_pattern=re.compile(r'cmake|cgal|.*\.cpp', flags=re.IGNORECASE);
|
||||||
with open_file_create_dir(result_file_name.format(dir=os.getcwd(),
|
with open_file_create_dir(result_file_name.format(dir=os.getcwd(),
|
||||||
tester=tester_name,
|
tester=tester_name,
|
||||||
platform=platform_name), 'a+') as results:
|
platform=platform_name), 'a+') as results:
|
||||||
|
|
|
||||||
|
|
@ -1,263 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
#
|
|
||||||
# This is the test script for the CGAL-library.
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
# run_testsuite for running the test suite in all subdirectories
|
|
||||||
# run_testsuite <directory-list> for running the test suite in the listed
|
|
||||||
# subdirectories
|
|
||||||
#
|
|
||||||
# To use this script you have to do two things:
|
|
||||||
#
|
|
||||||
# 2) set some additional compiler and or linker flags
|
|
||||||
|
|
||||||
TESTSUITE_CXXFLAGS=""
|
|
||||||
TESTSUITE_LDFLAGS=""
|
|
||||||
|
|
||||||
CURRENTDIR=`pwd`
|
|
||||||
ERRORFILE=${CURRENTDIR}/error.txt
|
|
||||||
if [ -n "$CGAL_TEST_PLATFORM" ]; then
|
|
||||||
PLATFORM=$CGAL_TEST_PLATFORM
|
|
||||||
else
|
|
||||||
PLATFORM=no-platform
|
|
||||||
fi
|
|
||||||
if [ -n "${CGAL_TIMEOUT_PROG+x}" ]; then
|
|
||||||
TIMEOUT=$CGAL_TIMEOUT_PROG
|
|
||||||
else
|
|
||||||
TIMEOUT=`which timeout`
|
|
||||||
[ -z "$TIMEOUT" ] && TIMEOUT=`which gtimeout`
|
|
||||||
fi
|
|
||||||
|
|
||||||
#clear the error file
|
|
||||||
rm -f "$ERRORFILE"
|
|
||||||
touch "$ERRORFILE"
|
|
||||||
|
|
||||||
# On Cygwin, killing bash does not kill jobs it has spawned. This
|
|
||||||
# function takes a PID as argument and prints the list of children
|
|
||||||
# processes of this process, including itself.
|
|
||||||
process_tree()
|
|
||||||
{
|
|
||||||
local pid=$1
|
|
||||||
local result=
|
|
||||||
echo $pid
|
|
||||||
ps -a | awk '!/^ +PID/ {print $1 " " $2}' | {
|
|
||||||
while read apid appid; do
|
|
||||||
if [ "$appid" = "$pid" ]; then
|
|
||||||
process_tree $apid
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Wait for process with pid $1.
|
|
||||||
# Wait for $2 periods of $3 seconds, checking after every period
|
|
||||||
# if the watched process has finished.
|
|
||||||
wait_for_process()
|
|
||||||
{
|
|
||||||
pid=$1;
|
|
||||||
cycles=$2
|
|
||||||
period=$3
|
|
||||||
while [ $cycles -ne 0 ]
|
|
||||||
do
|
|
||||||
cycles=`expr $cycles - 1`
|
|
||||||
# send SIGCONT to the process and check the exit value of kill.
|
|
||||||
# If the process still exists, the call to kill succeeds (and the signal is
|
|
||||||
# ignored).
|
|
||||||
|
|
||||||
kill -CONT $pid 2>kill_output 1>/dev/null; terminated=$?
|
|
||||||
# But under CYGWIN the exit status is not to be trusted.
|
|
||||||
if [ $terminated -eq 0 ]; then
|
|
||||||
if grep -i 'no such process' kill_output; then
|
|
||||||
terminated=1;
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
rm -f kill_output
|
|
||||||
if [ $terminated -eq 0 ]
|
|
||||||
then
|
|
||||||
sleep $period
|
|
||||||
else
|
|
||||||
cycles=0
|
|
||||||
running=0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [ $terminated -eq 0 ]
|
|
||||||
then
|
|
||||||
if false; then
|
|
||||||
# Send signal Terminate (SIGTERM) to the whole process group.
|
|
||||||
# First disable the default action (quit) for the current process.
|
|
||||||
trap true TERM
|
|
||||||
kill -TERM 0
|
|
||||||
trap TERM
|
|
||||||
else
|
|
||||||
|
|
||||||
# $pid is the PID of the forked shell that launched the command
|
|
||||||
# in background, in run_local_cgal_test(). If the shell is
|
|
||||||
# Bash, the Bash manual states that it ignores SIGTERM.
|
|
||||||
# However, it does not catch SIGHUP. That is why the first
|
|
||||||
# signal send is SIGHUP.
|
|
||||||
case "`uname`" in
|
|
||||||
CYGWIN*)
|
|
||||||
pids=`process_tree $pid`;;
|
|
||||||
*) pids=$pid;;
|
|
||||||
esac
|
|
||||||
for p in $pids; do kill -HUP $p; done
|
|
||||||
sleep 10
|
|
||||||
# If SIGHUP was not enough, SIGKILL will finish the job, 10s after.
|
|
||||||
for p in $pids; do kill -KILL $p 2>/dev/null; done
|
|
||||||
fi
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
run_local_cgal_test()
|
|
||||||
{
|
|
||||||
# Workaround an issue on Windows when GNU Make is used for "make -f
|
|
||||||
# makefile2" but nmake is used after.
|
|
||||||
MAKEFLAGS=
|
|
||||||
export MAKEFLAGS
|
|
||||||
|
|
||||||
if [ -n "$TIMEOUT" ]; then
|
|
||||||
"$TIMEOUT" $(( $TIME_PERIOD * 5 )) ./cgal_test_with_cmake > current_compiler_output 2>&1
|
|
||||||
else
|
|
||||||
./cgal_test_with_cmake > current_compiler_output 2>&1
|
|
||||||
fi
|
|
||||||
exit_value=$?
|
|
||||||
if [ $exit_value -ne 0 ]
|
|
||||||
then
|
|
||||||
printf "%s\n" "$exit_value" > test_failure
|
|
||||||
fi
|
|
||||||
return $exit_value
|
|
||||||
}
|
|
||||||
|
|
||||||
#test_directory <directory> <already_here>
|
|
||||||
# test_directory() may call itself once: the second parameter avoids that
|
|
||||||
# it calls itself infinitely.
|
|
||||||
test_directory()
|
|
||||||
{
|
|
||||||
cd "$CURRENTDIR"
|
|
||||||
if [ -d $1 ] ; then
|
|
||||||
echo "DIRECTORY $1:"
|
|
||||||
echo
|
|
||||||
|
|
||||||
echo "DIRECTORY $1:" >> "$ERRORFILE"
|
|
||||||
echo >> "$ERRORFILE"
|
|
||||||
cd "$1"
|
|
||||||
|
|
||||||
COMPILER_OUTPUT=CompilerOutput_$PLATFORM
|
|
||||||
rm -f "$COMPILER_OUTPUT"
|
|
||||||
ERROR_OUTPUT=ErrorOutput_$PLATFORM
|
|
||||||
rm -f "$ERROR_OUTPUT"
|
|
||||||
|
|
||||||
echo "------------------------------------------------------------------" >> "$COMPILER_OUTPUT"
|
|
||||||
echo "- Compiler output from platform $PLATFORM" >> "$COMPILER_OUTPUT"
|
|
||||||
echo "------------------------------------------------------------------" >> "$COMPILER_OUTPUT"
|
|
||||||
echo >> "$COMPILER_OUTPUT"
|
|
||||||
|
|
||||||
echo "------------------------------------------------------------------" >> "$ERROR_OUTPUT"
|
|
||||||
echo "- Error output from platform $PLATFORM" >> "$ERROR_OUTPUT"
|
|
||||||
echo "------------------------------------------------------------------" >> "$ERROR_OUTPUT"
|
|
||||||
echo >> "$ERROR_OUTPUT"
|
|
||||||
|
|
||||||
if [ -f cgal_test_with_cmake -a -x cgal_test_with_cmake ] ; then
|
|
||||||
export PLATFORM TESTSUITE_CXXFLAGS TESTSUITE_LDFLAGS
|
|
||||||
rm -f error.txt
|
|
||||||
START=`date +%s`
|
|
||||||
TIME_PERIOD=1200
|
|
||||||
if [ "$1" = "Polyhedron_Demo" ]; then
|
|
||||||
TIME_PERIOD=2400
|
|
||||||
fi
|
|
||||||
if [ -n "$TIMEOUT" ]; then
|
|
||||||
run_local_cgal_test
|
|
||||||
return_code=$?
|
|
||||||
if [ $return_code -eq 124 ]; then
|
|
||||||
echo "ERROR: cgal_test_with_cmake did not finish within the time bound set" >> "$ERRORFILE"
|
|
||||||
echo "ERROR: cgal_test_with_cmake did not finish within the time bound set" >> "$ERROR_OUTPUT"
|
|
||||||
else
|
|
||||||
if [ -f test_failure ] ; then
|
|
||||||
exit_failure=`cat test_failure`
|
|
||||||
rm -f test_failure
|
|
||||||
echo "ERROR: cgal_test_with_cmake exited with error condition $exit_value" >> "$ERRORFILE"
|
|
||||||
echo "ERROR: cgal_test_with_cmake exited with error condition $exit_value" >> "$ERROR_OUTPUT"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
run_local_cgal_test &
|
|
||||||
|
|
||||||
if wait_for_process "$!" "$TIME_PERIOD" "5"
|
|
||||||
then
|
|
||||||
if [ -f test_failure ] ; then
|
|
||||||
exit_failure=`cat test_failure`
|
|
||||||
rm -f test_failure
|
|
||||||
echo "ERROR: cgal_test_with_cmake exited with error condition $exit_value" >> "$ERRORFILE"
|
|
||||||
echo "ERROR: cgal_test_with_cmake exited with error condition $exit_value" >> "$ERROR_OUTPUT"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "ERROR: cgal_test_with_cmake did not finish within the time bound set" >> "$ERRORFILE"
|
|
||||||
echo "ERROR: cgal_test_with_cmake did not finish within the time bound set" >> "$ERROR_OUTPUT"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
STOP=`date +%s`
|
|
||||||
DURATION=`expr "$STOP" - "$START"`
|
|
||||||
printf " # Running time: %s (seconds)\n\n" "$DURATION" >> "$ERRORFILE"
|
|
||||||
printf " # Running time: %s (seconds)\n\n" "$DURATION" >> "$ERROR_OUTPUT"
|
|
||||||
cat current_compiler_output >> "$COMPILER_OUTPUT"
|
|
||||||
cat current_compiler_output
|
|
||||||
rm -f current_compiler_output
|
|
||||||
|
|
||||||
if [ -f error.txt ] ; then
|
|
||||||
cat error.txt >> "$ERRORFILE"
|
|
||||||
cat error.txt >> "$ERROR_OUTPUT"
|
|
||||||
else
|
|
||||||
echo "ERROR: the script cgal_test_with_cmake failed to generate output" >> "$ERRORFILE"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [ -z "$2" ]; then
|
|
||||||
create_cgal_test
|
|
||||||
test_directory "$1" "second_time"
|
|
||||||
else
|
|
||||||
echo " Could not execute the script cgal_test_with_cmake in directory $1"
|
|
||||||
echo "ERROR: could not execute the script $1/cgal_test_with_cmake" >> $ERRORFILE
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
echo >> "$ERRORFILE"
|
|
||||||
echo >> "$ERROR_OUTPUT"
|
|
||||||
fi
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
run_testsuite()
|
|
||||||
{
|
|
||||||
|
|
||||||
echo "---------------------------------------------------------------"
|
|
||||||
echo "- Testing platform $PLATFORM"
|
|
||||||
echo "---------------------------------------------------------------"
|
|
||||||
echo
|
|
||||||
|
|
||||||
echo "---------------------------------------------------------------" >> "$ERRORFILE"
|
|
||||||
echo "- TEST RESULTS FROM PLATFORM $PLATFORM" >> "$ERRORFILE"
|
|
||||||
echo "---------------------------------------------------------------" >> "$ERRORFILE"
|
|
||||||
echo >> "$ERRORFILE"
|
|
||||||
|
|
||||||
case "`uname`" in
|
|
||||||
CYGWIN*)
|
|
||||||
PATH=`cygpath "$CGAL_DIR"`/bin:`cygpath "$CGAL_DIR"`/lib:$PATH
|
|
||||||
export PATH
|
|
||||||
esac
|
|
||||||
|
|
||||||
for DIR in $TEST_DIRECTORIES ; do
|
|
||||||
if [ ! -f $DIR/skipped ]; then
|
|
||||||
test_directory "$DIR"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
[ x"$1" = x"icons" -o x"$1" = x"resources" ] && exit 0
|
|
||||||
|
|
||||||
if [ -z "$1" ] ; then
|
|
||||||
TEST_DIRECTORIES=`ls | grep -E -v 'icons|resources'`
|
|
||||||
else
|
|
||||||
TEST_DIRECTORIES="$*"
|
|
||||||
fi
|
|
||||||
|
|
||||||
run_testsuite
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
# A GNU makefile which calls run_testsuite_with_cmake over all directories.
|
|
||||||
|
|
||||||
dirs:=$(wildcard ../../*/test/*/)
|
|
||||||
targets:=$(addsuffix pink_elephant,$(dirs))
|
|
||||||
cleans:=$(addsuffix green_elephant,$(dirs))
|
|
||||||
|
|
||||||
all: ${targets}
|
|
||||||
|
|
||||||
clean: ${cleans}
|
|
||||||
|
|
||||||
%/pink_elephant:
|
|
||||||
@+./run_testsuite_with_cmake $*
|
|
||||||
|
|
||||||
%/green_elephant:
|
|
||||||
@cd $* && $(MAKE) clean
|
|
||||||
|
|
@ -18,6 +18,8 @@
|
||||||
#include <CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h>
|
#include <CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h>
|
||||||
#include <CGAL/Tetrahedral_remeshing/internal/property_maps.h>
|
#include <CGAL/Tetrahedral_remeshing/internal/property_maps.h>
|
||||||
|
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
namespace CGAL
|
namespace CGAL
|
||||||
{
|
{
|
||||||
namespace Tetrahedral_remeshing
|
namespace Tetrahedral_remeshing
|
||||||
|
|
@ -70,16 +72,16 @@ std::size_t peel_slivers(C3T3& c3t3,
|
||||||
Cell_handle c = c_i.first;
|
Cell_handle c = c_i.first;
|
||||||
const std::array<bool, 4>& f_on_surface = c_i.second;
|
const std::array<bool, 4>& f_on_surface = c_i.second;
|
||||||
|
|
||||||
boost::optional<Surface_patch_index> patch;
|
std::optional<Surface_patch_index> patch;
|
||||||
for (int i = 0; i < 4; ++i)
|
for (int i = 0; i < 4; ++i)
|
||||||
{
|
{
|
||||||
if (f_on_surface[i])
|
if (f_on_surface[i])
|
||||||
{
|
{
|
||||||
Surface_patch_index spi = c3t3.surface_patch_index(c, i);
|
Surface_patch_index spi = c3t3.surface_patch_index(c, i);
|
||||||
if (patch != boost::none && patch.get() != spi)
|
if (patch.has_value() && patch.value() != spi)
|
||||||
{
|
{
|
||||||
//there are 2 different patches
|
//there are 2 different patches
|
||||||
patch = boost::none;
|
patch.reset();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -88,7 +90,7 @@ std::size_t peel_slivers(C3T3& c3t3,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (patch == boost::none)
|
if (!patch.has_value())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (int i = 0; i < 4; ++i)
|
for (int i = 0; i < 4; ++i)
|
||||||
|
|
@ -96,7 +98,7 @@ std::size_t peel_slivers(C3T3& c3t3,
|
||||||
if (f_on_surface[i])
|
if (f_on_surface[i])
|
||||||
c3t3.remove_from_complex(c, i);
|
c3t3.remove_from_complex(c, i);
|
||||||
else
|
else
|
||||||
c3t3.add_to_complex(c, i, patch.get());
|
c3t3.add_to_complex(c, i, patch.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
c3t3.remove_from_complex(c);
|
c3t3.remove_from_complex(c);
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ typedef CGAL::Tetrahedral_remeshing::Remeshing_triangulation_3<K> Remeshing_tria
|
||||||
|
|
||||||
void generate_input_two_subdomains(const std::size_t nbv, Remeshing_triangulation& tr)
|
void generate_input_two_subdomains(const std::size_t nbv, Remeshing_triangulation& tr)
|
||||||
{
|
{
|
||||||
CGAL::Random rng;
|
CGAL::Random& rng = CGAL::get_default_random();
|
||||||
|
|
||||||
typedef Remeshing_triangulation::Point Point;
|
typedef Remeshing_triangulation::Point Point;
|
||||||
typedef Remeshing_triangulation::Cell_handle Cell_handle;
|
typedef Remeshing_triangulation::Cell_handle Cell_handle;
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
|
|
||||||
#include <CGAL/Delaunay_triangulation_3.h>
|
#include <CGAL/Delaunay_triangulation_3.h>
|
||||||
#include <CGAL/Triangulation_segment_traverser_3.h>
|
#include <CGAL/Triangulation_simplex_3.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
@ -30,8 +30,8 @@
|
||||||
#include <CGAL/Timer.h>
|
#include <CGAL/Timer.h>
|
||||||
|
|
||||||
// Define the kernel.
|
// Define the kernel.
|
||||||
typedef CGAL::Exact_predicates_exact_constructions_kernel Epeck;
|
using Epeck = CGAL::Exact_predicates_exact_constructions_kernel;
|
||||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel Epick;
|
using Epick = CGAL::Exact_predicates_inexact_constructions_kernel;
|
||||||
|
|
||||||
|
|
||||||
template<typename Kernel>
|
template<typename Kernel>
|
||||||
|
|
@ -40,11 +40,11 @@ void bench_segment_traverser(const int nb_queries,
|
||||||
const double rad,
|
const double rad,
|
||||||
CGAL::Random& rng)
|
CGAL::Random& rng)
|
||||||
{
|
{
|
||||||
typedef CGAL::Delaunay_triangulation_3<Kernel> DT;
|
using DT = CGAL::Delaunay_triangulation_3<Kernel>;
|
||||||
typedef CGAL::Triangulation_segment_simplex_iterator_3<DT> Simplex_traverser;
|
using Tds = typename DT::Triangulation_data_structure;
|
||||||
typedef CGAL::Triangulation_segment_cell_iterator_3<DT> Cell_traverser;
|
using Point_3 = typename DT::Point_3;
|
||||||
typedef typename DT::Point_3 Point_3;
|
using Cell_handle = typename DT::Cell_handle;
|
||||||
typedef typename DT::Cell Cell;
|
using Simplex_3 = CGAL::Triangulation_simplex_3<Tds>;
|
||||||
|
|
||||||
std::cout << "\nBench :\t " << nb_queries << " queries," << std::endl
|
std::cout << "\nBench :\t " << nb_queries << " queries," << std::endl
|
||||||
<< "\t in triangulation of size " << nbv << std::endl
|
<< "\t in triangulation of size " << nbv << std::endl
|
||||||
|
|
@ -83,29 +83,26 @@ void bench_segment_traverser(const int nb_queries,
|
||||||
{
|
{
|
||||||
//Simplex traverser
|
//Simplex traverser
|
||||||
timer_st.start();
|
timer_st.start();
|
||||||
Simplex_traverser st(dt, segments[2*i], segments[2*i + 1]);
|
|
||||||
|
|
||||||
// Count the number of finite cells traversed.
|
// Count the number of finite cells traversed.
|
||||||
unsigned int inf = 0, fin = 0;
|
unsigned int inf = 0, fin = 0;
|
||||||
for (; st != st.end(); ++st)
|
for (Simplex_3 st : dt.segment_traverser_simplices(segments[2 * i], segments[2 * i + 1]))
|
||||||
{
|
{
|
||||||
Cell c = st.cell();
|
Cell_handle c = st.incident_cell();
|
||||||
// if (dt.is_infinite(c)) ++inf;
|
if (dt.is_infinite(c)) ++inf;
|
||||||
// else ++fin;
|
else ++fin;
|
||||||
}
|
}
|
||||||
timer_st.stop();
|
timer_st.stop();
|
||||||
|
|
||||||
//Cell traverser
|
//Cell traverser
|
||||||
timer_ct.start();
|
timer_ct.start();
|
||||||
Cell_traverser ct(dt, segments[2*i], segments[2*i + 1]);
|
|
||||||
|
|
||||||
// Count the number of finite cells traversed.
|
// Count the number of finite cells traversed.
|
||||||
inf = 0, fin = 0;
|
inf = 0, fin = 0;
|
||||||
for (; ct != ct.end(); ++ct)
|
for (Cell_handle c : dt.segment_traverser_cell_handles(segments[2 * i], segments[2 * i + 1]))
|
||||||
{
|
{
|
||||||
Cell c = ct.cell();
|
if (dt.is_infinite(c)) ++inf;
|
||||||
// if (dt.is_infinite(c)) ++inf;
|
else ++fin;
|
||||||
// else ++fin;
|
|
||||||
}
|
}
|
||||||
timer_ct.stop();
|
timer_ct.stop();
|
||||||
}
|
}
|
||||||
|
|
@ -128,4 +125,6 @@ int main(int argc, char* argv[])
|
||||||
|
|
||||||
// bench_segment_traverser<Epeck>(nb_queries, nbv, rad, rng);
|
// bench_segment_traverser<Epeck>(nb_queries, nbv, rad, rng);
|
||||||
bench_segment_traverser<Epick>(nb_queries, nbv, rad, rng);
|
bench_segment_traverser<Epick>(nb_queries, nbv, rad, rng);
|
||||||
|
|
||||||
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ namespace CGAL {
|
||||||
\ingroup PkgTriangulation3VertexCellClasses
|
\ingroup PkgTriangulation3VertexCellClasses
|
||||||
|
|
||||||
The class `Triangulation_simplex_3` stores a simplex of any dimension
|
The class `Triangulation_simplex_3` stores a simplex of any dimension
|
||||||
defined by the `Triangulation_3` class. It also defines the
|
defined by the `TriangulationDataStructure_3` class. It also defines the
|
||||||
operator less such that simplices can be stored in a `map` or a
|
operator less such that simplices can be stored in a `map` or a
|
||||||
`set` of simplices. The simplex is invalidated by any change in
|
`set` of simplices. The simplex is invalidated by any change in
|
||||||
the triangulation.
|
the triangulation.
|
||||||
|
|
@ -18,7 +18,7 @@ from.
|
||||||
\sa `CGAL::Triangulation_3<TriangulationTraits_3,TriangulationDataStructure_3>`
|
\sa `CGAL::Triangulation_3<TriangulationTraits_3,TriangulationDataStructure_3>`
|
||||||
|
|
||||||
*/
|
*/
|
||||||
template< typename Triangulation_3 >
|
template< typename TriangulationDataStructure_3 >
|
||||||
class Triangulation_simplex_3 {
|
class Triangulation_simplex_3 {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
@ -29,67 +29,67 @@ public:
|
||||||
|
|
||||||
The simplex class itself.
|
The simplex class itself.
|
||||||
*/
|
*/
|
||||||
typedef Triangulation_simplex_3<Triangulation_3> Simplex;
|
typedef Triangulation_simplex_3<TriangulationDataStructure_3> Simplex;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
||||||
*/
|
*/
|
||||||
typedef Triangulation_3::Vertex_handle Vertex_handle;
|
typedef TriangulationDataStructure_3::Vertex_handle Vertex_handle;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
||||||
*/
|
*/
|
||||||
typedef Triangulation_3::Edge Edge;
|
typedef TriangulationDataStructure_3::Edge Edge;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
||||||
*/
|
*/
|
||||||
typedef Triangulation_3::Facet Facet;
|
typedef TriangulationDataStructure_3::Facet Facet;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
||||||
*/
|
*/
|
||||||
typedef Triangulation_3::Cell_handle Cell_handle;
|
typedef TriangulationDataStructure_3::Cell_handle Cell_handle;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
||||||
*/
|
*/
|
||||||
typedef Triangulation_3::Cell_circulator Cell_circulator;
|
typedef TriangulationDataStructure_3::Cell_circulator Cell_circulator;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
||||||
*/
|
*/
|
||||||
typedef Triangulation_3::Facet_circulator Facet_circulator;
|
typedef TriangulationDataStructure_3::Facet_circulator Facet_circulator;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
||||||
*/
|
*/
|
||||||
typedef Triangulation_3::Edge_iterator Edge_iterator;
|
typedef TriangulationDataStructure_3::Edge_iterator Edge_iterator;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
||||||
*/
|
*/
|
||||||
typedef Triangulation_3::Facet_iterator Facet_iterator;
|
typedef TriangulationDataStructure_3::Facet_iterator Facet_iterator;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
||||||
*/
|
*/
|
||||||
typedef Triangulation_3::Finite_vertices_iterator Finite_vertices_iterator;
|
typedef TriangulationDataStructure_3::Finite_vertices_iterator Finite_vertices_iterator;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
||||||
*/
|
*/
|
||||||
typedef Triangulation_3::Finite_edges_iterator Finite_edges_iterator;
|
typedef TriangulationDataStructure_3::Finite_edges_iterator Finite_edges_iterator;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
||||||
*/
|
*/
|
||||||
typedef Triangulation_3::Finite_facets_iterator Finite_facets_iterator;
|
typedef TriangulationDataStructure_3::Finite_facets_iterator Finite_facets_iterator;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
||||||
*/
|
*/
|
||||||
typedef Triangulation_3::Finite_cells_iterator Finite_cells_iterator;
|
typedef TriangulationDataStructure_3::Finite_cells_iterator Finite_cells_iterator;
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
|
@ -188,7 +188,7 @@ Test whether two
|
||||||
simplices are equal.
|
simplices are equal.
|
||||||
*/
|
*/
|
||||||
bool operator==(const
|
bool operator==(const
|
||||||
Triangulation_simplex_3<Triangulation_3> &s1);
|
Triangulation_simplex_3<TriangulationDataStructure_3> &s1);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Defines a ordering
|
Defines a ordering
|
||||||
|
|
@ -196,7 +196,7 @@ on the simplices. This ordering depends on the memory layout and is
|
||||||
independent of the geometry. Therefore, the ordering is not intrinsic
|
independent of the geometry. Therefore, the ordering is not intrinsic
|
||||||
*/
|
*/
|
||||||
bool operator< (const
|
bool operator< (const
|
||||||
Triangulation_simplex_3<Triangulation_3> &s1);
|
Triangulation_simplex_3<TriangulationDataStructure_3> &s1);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
#include <CGAL/Triangulation_vertex_base_3.h>
|
#include <CGAL/Triangulation_vertex_base_3.h>
|
||||||
#include <CGAL/Triangulation_simplex_3.h>
|
#include <CGAL/Triangulation_simplex_3.h>
|
||||||
|
|
||||||
#include <boost/optional.hpp>
|
#include <optional>
|
||||||
|
|
||||||
// If defined, type casting is done statically,
|
// If defined, type casting is done statically,
|
||||||
// reducing type-safety overhead.
|
// reducing type-safety overhead.
|
||||||
|
|
@ -789,8 +789,8 @@ public:
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
auto facet_opt = shared_facet(get_edge(), e_prev);
|
auto facet_opt = shared_facet(get_edge(), e_prev);
|
||||||
if(static_cast<bool>(facet_opt)) {
|
if(facet_opt.has_value()) {
|
||||||
_curr_simplex = *facet_opt;
|
_curr_simplex = facet_opt.value();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_curr_simplex = shared_cell(get_edge(), e_prev);
|
_curr_simplex = shared_cell(get_edge(), e_prev);
|
||||||
|
|
@ -1002,7 +1002,7 @@ private:
|
||||||
return f1 == f2 || triangulation().mirror_facet(f1) == f2;
|
return f1 == f2 || triangulation().mirror_facet(f1) == f2;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::optional<Vertex_handle> shared_vertex(const Edge& e1, const Edge& e2) const
|
std::optional<Vertex_handle> shared_vertex(const Edge& e1, const Edge& e2) const
|
||||||
{
|
{
|
||||||
Vertex_handle v1a = e1.first->vertex(e1.second);
|
Vertex_handle v1a = e1.first->vertex(e1.second);
|
||||||
Vertex_handle v1b = e1.first->vertex(e1.third);
|
Vertex_handle v1b = e1.first->vertex(e1.third);
|
||||||
|
|
@ -1017,14 +1017,15 @@ private:
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::optional<Facet> shared_facet(const Edge& e1, const Edge& e2) const
|
std::optional<Facet> shared_facet(const Edge& e1, const Edge& e2) const
|
||||||
{
|
{
|
||||||
Vertex_handle v2a = e2.first->vertex(e2.second);
|
Vertex_handle v2a = e2.first->vertex(e2.second);
|
||||||
Vertex_handle v2b = e2.first->vertex(e2.third);
|
Vertex_handle v2b = e2.first->vertex(e2.third);
|
||||||
|
|
||||||
auto sv_opt = shared_vertex(e1, e2);
|
auto sv_opt = shared_vertex(e1, e2);
|
||||||
if(!sv_opt) return {};
|
if(!sv_opt.has_value())
|
||||||
Vertex_handle sv = *sv_opt;
|
return {};
|
||||||
|
Vertex_handle sv = sv_opt.value();
|
||||||
Vertex_handle nsv2 = (sv == v2a) ? v2b : v2a;
|
Vertex_handle nsv2 = (sv == v2a) ? v2b : v2a;
|
||||||
|
|
||||||
typename Tr::Facet_circulator circ
|
typename Tr::Facet_circulator circ
|
||||||
|
|
@ -1091,7 +1092,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
Cell_handle shared_cell(const Edge e1, const Edge e2) const {
|
Cell_handle shared_cell(const Edge e1, const Edge e2) const {
|
||||||
auto facet = shared_facet(e1, e2.first->vertex(e2.second));
|
Facet facet = shared_facet(e1, e2.first->vertex(e2.second));
|
||||||
return shared_cell(facet, e2.first->vertex(e2.third));
|
return shared_cell(facet, e2.first->vertex(e2.third));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue